diff --git a/tests/page/wheel.spec.ts b/tests/page/wheel.spec.ts index 6abcad59ae..60c1a0bbb7 100644 --- a/tests/page/wheel.spec.ts +++ b/tests/page/wheel.spec.ts @@ -67,6 +67,31 @@ it('should dispatch wheel events @smoke', async ({ page, server }) => { }); }); +it('should dispatch wheel events after popup was opened @smoke', async ({ page, server }) => { + await page.setContent(` +
+ `); + await page.mouse.move(50, 60); + await listenForWheelEvents(page, 'div'); + await Promise.all([ + page.waitForEvent('popup'), + page.evaluate(() => window.open('')), + ]); + await page.mouse.wheel(0, 100); + await page.waitForFunction('window.scrollY === 100'); + await expectEvent(page, { + deltaX: 0, + deltaY: 100, + clientX: 50, + clientY: 60, + deltaMode: 0, + ctrlKey: false, + shiftKey: false, + altKey: false, + metaKey: false, + }); +}); + it('should dispatch wheel event on svg element', async ({ page, browserName, headless, isLinux }) => { it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/15566' }); await page.setContent(`