mirror of
https://github.com/microsoft/playwright.git
synced 2025-01-05 19:04:43 +03:00
test: popup event for pages opened from iframe (#9484)
This commit is contained in:
parent
c8f875a193
commit
25a8023720
@ -157,3 +157,15 @@ it('should not treat navigations as new popups', async ({ page, server }) => {
|
||||
await page.close();
|
||||
expect(badSecondPopup).toBe(false);
|
||||
});
|
||||
|
||||
it('should report popup opened from iframes', async ({ page, server, browserName }) => {
|
||||
it.fixme(browserName === 'firefox', 'attachedToTarget event comes without openerId');
|
||||
await page.goto(server.PREFIX + '/frames/two-frames.html');
|
||||
const frame = page.frame('uno');
|
||||
expect(frame).toBeTruthy();
|
||||
const [popup] = await Promise.all([
|
||||
page.waitForEvent('popup'),
|
||||
frame.evaluate(() => window.open('')),
|
||||
]);
|
||||
expect(popup).toBeTruthy();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user