Skip to content

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

test: cleanup bad usages of pageTest (#6430)

Dmitry Gozman217cbe3e2128
diff --git a/package-lock.json b/package-lock.json
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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, isElectron
expect(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, isElectron
expect(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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
similarity index 95%
rename from tests/config/pageTest.ts
rename to tests/page/pageTest.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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.ts
index 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;