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

This commit is contained in:
Yury Semikhatsky 2020-03-20 15:45:20 -07:00 committed by GitHub
parent 16c7a5bd5c
commit 4320d4ba83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();