test: add test with wheel events and opened popup (#20620)

This should be merged once Firefox Stable 1376 is rolled in.

References #19685
This commit is contained in:
Andrey Lushnikov 2023-02-06 14:23:14 -08:00 committed by GitHub
parent 1120b82ba2
commit b736b0cc2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(`
<div style="width: 5000px; height: 5000px;"></div>
`);
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(`