fix: await the popup nav to make the test pass

This commit is contained in:
Pavel 2020-01-06 16:33:27 -08:00
parent 85985155d0
commit 93b0126268

View file

@ -177,7 +177,7 @@ module.exports.describe = function({testRunner, expect, headless, playwright, FF
await page.goto(server.EMPTY_PAGE);
await page.setContent('<a target=_blank rel=noopener href="/one-style.html">yo</a>');
const [popup] = await Promise.all([
page.waitForEvent('popup').then(popup => { popup.waitForLoadState(); return popup; }),
page.waitForEvent('popup').then(async popup => { await popup.waitForLoadState(); return popup; }),
page.click('a'),
]);
let badSecondPopup = false;