Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

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

Pavel Feldmane826a4d3f450
diff --git a/test/page.spec.js b/test/page.spec.js
index 5713371f3b..ecad154c40 100644
--- a/test/page.spec.js
+++ b/test/page.spec.js
@@ -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;