Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

test: unflake wheel test in ff (#9989)

Yury Semikhatsky06cf7132be96
diff --git a/tests/page/wheel.spec.ts b/tests/page/wheel.spec.ts
index 12d59e99e9..79b7a8748a 100644
--- a/tests/page/wheel.spec.ts
+++ b/tests/page/wheel.spec.ts
@@ -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 }) => {