Skip to content

Commit 78b1511

Browse files
authored
test: try to unflake screenshot tests (#4334)
1 parent 5c1149f commit 78b1511

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/page-screenshot.spec.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ describe('page screenshot', (suite, { browserName, headful }) => {
215215
await page.setViewportSize({width: 500, height: 500});
216216
await page.goto(server.PREFIX + '/screenshots/canvas.html');
217217
const screenshot = await page.screenshot();
218-
expect(screenshot).toMatchSnapshot('screenshot-canvas.png', { threshold: 0.3 });
218+
expect(screenshot).toMatchSnapshot('screenshot-canvas.png', { threshold: 0.4 });
219219
});
220220

221221
it('should work for webgl', (test, { browserName }) => {
@@ -298,7 +298,9 @@ describe('page screenshot', (suite, { browserName, headful }) => {
298298
expect([buffer[0], buffer[1], buffer[2]]).toEqual([0xFF, 0xD8, 0xFF]);
299299
});
300300

301-
it('should work with large size', async ({ page }) => {
301+
it('should work with large size', test => {
302+
test.slow('Large screenshot is slow');
303+
}, async ({ page }) => {
302304
await page.setViewportSize({ width: 1280, height: 800 });
303305
await page.evaluate(() => {
304306
document.body.style.margin = '0';

0 commit comments

Comments
 (0)