mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-03 07:51:12 +03:00
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:
parent
1120b82ba2
commit
b736b0cc2d
@ -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(`
|
||||
|
Loading…
Reference in New Issue
Block a user