fix(test): wait for load state before checking opener of popup (#714)
This commit is contained in:
parent
2bef4aea03
commit
38b5f76d6e
|
|
@ -143,7 +143,7 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FF
|
|||
await page.goto(server.EMPTY_PAGE);
|
||||
await page.setContent('<a target=_blank rel="opener" href="/one-style.html">yo</a>');
|
||||
const [popup] = await Promise.all([
|
||||
new Promise(x => page.once('popup', x)),
|
||||
page.waitForEvent('popup').then(async popup => { await popup.waitForLoadState(); return popup; }),
|
||||
page.click('a'),
|
||||
]);
|
||||
expect(await page.evaluate(() => !!window.opener)).toBe(false);
|
||||
|
|
|
|||
Loading…
Reference in a new issue