fix: await the popup nav to make the test pass (#391)

This commit is contained in:
Pavel Feldman 2020-01-06 16:34:04 -08:00 committed by GitHub
parent 85985155d0
commit e826a4d3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;