From 93b255ce90799b1b68947d4f27abfdc7eb6190fe Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 27 Jul 2022 13:27:46 -0700 Subject: [PATCH] test: unflake wheel test (#16001) --- tests/page/wheel.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/page/wheel.spec.ts b/tests/page/wheel.spec.ts index 206d219563..ad41c0bd66 100644 --- a/tests/page/wheel.spec.ts +++ b/tests/page/wheel.spec.ts @@ -163,7 +163,7 @@ it('should work when the event is canceled', async ({ page }) => { metaKey: false, }); // Give the page a chance to scroll. - await page.waitForTimeout(100); + await page.waitForFunction(`!!window['lastEvent']`); // Ensure that it did not. expect(await page.evaluate('window.scrollY')).toBe(0); });