test: unflake wheel test (#16001)

This commit is contained in:
Yury Semikhatsky 2022-07-27 13:27:46 -07:00 committed by GitHub
parent 68d558f896
commit 93b255ce90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -163,7 +163,7 @@ it('should work when the event is canceled', async ({ page }) => {
metaKey: false, metaKey: false,
}); });
// Give the page a chance to scroll. // Give the page a chance to scroll.
await page.waitForTimeout(100); await page.waitForFunction(`!!window['lastEvent']`);
// Ensure that it did not. // Ensure that it did not.
expect(await page.evaluate('window.scrollY')).toBe(0); expect(await page.evaluate('window.scrollY')).toBe(0);
}); });