test: unflake wheel test in ff (#9989)

This commit is contained in:
Yury Semikhatsky 2021-11-02 13:56:12 -07:00 committed by GitHub
parent 6a30c90590
commit 06cf7132be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,7 @@ it('should dispatch wheel events', async ({ page, server }) => {
await page.mouse.move(50, 60);
await listenForWheelEvents(page, 'div');
await page.mouse.wheel(0, 100);
await page.waitForFunction('window.scrollY === 100');
expect(await page.evaluate('window.lastEvent')).toEqual({
deltaX: 0,
deltaY: 100,
@ -35,7 +36,6 @@ it('should dispatch wheel events', async ({ page, server }) => {
altKey: false,
metaKey: false,
});
await page.waitForFunction('window.scrollY === 100');
});
it('should scroll when nobody is listening', async ({ page, server }) => {