Skip to content

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

test: fix link navigation test so that it passes in Chromium (#1448)

Yury Semikhatsky4320d4ba830c
diff --git a/test/popup.spec.js b/test/popup.spec.js
index 53f3182314..09b33b4061 100644
--- a/test/popup.spec.js
+++ b/test/popup.spec.js
@@ -20,7 +20,7 @@ module.exports.describe = function({testRunner, expect, playwright, CHROMIUM, WE
const {beforeAll, beforeEach, afterAll, afterEach} = testRunner;
describe('Link navigation', function() {
- it.fail(CHROMIUM)('should inherit user agent from browser context', async function({browser, server}) {
+ it('should inherit user agent from browser context', async function({browser, server}) {
const context = await browser.newContext({
userAgent: 'hey'
});
@@ -32,6 +32,7 @@ module.exports.describe = function({testRunner, expect, playwright, CHROMIUM, WE
context.waitForEvent('page'),
page.click('a'),
]);
+ await popup.waitForLoadState({waitUntil: 'domcontentloaded'})
const userAgent = await popup.evaluate(() => window.initialUserAgent);
const request = await requestPromise;
await context.close();