mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 13:45:36 +03:00
test: unflake screenshot test (#3245)
This commit is contained in:
parent
2f95b6e34e
commit
21eafbcdae
@ -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');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user