Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
test: cleanup bad usages of pageTest (#6430)
Dmitry Gozman217cbe3e2128
diff --git a/package-lock.json b/package-lock.jsonindex b72944e4e4..90948e1667 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,6 +1,6 @@{"name": "playwright-internal",- "version": "1.11.0-next",+ "version": "1.12.0-next","lockfileVersion": 1,"requires": true,"dependencies": {diff --git a/tests/browsercontext-viewport.spec.ts b/tests/browsercontext-viewport.spec.tsindex 99f6e46507..725f48b07b 100644--- a/tests/browsercontext-viewport.spec.ts+++ b/tests/browsercontext-viewport.spec.ts@@ -15,13 +15,10 @@* limitations under the License.*/-import { test as it, expect } from './config/pageTest';+import { contextTest as it, expect } from './config/browserTest';import { browserTest } from './config/browserTest';import { verifyViewport } from './config/utils';-it.skip(({ isAndroid }) => isAndroid, 'Default viewport is null');-it.skip(({ isElectron }) => isElectron, 'Default viewport is null');-it('should get the proper default viewport size', async ({page, server}) => {await verifyViewport(page, 1280, 720);});diff --git a/tests/chromium/chromium.spec.ts b/tests/chromium/chromium.spec.tsindex 324c078f59..f21326a8ab 100644--- a/tests/chromium/chromium.spec.ts+++ b/tests/chromium/chromium.spec.ts@@ -15,16 +15,14 @@* limitations under the License.*/-import { test as pageTest, expect } from '../config/pageTest';+import { contextTest as test, expect } from '../config/browserTest';import { playwrightTest } from '../config/browserTest';import http from 'http';-pageTest.describe('chromium', () => {- pageTest.skip(({ browserName }) => browserName !== 'chromium');- pageTest.skip(({ isAndroid }) => isAndroid);- pageTest.skip(({ isElectron }) => isElectron);+test.describe('chromium', () => {+ test.skip(({ browserName }) => browserName !== 'chromium');- pageTest('should create a worker from a service worker', async ({page, server}) => {+ test('should create a worker from a service worker', async ({page, server}) => {const [worker] = await Promise.all([page.context().waitForEvent('serviceworker'),page.goto(server.PREFIX + '/serviceworkers/empty/sw.html')@@ -32,7 +30,7 @@ pageTest.describe('chromium', () => {expect(await worker.evaluate(() => self.toString())).toBe('[object ServiceWorkerGlobalScope]');});- pageTest('serviceWorkers() should return current workers', async ({page, server}) => {+ test('serviceWorkers() should return current workers', async ({page, server}) => {const context = page.context();const [worker1] = await Promise.all([context.waitForEvent('serviceworker'),@@ -51,7 +49,7 @@ pageTest.describe('chromium', () => {expect(workers).toContain(worker2);});- pageTest('should not create a worker from a shared worker', async ({page, server}) => {+ test('should not create a worker from a shared worker', async ({page, server}) => {await page.goto(server.EMPTY_PAGE);let serviceWorkerCreated;page.context().once('serviceworker', () => serviceWorkerCreated = true);@@ -61,7 +59,7 @@ pageTest.describe('chromium', () => {expect(serviceWorkerCreated).not.toBeTruthy();});- pageTest('Page.route should work with intervention headers', async ({server, page}) => {+ test('Page.route should work with intervention headers', async ({server, page}) => {server.setRoute('/intervention', (req, res) => res.end(`<script>document.write('<script src="${server.CROSS_PROCESS_PREFIX}/intervention.js">' + '</scr' + 'ipt>');diff --git a/tests/chromium/css-coverage.spec.ts b/tests/chromium/css-coverage.spec.tsindex 965c858cbd..a041bdcdb9 100644--- a/tests/chromium/css-coverage.spec.ts+++ b/tests/chromium/css-coverage.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { contextTest as it, expect } from '../config/browserTest';it.describe('CSS Coverage', () => {it.skip(({ browserName }) => browserName !== 'chromium');diff --git a/tests/chromium/js-coverage.spec.ts b/tests/chromium/js-coverage.spec.tsindex d91c6722ab..42d94605bd 100644--- a/tests/chromium/js-coverage.spec.ts+++ b/tests/chromium/js-coverage.spec.ts@@ -14,11 +14,10 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { contextTest as it, expect } from '../config/browserTest';it.describe('JS Coverage', () => {it.skip(({ browserName }) => browserName !== 'chromium');- it.fixme(({ isElectron }) => isElectron);it('should work', async function({page, server}) {await page.coverage.startJSCoverage();diff --git a/tests/chromium/session.spec.ts b/tests/chromium/session.spec.tsindex d6a3185ee1..74e61f8bdf 100644--- a/tests/chromium/session.spec.ts+++ b/tests/chromium/session.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { contextTest as it, expect } from '../config/browserTest';import { browserTest } from '../config/browserTest';it.describe('session', () => {diff --git a/tests/config/android.config.ts b/tests/config/android.config.tsindex bc9cd90ddb..964efd09b4 100644--- a/tests/config/android.config.ts+++ b/tests/config/android.config.ts@@ -16,7 +16,7 @@import * as folio from 'folio';import * as path from 'path';-import { test as pageTest } from './pageTest';+import { test as pageTest } from '../page/pageTest';import { AndroidEnv, androidTest } from './androidTest';import type { BrowserContext } from '../../index';diff --git a/tests/config/default.config.ts b/tests/config/default.config.tsindex 056c86e985..d3d7e0087e 100644--- a/tests/config/default.config.ts+++ b/tests/config/default.config.ts@@ -17,7 +17,7 @@import * as folio from 'folio';import * as path from 'path';import { playwrightTest, slowPlaywrightTest, contextTest, tracingTest } from './browserTest';-import { test as pageTest } from './pageTest';+import { test as pageTest } from '../page/pageTest';import { BrowserName, CommonArgs } from './baseTest';import type { Browser, BrowserContext } from '../../index';diff --git a/tests/config/electron.config.ts b/tests/config/electron.config.tsindex c232c28d2e..06bdf0932d 100644--- a/tests/config/electron.config.ts+++ b/tests/config/electron.config.ts@@ -17,7 +17,7 @@import * as folio from 'folio';import * as path from 'path';import { baseElectronTest, ElectronEnv, electronTest } from './electronTest';-import { test as pageTest } from './pageTest';+import { test as pageTest } from '../page/pageTest';const config: folio.Config = {testDir: path.join(__dirname, '..'),diff --git a/tests/emulation-focus.spec.ts b/tests/emulation-focus.spec.tsindex b7f66dd68b..c2f9fb3671 100644--- a/tests/emulation-focus.spec.ts+++ b/tests/emulation-focus.spec.ts@@ -15,17 +15,14 @@* limitations under the License.*/-import { test as it, expect } from './config/pageTest';-import { browserTest } from './config/browserTest';+import { contextTest as it, browserTest, expect } from './config/browserTest';import { attachFrame } from './config/utils';it('should think that it is focused by default', async ({page}) => {expect(await page.evaluate('document.hasFocus()')).toBe(true);});-it('should think that all pages are focused', async ({page, isElectron}) => {- it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');-+it('should think that all pages are focused', async ({page}) => {const page2 = await page.context().newPage();expect(await page.evaluate('document.hasFocus()')).toBe(true);expect(await page2.evaluate('document.hasFocus()')).toBe(true);@@ -42,9 +39,7 @@ it('should focus popups by default', async ({page, server}) => {expect(await page.evaluate('document.hasFocus()')).toBe(true);});-it('should provide target for keyboard events', async ({page, server, isElectron}) => {- it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');-+it('should provide target for keyboard events', async ({page, server}) => {const page2 = await page.context().newPage();await Promise.all([page.goto(server.PREFIX + '/input/textarea.html'),@@ -67,9 +62,7 @@ it('should provide target for keyboard events', async ({page, server, isElectronexpect(results).toEqual([text, text2]);});-it('should not affect mouse event target page', async ({page, server, isElectron}) => {- it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');-+it('should not affect mouse event target page', async ({page, server}) => {const page2 = await page.context().newPage();function clickCounter() {document.onclick = () => window['clickCount'] = (window['clickCount'] || 0) + 1;@@ -91,9 +84,7 @@ it('should not affect mouse event target page', async ({page, server, isElectronexpect(counters).toEqual([1,1]);});-it('should change document.activeElement', async ({page, server, isElectron}) => {- it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');-+it('should change document.activeElement', async ({page, server}) => {const page2 = await page.context().newPage();await Promise.all([page.goto(server.PREFIX + '/input/textarea.html'),@@ -110,10 +101,8 @@ it('should change document.activeElement', async ({page, server, isElectron}) =>expect(active).toEqual(['INPUT', 'TEXTAREA']);});-it('should not affect screenshots', async ({page, server, browserName, headful, isElectron, isAndroid}) => {+it('should not affect screenshots', async ({page, server, browserName, headful}) => {it.skip(browserName === 'firefox' && headful);- it.skip(isAndroid);- it.fixme(isElectron, 'BrowserContext.newPage does not work in Electron');// Firefox headful produces a different image.const page2 = await page.context().newPage();diff --git a/tests/page/elementhandle-bounding-box.spec.ts b/tests/page/elementhandle-bounding-box.spec.tsindex 64dff77f53..17f8e259c3 100644--- a/tests/page/elementhandle-bounding-box.spec.ts+++ b/tests/page/elementhandle-bounding-box.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { browserTest } from '../config/browserTest';it.skip(({ isAndroid }) => isAndroid);diff --git a/tests/page/elementhandle-click.spec.ts b/tests/page/elementhandle-click.spec.tsindex 9b7fc204c3..a562811fc8 100644--- a/tests/page/elementhandle-click.spec.ts+++ b/tests/page/elementhandle-click.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({ page, server }) => {await page.goto(server.PREFIX + '/input/button.html');diff --git a/tests/page/elementhandle-content-frame.spec.ts b/tests/page/elementhandle-content-frame.spec.tsindex 4ec54e62ad..3ad16fe1a7 100644--- a/tests/page/elementhandle-content-frame.spec.ts+++ b/tests/page/elementhandle-content-frame.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';it('should work', async ({ page, server }) => {diff --git a/tests/page/elementhandle-convenience.spec.ts b/tests/page/elementhandle-convenience.spec.tsindex 532aecdc54..db3c5d382f 100644--- a/tests/page/elementhandle-convenience.spec.ts+++ b/tests/page/elementhandle-convenience.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should have a nice preview', async ({ page, server }) => {await page.goto(`${server.PREFIX}/dom.html`);diff --git a/tests/page/elementhandle-eval-on-selector.spec.ts b/tests/page/elementhandle-eval-on-selector.spec.tsindex 2c4c8a5b09..ce612cc9e4 100644--- a/tests/page/elementhandle-eval-on-selector.spec.ts+++ b/tests/page/elementhandle-eval-on-selector.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({page, server}) => {await page.setContent('<html><body><div class="tweet"><div class="like">100</div><div class="retweets">10</div></div></body></html>');diff --git a/tests/page/elementhandle-misc.spec.ts b/tests/page/elementhandle-misc.spec.tsindex e939514537..cc7f83bf45 100644--- a/tests/page/elementhandle-misc.spec.ts+++ b/tests/page/elementhandle-misc.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should hover', async ({ page, server }) => {await page.goto(server.PREFIX + '/input/scrollable.html');diff --git a/tests/page/elementhandle-owner-frame.spec.ts b/tests/page/elementhandle-owner-frame.spec.tsindex 10ecdc4434..d7273e047a 100644--- a/tests/page/elementhandle-owner-frame.spec.ts+++ b/tests/page/elementhandle-owner-frame.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';it('should work', async ({ page, server }) => {diff --git a/tests/page/elementhandle-press.spec.ts b/tests/page/elementhandle-press.spec.tsindex d36040c85a..2e0a3ce934 100644--- a/tests/page/elementhandle-press.spec.ts+++ b/tests/page/elementhandle-press.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({ page }) => {await page.setContent(`<input type='text' />`);diff --git a/tests/page/elementhandle-query-selector.spec.ts b/tests/page/elementhandle-query-selector.spec.tsindex b67ad7a7a1..128caa3020 100644--- a/tests/page/elementhandle-query-selector.spec.ts+++ b/tests/page/elementhandle-query-selector.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should query existing element', async ({page, server}) => {await page.goto(server.PREFIX + '/playground.html');diff --git a/tests/page/elementhandle-screenshot.spec.ts b/tests/page/elementhandle-screenshot.spec.tsindex a2d90ec45f..f292535279 100644--- a/tests/page/elementhandle-screenshot.spec.ts+++ b/tests/page/elementhandle-screenshot.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { verifyViewport } from '../config/utils';import path from 'path';import fs from 'fs';diff --git a/tests/page/elementhandle-scroll-into-view.spec.ts b/tests/page/elementhandle-scroll-into-view.spec.tsindex c8391d06f8..f3722e2fc0 100644--- a/tests/page/elementhandle-scroll-into-view.spec.ts+++ b/tests/page/elementhandle-scroll-into-view.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({ page, server, isAndroid }) => {it.fixme(isAndroid);diff --git a/tests/page/elementhandle-select-text.spec.ts b/tests/page/elementhandle-select-text.spec.tsindex 69fc72d5ba..92e295f500 100644--- a/tests/page/elementhandle-select-text.spec.ts+++ b/tests/page/elementhandle-select-text.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should select textarea', async ({ page, server, isFirefox }) => {await page.goto(server.PREFIX + '/input/textarea.html');diff --git a/tests/page/elementhandle-type.spec.ts b/tests/page/elementhandle-type.spec.tsindex b6356b08f8..a54b348db9 100644--- a/tests/page/elementhandle-type.spec.ts+++ b/tests/page/elementhandle-type.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({ page }) => {await page.setContent(`<input type='text' />`);diff --git a/tests/page/elementhandle-wait-for-element-state.spec.ts b/tests/page/elementhandle-wait-for-element-state.spec.tsindex b01b84fffc..7a44828265 100644--- a/tests/page/elementhandle-wait-for-element-state.spec.ts+++ b/tests/page/elementhandle-wait-for-element-state.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';async function giveItAChanceToResolve(page) {for (let i = 0; i < 5; i++)diff --git a/tests/page/eval-on-selector-all.spec.ts b/tests/page/eval-on-selector-all.spec.tsindex 5295aa1dff..008a103efc 100644--- a/tests/page/eval-on-selector-all.spec.ts+++ b/tests/page/eval-on-selector-all.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work with css selector', async ({page, server}) => {await page.setContent('<div>hello</div><div>beautiful</div><div>world!</div>');diff --git a/tests/page/eval-on-selector.spec.ts b/tests/page/eval-on-selector.spec.tsindex d86df1dac2..a1f8bb1fc7 100644--- a/tests/page/eval-on-selector.spec.ts+++ b/tests/page/eval-on-selector.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work with css selector', async ({page, server}) => {await page.setContent('<section id="testAttribute">43543</section>');diff --git a/tests/page/frame-evaluate.spec.ts b/tests/page/frame-evaluate.spec.tsindex 30e754d7bf..59692d382f 100644--- a/tests/page/frame-evaluate.spec.ts+++ b/tests/page/frame-evaluate.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame, detachFrame } from '../config/utils';import type { Frame } from '../../src/client/frame';diff --git a/tests/page/frame-frame-element.spec.ts b/tests/page/frame-frame-element.spec.tsindex 8473020271..4941f2f6cf 100644--- a/tests/page/frame-frame-element.spec.ts+++ b/tests/page/frame-frame-element.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';it('should work', async ({page, server}) => {diff --git a/tests/page/frame-goto.spec.ts b/tests/page/frame-goto.spec.tsindex 129ed4f004..703e84137a 100644--- a/tests/page/frame-goto.spec.ts+++ b/tests/page/frame-goto.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';it('should navigate subframes', async ({page, server}) => {diff --git a/tests/page/frame-hierarchy.spec.ts b/tests/page/frame-hierarchy.spec.tsindex c63d56dedc..191bc831e8 100644--- a/tests/page/frame-hierarchy.spec.ts+++ b/tests/page/frame-hierarchy.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame, detachFrame } from '../config/utils';import type { Frame } from '../../index';diff --git a/tests/page/interception.spec.ts b/tests/page/interception.spec.tsindex 53527431b5..e6c07f2950 100644--- a/tests/page/interception.spec.ts+++ b/tests/page/interception.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { globToRegex } from '../../lib/client/clientHelper';import vm from 'vm';diff --git a/tests/page/jshandle-as-element.spec.ts b/tests/page/jshandle-as-element.spec.tsindex 3530ed6d9e..883191754a 100644--- a/tests/page/jshandle-as-element.spec.ts+++ b/tests/page/jshandle-as-element.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test, expect } from '../config/pageTest';+import { test, expect } from './pageTest';test('should work', async ({page}) => {const aHandle = await page.evaluateHandle(() => document.body);diff --git a/tests/page/jshandle-evaluate.spec.ts b/tests/page/jshandle-evaluate.spec.tsindex d8b3eefdfa..bec6e8da05 100644--- a/tests/page/jshandle-evaluate.spec.ts+++ b/tests/page/jshandle-evaluate.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work with function', async ({page}) => {const windowHandle = await page.evaluateHandle(() => {diff --git a/tests/page/jshandle-json-value.spec.ts b/tests/page/jshandle-json-value.spec.tsindex f38017b51d..aa03d177d2 100644--- a/tests/page/jshandle-json-value.spec.ts+++ b/tests/page/jshandle-json-value.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({page}) => {const aHandle = await page.evaluateHandle(() => ({foo: 'bar'}));diff --git a/tests/page/jshandle-properties.spec.ts b/tests/page/jshandle-properties.spec.tsindex aa4b89ff25..543241bc12 100644--- a/tests/page/jshandle-properties.spec.ts+++ b/tests/page/jshandle-properties.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import type { ElementHandle } from '../../index';it('should work', async ({page}) => {diff --git a/tests/page/jshandle-to-string.spec.ts b/tests/page/jshandle-to-string.spec.tsindex e2add5adfe..43cd68001a 100644--- a/tests/page/jshandle-to-string.spec.ts+++ b/tests/page/jshandle-to-string.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work for primitives', async ({page}) => {const numberHandle = await page.evaluateHandle(() => 2);diff --git a/tests/page/network-post-data.spec.ts b/tests/page/network-post-data.spec.tsindex 4e3a39fbc9..e75023618f 100644--- a/tests/page/network-post-data.spec.ts+++ b/tests/page/network-post-data.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it.fixme(({ isAndroid }) => isAndroid, 'Post data does not work');diff --git a/tests/page/page-accessibility.spec.ts b/tests/page/page-accessibility.spec.tsindex 16fb5a3eef..c5d29f2be5 100644--- a/tests/page/page-accessibility.spec.ts+++ b/tests/page/page-accessibility.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({ page, isFirefox, isChromium }) => {await page.setContent(`diff --git a/tests/page/page-add-init-script.spec.ts b/tests/page/page-add-init-script.spec.tsindex 86cc52acb0..7216f63ec0 100644--- a/tests/page/page-add-init-script.spec.ts+++ b/tests/page/page-add-init-script.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should evaluate before anything else on the page', async ({ page, server }) => {await page.addInitScript(function() {diff --git a/tests/page/page-add-script-tag.spec.ts b/tests/page/page-add-script-tag.spec.tsindex ddbea94340..5e61b6d58d 100644--- a/tests/page/page-add-script-tag.spec.ts+++ b/tests/page/page-add-script-tag.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import path from 'path';it('should throw an error if no options are provided', async ({page, server}) => {diff --git a/tests/page/page-add-style-tag.spec.ts b/tests/page/page-add-style-tag.spec.tsindex e334d829a0..1587ea9ec9 100644--- a/tests/page/page-add-style-tag.spec.ts+++ b/tests/page/page-add-style-tag.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import path from 'path';it('should throw an error if no options are provided', async ({page, server}) => {diff --git a/tests/page/page-autowaiting-basic.spec.ts b/tests/page/page-autowaiting-basic.spec.tsindex 7a4a694cda..ea14812241 100644--- a/tests/page/page-autowaiting-basic.spec.ts+++ b/tests/page/page-autowaiting-basic.spec.ts@@ -16,7 +16,7 @@*/import { TestServer } from '../../utils/testserver';-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';function initServer(server: TestServer): string[] {const messages = [];diff --git a/tests/page/page-autowaiting-no-hang.spec.ts b/tests/page/page-autowaiting-no-hang.spec.tsindex 16634221f8..03c097febf 100644--- a/tests/page/page-autowaiting-no-hang.spec.ts+++ b/tests/page/page-autowaiting-no-hang.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it } from '../config/pageTest';+import { test as it } from './pageTest';it('clicking on links which do not commit navigation', async ({page, server, httpsServer}) => {await page.goto(server.EMPTY_PAGE);diff --git a/tests/page/page-basic.spec.ts b/tests/page/page-basic.spec.tsindex fe754c8554..aa59aafaf0 100644--- a/tests/page/page-basic.spec.ts+++ b/tests/page/page-basic.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should reject all promises when page is closed', async ({page}) => {let error = null;diff --git a/tests/page/page-check.spec.ts b/tests/page/page-check.spec.tsindex 69fba491b1..7b9bf1f412 100644--- a/tests/page/page-check.spec.ts+++ b/tests/page/page-check.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should check the box', async ({page}) => {await page.setContent(`<input id='checkbox' type='checkbox'></input>`);diff --git a/tests/page/page-click-react.spec.ts b/tests/page/page-click-react.spec.tsindex 615ab1047b..c72a15825e 100644--- a/tests/page/page-click-react.spec.ts+++ b/tests/page/page-click-react.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';declare const renderComponent;declare const e;diff --git a/tests/page/page-click-scroll.spec.ts b/tests/page/page-click-scroll.spec.tsindex 5823d16574..7c731ae1e5 100644--- a/tests/page/page-click-scroll.spec.ts+++ b/tests/page/page-click-scroll.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { test as it } from '../config/pageTest';+import { test as it } from './pageTest';it('should not hit scroll bar', async ({page, isAndroid, isWebKit, platform}) => {it.fixme(isWebKit && platform === 'darwin');diff --git a/tests/page/page-click-timeout-1.spec.ts b/tests/page/page-click-timeout-1.spec.tsindex 5e90ed5e47..90658751db 100644--- a/tests/page/page-click-timeout-1.spec.ts+++ b/tests/page/page-click-timeout-1.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should avoid side effects after timeout', async ({page, server, mode}) => {it.skip(mode !== 'default');diff --git a/tests/page/page-click-timeout-2.spec.ts b/tests/page/page-click-timeout-2.spec.tsindex 7fc79b5f6a..3276d2dbaf 100644--- a/tests/page/page-click-timeout-2.spec.ts+++ b/tests/page/page-click-timeout-2.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should timeout waiting for display:none to be gone', async ({page, server}) => {await page.goto(server.PREFIX + '/input/button.html');diff --git a/tests/page/page-click-timeout-3.spec.ts b/tests/page/page-click-timeout-3.spec.tsindex 341e6a332d..90d29160d1 100644--- a/tests/page/page-click-timeout-3.spec.ts+++ b/tests/page/page-click-timeout-3.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should fail when element jumps during hit testing', async ({page, mode}) => {it.skip(mode !== 'default');diff --git a/tests/page/page-click-timeout-4.spec.ts b/tests/page/page-click-timeout-4.spec.tsindex 9510aaeab2..bde1c61d9d 100644--- a/tests/page/page-click-timeout-4.spec.ts+++ b/tests/page/page-click-timeout-4.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should timeout waiting for stable position', async ({page, server}) => {await page.goto(server.PREFIX + '/input/button.html');diff --git a/tests/page/page-click.spec.ts b/tests/page/page-click.spec.tsindex 37bcfd3deb..63d302ed14 100644--- a/tests/page/page-click.spec.ts+++ b/tests/page/page-click.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';async function giveItAChanceToClick(page) {diff --git a/tests/page/page-close.spec.ts b/tests/page/page-close.spec.tsindex ab21212ddc..bf079fe9fd 100644--- a/tests/page/page-close.spec.ts+++ b/tests/page/page-close.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should close page with active dialog', async ({page}) => {await page.setContent(`<button onclick="setTimeout(() => alert(1))">alert</button>`);diff --git a/tests/page/page-dialog.spec.ts b/tests/page/page-dialog.spec.tsindex 3b38283854..46e39237c3 100644--- a/tests/page/page-dialog.spec.ts+++ b/tests/page/page-dialog.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should fire', async ({page, server}) => {page.on('dialog', dialog => {diff --git a/tests/page/page-dispatchevent.spec.ts b/tests/page/page-dispatchevent.spec.tsindex 74ec960072..643b33153c 100644--- a/tests/page/page-dispatchevent.spec.ts+++ b/tests/page/page-dispatchevent.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should dispatch click event', async ({page, server}) => {await page.goto(server.PREFIX + '/input/button.html');diff --git a/tests/page/page-drag.spec.ts b/tests/page/page-drag.spec.tsindex eb5f0cbe1c..54d8f3207a 100644--- a/tests/page/page-drag.spec.ts+++ b/tests/page/page-drag.spec.ts@@ -15,7 +15,7 @@*/import type { ElementHandle } from '../../index';-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';it.describe('Drag and drop', () => {diff --git a/tests/page/page-emulate-media.spec.ts b/tests/page/page-emulate-media.spec.tsindex df26c85117..0638bc557e 100644--- a/tests/page/page-emulate-media.spec.ts+++ b/tests/page/page-emulate-media.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it.skip(({ isAndroid }) => isAndroid);diff --git a/tests/page/page-evaluate-handle.spec.ts b/tests/page/page-evaluate-handle.spec.tsindex a0d74161fa..b8609d5269 100644--- a/tests/page/page-evaluate-handle.spec.ts+++ b/tests/page/page-evaluate-handle.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({page}) => {const windowHandle = await page.evaluateHandle(() => window);diff --git a/tests/page/page-evaluate-no-stall.spec.ts b/tests/page/page-evaluate-no-stall.spec.tsindex cead2d2d06..6ac5594ec7 100644--- a/tests/page/page-evaluate-no-stall.spec.ts+++ b/tests/page/page-evaluate-no-stall.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { test, expect } from '../config/pageTest';+import { test, expect } from './pageTest';test.describe('non-stalling evaluate', () => {test.skip(({mode}) => mode !== 'default');diff --git a/tests/page/page-evaluate.spec.ts b/tests/page/page-evaluate.spec.tsindex 47350b7dba..99ed4cd3b2 100644--- a/tests/page/page-evaluate.spec.ts+++ b/tests/page/page-evaluate.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({ page }) => {const result = await page.evaluate(() => 7 * 3);diff --git a/tests/page/page-event-console.spec.ts b/tests/page/page-event-console.spec.tsindex 01b2b71d09..f0ee53e7a5 100644--- a/tests/page/page-event-console.spec.ts+++ b/tests/page/page-event-console.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import util from 'util';it('should work', async ({page}) => {diff --git a/tests/page/page-event-crash.spec.ts b/tests/page/page-event-crash.spec.tsindex 25c68c116a..4c77974785 100644--- a/tests/page/page-event-crash.spec.ts+++ b/tests/page/page-event-crash.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import * as os from 'os';function crash({ page, toImpl, browserName, platform, mode }: any) {diff --git a/tests/page/page-event-network.spec.ts b/tests/page/page-event-network.spec.tsindex d22f647c82..76b597a6d3 100644--- a/tests/page/page-event-network.spec.ts+++ b/tests/page/page-event-network.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('Page.Events.Request', async ({page, server}) => {const requests = [];diff --git a/tests/page/page-event-pageerror.spec.ts b/tests/page/page-event-pageerror.spec.tsindex cea1bad416..5cd532d8af 100644--- a/tests/page/page-event-pageerror.spec.ts+++ b/tests/page/page-event-pageerror.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should fire', async ({page, server, isWebKit}) => {const [error] = await Promise.all([diff --git a/tests/page/page-event-popup.spec.ts b/tests/page/page-event-popup.spec.tsindex 77519310cf..8c72d46a72 100644--- a/tests/page/page-event-popup.spec.ts+++ b/tests/page/page-event-popup.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({page}) => {const [popup] = await Promise.all([diff --git a/tests/page/page-event-request.spec.ts b/tests/page/page-event-request.spec.tsindex 04ed5e1eaf..7c277db200 100644--- a/tests/page/page-event-request.spec.ts+++ b/tests/page/page-event-request.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';it('should fire for navigation requests', async ({page, server}) => {diff --git a/tests/page/page-expose-function.spec.ts b/tests/page/page-expose-function.spec.tsindex 0c29440dc8..becd285dcd 100644--- a/tests/page/page-expose-function.spec.ts+++ b/tests/page/page-expose-function.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';import type { ElementHandle } from '../../index';diff --git a/tests/page/page-fill.spec.ts b/tests/page/page-fill.spec.tsindex 7d8b020148..fe0fd7efbf 100644--- a/tests/page/page-fill.spec.ts+++ b/tests/page/page-fill.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';async function giveItAChanceToFill(page) {for (let i = 0; i < 5; i++)diff --git a/tests/page/page-focus.spec.ts b/tests/page/page-focus.spec.tsindex 9502d7b6cc..5658767645 100644--- a/tests/page/page-focus.spec.ts+++ b/tests/page/page-focus.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async function({page, browserName}) {it.skip(browserName === 'firefox');diff --git a/tests/page/page-goto.spec.ts b/tests/page/page-goto.spec.tsindex 999ec2e420..fb67837bb8 100644--- a/tests/page/page-goto.spec.ts+++ b/tests/page/page-goto.spec.ts@@ -17,7 +17,7 @@import url from 'url';import os from 'os';-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { expectedSSLError } from '../config/utils';it('should work', async ({page, server}) => {diff --git a/tests/page/page-history.spec.ts b/tests/page/page-history.spec.tsindex 743e7e94a6..9dd7815023 100644--- a/tests/page/page-history.spec.ts+++ b/tests/page/page-history.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import url from 'url';it('page.goBack should work', async ({page, server}) => {diff --git a/tests/page/page-keyboard.spec.ts b/tests/page/page-keyboard.spec.tsindex 37cd155596..bb1e7203b2 100644--- a/tests/page/page-keyboard.spec.ts+++ b/tests/page/page-keyboard.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';it.skip(({ isAndroid }) => isAndroid);diff --git a/tests/page/page-mouse.spec.ts b/tests/page/page-mouse.spec.tsindex eb75ad67ec..7012fa4ed0 100644--- a/tests/page/page-mouse.spec.ts+++ b/tests/page/page-mouse.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';function dimensions() {const rect = document.querySelector('textarea').getBoundingClientRect();diff --git a/tests/page/page-navigation.spec.ts b/tests/page/page-navigation.spec.tsindex 1781658f8c..a2fc4452d1 100644--- a/tests/page/page-navigation.spec.ts+++ b/tests/page/page-navigation.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it } from '../config/pageTest';+import { test as it } from './pageTest';it('should work with _blank target', async ({page, server}) => {server.setRoute('/empty.html', (req, res) => {diff --git a/tests/page/page-network-idle.spec.ts b/tests/page/page-network-idle.spec.tsindex 0c5f761ada..00503e2b29 100644--- a/tests/page/page-network-idle.spec.ts+++ b/tests/page/page-network-idle.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import type { Frame } from '../../index';import { TestServer } from '../../utils/testserver';diff --git a/tests/page/page-network-request.spec.ts b/tests/page/page-network-request.spec.tsindex 230c049cbb..053a00773f 100644--- a/tests/page/page-network-request.spec.ts+++ b/tests/page/page-network-request.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';it('should work for main frame navigation request', async ({page, server}) => {diff --git a/tests/page/page-network-response.spec.ts b/tests/page/page-network-response.spec.tsindex ab8f4872d2..1c2090bf24 100644--- a/tests/page/page-network-response.spec.ts+++ b/tests/page/page-network-response.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import fs from 'fs';it('should work', async ({page, server}) => {diff --git a/tests/page/page-request-continue.spec.ts b/tests/page/page-request-continue.spec.tsindex 44cb43f859..71876b435f 100644--- a/tests/page/page-request-continue.spec.ts+++ b/tests/page/page-request-continue.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({page, server}) => {await page.route('**/*', route => route.continue());diff --git a/tests/page/page-request-fulfill.spec.ts b/tests/page/page-request-fulfill.spec.tsindex 1e30af9ae2..5827966ca7 100644--- a/tests/page/page-request-fulfill.spec.ts+++ b/tests/page/page-request-fulfill.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import fs from 'fs';it('should work', async ({page, server}) => {diff --git a/tests/page/page-route.spec.ts b/tests/page/page-route.spec.tsindex ee0387def4..c65b0f9ffd 100644--- a/tests/page/page-route.spec.ts+++ b/tests/page/page-route.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should intercept', async ({page, server}) => {let intercepted = false;diff --git a/tests/page/page-screenshot.spec.ts b/tests/page/page-screenshot.spec.tsindex cdf5dbddc9..28c7b5c68e 100644--- a/tests/page/page-screenshot.spec.ts+++ b/tests/page/page-screenshot.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { verifyViewport } from '../config/utils';import path from 'path';import fs from 'fs';diff --git a/tests/page/page-select-option.spec.ts b/tests/page/page-select-option.spec.tsindex fab6992fff..5d0f1fc340 100644--- a/tests/page/page-select-option.spec.ts+++ b/tests/page/page-select-option.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';async function giveItAChanceToResolve(page) {for (let i = 0; i < 5; i++)diff --git a/tests/page/page-set-content.spec.ts b/tests/page/page-set-content.spec.tsindex 16b0cbf9d5..8492d97f79 100644--- a/tests/page/page-set-content.spec.ts+++ b/tests/page/page-set-content.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';const expectedOutput = '<html><head></head><body><div>hello</div></body></html>';diff --git a/tests/page/page-set-extra-http-headers.spec.ts b/tests/page/page-set-extra-http-headers.spec.tsindex 6df65ee88a..971f79caf8 100644--- a/tests/page/page-set-extra-http-headers.spec.ts+++ b/tests/page/page-set-extra-http-headers.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({page, server}) => {await page.setExtraHTTPHeaders({diff --git a/tests/page/page-set-input-files.spec.ts b/tests/page/page-set-input-files.spec.tsindex 3e392c6a95..c1544a2715 100644--- a/tests/page/page-set-input-files.spec.ts+++ b/tests/page/page-set-input-files.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import path from 'path';import fs from 'fs';diff --git a/tests/page/page-wait-for-function.spec.ts b/tests/page/page-wait-for-function.spec.tsindex 77de880281..4fad653991 100644--- a/tests/page/page-wait-for-function.spec.ts+++ b/tests/page/page-wait-for-function.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should timeout', async ({page}) => {const startTime = Date.now();diff --git a/tests/page/page-wait-for-load-state.spec.ts b/tests/page/page-wait-for-load-state.spec.tsindex 82c84f7a14..14be071711 100644--- a/tests/page/page-wait-for-load-state.spec.ts+++ b/tests/page/page-wait-for-load-state.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import type { Route } from '../../index';it('should pick up ongoing navigation', async ({page, server}) => {diff --git a/tests/page/page-wait-for-navigation.spec.ts b/tests/page/page-wait-for-navigation.spec.tsindex a55550e4b5..336e2e3708 100644--- a/tests/page/page-wait-for-navigation.spec.ts+++ b/tests/page/page-wait-for-navigation.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import type { Frame } from '../../index';import { expectedSSLError } from '../config/utils';diff --git a/tests/page/page-wait-for-request.spec.ts b/tests/page/page-wait-for-request.spec.tsindex a42cd81b25..5ab8acf4b6 100644--- a/tests/page/page-wait-for-request.spec.ts+++ b/tests/page/page-wait-for-request.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import vm from 'vm';it('should work', async ({page, server}) => {diff --git a/tests/page/page-wait-for-response.spec.ts b/tests/page/page-wait-for-response.spec.tsindex 844dae592c..677b6a1893 100644--- a/tests/page/page-wait-for-response.spec.ts+++ b/tests/page/page-wait-for-response.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({page, server}) => {await page.goto(server.EMPTY_PAGE);diff --git a/tests/page/page-wait-for-selector-1.spec.ts b/tests/page/page-wait-for-selector-1.spec.tsindex aef147fd7b..b9218b3fcf 100644--- a/tests/page/page-wait-for-selector-1.spec.ts+++ b/tests/page/page-wait-for-selector-1.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame, detachFrame } from '../config/utils';async function giveItTimeToLog(frame) {diff --git a/tests/page/page-wait-for-selector-2.spec.ts b/tests/page/page-wait-for-selector-2.spec.tsindex 08d4a94000..b5e049c810 100644--- a/tests/page/page-wait-for-selector-2.spec.ts+++ b/tests/page/page-wait-for-selector-2.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame, detachFrame } from '../config/utils';const addElement = tag => document.body.appendChild(document.createElement(tag));diff --git a/tests/page/page-wait-for-url.spec.ts b/tests/page/page-wait-for-url.spec.tsindex bbaf56a7bf..a0409a6e52 100644--- a/tests/page/page-wait-for-url.spec.ts+++ b/tests/page/page-wait-for-url.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({page, server}) => {await page.goto(server.EMPTY_PAGE);diff --git a/tests/config/pageTest.ts b/tests/page/pageTest.tssimilarity index 95%rename from tests/config/pageTest.tsrename to tests/page/pageTest.tsindex c63f4f2540..077991466b 100644--- a/tests/config/pageTest.ts+++ b/tests/page/pageTest.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { baseTest } from './baseTest';+import { baseTest } from '../config/baseTest';import type { Page } from '../../index';export { expect } from 'folio';diff --git a/tests/page/queryselector.spec.ts b/tests/page/queryselector.spec.tsindex 1e6477e909..98f8eb4e30 100644--- a/tests/page/queryselector.spec.ts+++ b/tests/page/queryselector.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should throw for non-string selector', async ({page}) => {const error = await page.$(null).catch(e => e);diff --git a/tests/page/selectors-css.spec.ts b/tests/page/selectors-css.spec.tsindex 7d0323dbbf..78128b3979 100644--- a/tests/page/selectors-css.spec.ts+++ b/tests/page/selectors-css.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work with large DOM', async ({page, server}) => {await page.evaluate(() => {diff --git a/tests/page/selectors-misc.spec.ts b/tests/page/selectors-misc.spec.tsindex 7329f5f7c1..808c834bab 100644--- a/tests/page/selectors-misc.spec.ts+++ b/tests/page/selectors-misc.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work for open shadow roots', async ({page, server}) => {await page.goto(server.PREFIX + '/deep-shadow.html');diff --git a/tests/page/selectors-text.spec.ts b/tests/page/selectors-text.spec.tsindex 7521de07ac..9ce4b6fb59 100644--- a/tests/page/selectors-text.spec.ts+++ b/tests/page/selectors-text.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';it('should work', async ({page}) => {await page.setContent(`<div>yo</div><div>ya</div><div>\nye </div>`);diff --git a/tests/page/workers.spec.ts b/tests/page/workers.spec.tsindex ea5ccd1fff..ba14b38797 100644--- a/tests/page/workers.spec.ts+++ b/tests/page/workers.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { test as it, expect } from '../config/pageTest';+import { test as it, expect } from './pageTest';import { attachFrame } from '../config/utils';import type { ConsoleMessage } from '../../index';diff --git a/tests/slowmo.spec.ts b/tests/slowmo.spec.tsindex 5ff328b0c7..5f7986e496 100644--- a/tests/slowmo.spec.ts+++ b/tests/slowmo.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { test as it, expect } from './config/pageTest';+import { contextTest as it, expect } from './config/browserTest';import { attachFrame } from './config/utils';async function checkSlowMo(toImpl, page, task) {diff --git a/tests/web-socket.spec.ts b/tests/web-socket.spec.tsindex bd9816d776..e885b609f5 100644--- a/tests/web-socket.spec.ts+++ b/tests/web-socket.spec.ts@@ -15,11 +15,9 @@* limitations under the License.*/-import { test as it, expect } from './config/pageTest';+import { contextTest as it, expect } from './config/browserTest';import { Server as WebSocketServer } from 'ws';-it.skip(({ isAndroid }) => isAndroid);-it('should work', async ({ page, server }) => {const value = await page.evaluate(port => {let cb;