Skip to content

Commit

Permalink
test: unflake screenshot test (#3245)
Browse files Browse the repository at this point in the history
  • Loading branch information
dgozman authored Jul 30, 2020
1 parent 2f95b6e commit 21eafbc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/screenshot.jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,10 @@ describe.skip(ffheadful)('ElementHandle.screenshot', function() {
await page.setViewportSize({ width: 500, height: 500 });
await page.goto(server.PREFIX + '/grid.html');
const elementHandle = await page.$('.box:nth-of-type(3)');
await elementHandle.evaluate(e => e.classList.add('animation'));
await elementHandle.evaluate(e => {
e.classList.add('animation');
return new Promise(f => requestAnimationFrame(() => requestAnimationFrame(f)));
});
const screenshot = await elementHandle.screenshot();
expect(screenshot).toBeGolden('screenshot-element-bounding-box.png');
});
Expand Down

0 comments on commit 21eafbc

Please sign in to comment.