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: roll test-runner to 0.2.8 (#3748)
Pavel Feldman175fc52747d7
diff --git a/package-lock.json b/package-lock.jsonindex d3d770d3c7..fdf93d2e33 100644--- a/package-lock.json+++ b/package-lock.json@@ -1229,9 +1229,9 @@}},"@playwright/test-runner": {- "version": "0.2.5",- "resolved": "https://registry.npmjs.org/@playwright/test-runner/-/test-runner-0.2.5.tgz",- "integrity": "sha512-gFQ+4Eiq4pY9menHX95r+QTOR2WMdsNebIbwoQhL2nJGjle9PwV1SiXl8P8+jJDOKmQ8+xW06+um1d5mSZTtRg==",+ "version": "0.2.8",+ "resolved": "https://registry.npmjs.org/@playwright/test-runner/-/test-runner-0.2.8.tgz",+ "integrity": "sha512-FmUjAgVzVUhnHgC/j3hYZ5yOAhQXREYQtq0jbaV2oQk1b4KklDxo6lsf1nM2mb2SvBSv/gLbvbnpyciC4T/O7w==","dev": true,"requires": {"@babel/code-frame": "^7.10.4",@@ -1242,6 +1242,7 @@"commander": "^6.1.0","expect": "^26.4.2","jpeg-js": "^0.4.2",+ "micromatch": "^4.0.2","ms": "^2.1.2","pirates": "^4.0.1","pixelmatch": "^5.2.1",diff --git a/package.json b/package.jsonindex 1c9da10753..3a03e20e22 100644--- a/package.json+++ b/package.json@@ -54,7 +54,7 @@"@babel/core": "^7.11.4","@babel/preset-env": "^7.11.0","@babel/preset-typescript": "^7.10.4",- "@playwright/test-runner": "^0.2.5",+ "@playwright/test-runner": "^0.2.8","@types/babel__core": "^7.1.9","@types/debug": "^4.1.5","@types/extract-zip": "^1.6.2",diff --git a/test/accessibility.spec.ts b/test/accessibility.spec.tsindex fa98c37763..eded8623eb 100644--- a/test/accessibility.spec.ts+++ b/test/accessibility.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, describe, options } from './playwright.fixtures';it('should work', async function({page}) {await page.setContent(`diff --git a/test/autowaiting-basic.spec.ts b/test/autowaiting-basic.spec.tsindex 3b5ba095d3..20dbd9e4c3 100644--- a/test/autowaiting-basic.spec.ts+++ b/test/autowaiting-basic.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';it('should await navigation when clicking anchor', async ({page, server}) => {const messages = [];diff --git a/test/autowaiting-no-hang.spec.ts b/test/autowaiting-no-hang.spec.tsindex d2b5f57a09..d8bf095660 100644--- a/test/autowaiting-no-hang.spec.ts+++ b/test/autowaiting-no-hang.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('clicking on links which do not commit navigation', async ({page, server, httpsServer}) => {await page.goto(server.EMPTY_PAGE);diff --git a/test/browser.spec.ts b/test/browser.spec.tsindex 960957e411..61379ac5e9 100644--- a/test/browser.spec.ts+++ b/test/browser.spec.ts@@ -13,7 +13,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';it('should create new page', async function({browser}) {const page1 = await browser.newPage();diff --git a/test/browsercontext-add-cookies.spec.ts b/test/browsercontext-add-cookies.spec.tsindex e9da00c1a6..04c6d3c3b4 100644--- a/test/browsercontext-add-cookies.spec.ts+++ b/test/browsercontext-add-cookies.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';it('should work', async ({context, page, server}) => {await page.goto(server.EMPTY_PAGE);diff --git a/test/browsercontext-basic.spec.ts b/test/browsercontext-basic.spec.tsindex 380719ffdf..b1c879bd49 100644--- a/test/browsercontext-basic.spec.ts+++ b/test/browsercontext-basic.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';import utils from './utils';diff --git a/test/browsercontext-clearcookies.spec.ts b/test/browsercontext-clearcookies.spec.tsindex 2cd7d86184..37c320d600 100644--- a/test/browsercontext-clearcookies.spec.ts+++ b/test/browsercontext-clearcookies.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should clear cookies', async ({context, page, server}) => {await page.goto(server.EMPTY_PAGE);diff --git a/test/browsercontext-cookies.spec.ts b/test/browsercontext-cookies.spec.tsindex efa5369e6b..d95920a154 100644--- a/test/browsercontext-cookies.spec.ts+++ b/test/browsercontext-cookies.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';it('should return no cookies in pristine browser context', async ({context, page, server}) => {expect(await context.cookies()).toEqual([]);diff --git a/test/browsercontext-credentials.spec.ts b/test/browsercontext-credentials.spec.tsindex 57e711bb77..126a5c74bb 100644--- a/test/browsercontext-credentials.spec.ts+++ b/test/browsercontext-credentials.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';it('should fail without credentials', test => {test.fail(options.CHROMIUM && !options.HEADLESS);diff --git a/test/browsercontext-csp.spec.ts b/test/browsercontext-csp.spec.tsindex d92e117e38..0cb2dd8c9a 100644--- a/test/browsercontext-csp.spec.ts+++ b/test/browsercontext-csp.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import * as utils from './utils';diff --git a/test/browsercontext-device.spec.ts b/test/browsercontext-device.spec.tsindex 4010386800..7ce197be5a 100644--- a/test/browsercontext-device.spec.ts+++ b/test/browsercontext-device.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, describe, options } from './playwright.fixtures';describe('device', suite => {suite.skip(options.FIREFOX);diff --git a/test/browsercontext-expose-function.spec.ts b/test/browsercontext-expose-function.spec.tsindex 0329521476..b193a59a8c 100644--- a/test/browsercontext-expose-function.spec.ts+++ b/test/browsercontext-expose-function.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('expose binding should work', async ({browser}) => {const context = await browser.newContext();diff --git a/test/browsercontext-locale.spec.ts b/test/browsercontext-locale.spec.tsindex 27646c60bb..abdb0b6fd0 100644--- a/test/browsercontext-locale.spec.ts+++ b/test/browsercontext-locale.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should affect accept-language header', async ({browser, server}) => {const context = await browser.newContext({ locale: 'fr-CH' });diff --git a/test/browsercontext-page-event.spec.ts b/test/browsercontext-page-event.spec.tsindex d2a1062238..ddd31a44bc 100644--- a/test/browsercontext-page-event.spec.ts+++ b/test/browsercontext-page-event.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';it('should have url', async ({browser, server}) => {const context = await browser.newContext();diff --git a/test/browsercontext-route.spec.ts b/test/browsercontext-route.spec.tsindex 47b73dacaa..638692db0d 100644--- a/test/browsercontext-route.spec.ts+++ b/test/browsercontext-route.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should intercept', async ({browser, server}) => {const context = await browser.newContext();diff --git a/test/browsercontext-timezone-id.spec.ts b/test/browsercontext-timezone-id.spec.tsindex 84b61fc393..cdb9827e25 100644--- a/test/browsercontext-timezone-id.spec.ts+++ b/test/browsercontext-timezone-id.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({ browser }) => {const func = () => new Date(1479579154987).toString();diff --git a/test/browsercontext-user-agent.spec.ts b/test/browsercontext-user-agent.spec.tsindex e964eb3693..adc088edbe 100644--- a/test/browsercontext-user-agent.spec.ts+++ b/test/browsercontext-user-agent.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';diff --git a/test/browsercontext-viewport-mobile.spec.ts b/test/browsercontext-viewport-mobile.spec.tsindex 056e0a37b7..7e6085f39b 100644--- a/test/browsercontext-viewport-mobile.spec.ts+++ b/test/browsercontext-viewport-mobile.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, describe, options } from './playwright.fixtures';describe('mobile viewport', suite => {suite.skip(options.FIREFOX);diff --git a/test/browsercontext-viewport.spec.ts b/test/browsercontext-viewport.spec.tsindex dcf175b7a7..be8de82931 100644--- a/test/browsercontext-viewport.spec.ts+++ b/test/browsercontext-viewport.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';diff --git a/test/browsertype-basic.spec.ts b/test/browsertype-basic.spec.tsindex 85c8cb8bfc..7627763b65 100644--- a/test/browsertype-basic.spec.ts+++ b/test/browsertype-basic.spec.ts@@ -16,7 +16,7 @@*/import fs from 'fs';-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('browserType.executablePath should work', test => {test.skip(Boolean(process.env.CRPATH || process.env.FFPATH || process.env.WKPATH));diff --git a/test/browsertype-connect.spec.ts b/test/browsertype-connect.spec.tsindex 5e89d2c4b5..4c84b9d36a 100644--- a/test/browsertype-connect.spec.ts+++ b/test/browsertype-connect.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, describe, options } from './playwright.fixtures';import utils from './utils';import './remoteServer.fixture';diff --git a/test/browsertype-launch-server.spec.ts b/test/browsertype-launch-server.spec.tsindex 0daef7d0b4..a098469cbc 100644--- a/test/browsertype-launch-server.spec.ts+++ b/test/browsertype-launch-server.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, describe, options } from './playwright.fixtures';describe('lauch server', suite => {suite.skip(options.WIRE);diff --git a/test/browsertype-launch.spec.ts b/test/browsertype-launch.spec.tsindex 2e3f28383e..c791b875b4 100644--- a/test/browsertype-launch.spec.ts+++ b/test/browsertype-launch.spec.ts@@ -16,7 +16,7 @@*/import path from 'path';-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should reject all promises when browser is closed', async ({browserType, defaultBrowserOptions}) => {const browser = await browserType.launch(defaultBrowserOptions);diff --git a/test/capabilities.spec.ts b/test/capabilities.spec.tsindex d6633b1533..7b596b7933 100644--- a/test/capabilities.spec.ts+++ b/test/capabilities.spec.ts@@ -15,7 +15,7 @@*/import url from 'url';-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('Web Assembly should work', test => {test.fail(options.WEBKIT && WIN);diff --git a/test/channels.spec.ts b/test/channels.spec.tsindex 6ff3e402e3..9a3e23c7a3 100644--- a/test/channels.spec.ts+++ b/test/channels.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';import type { ChromiumBrowser } from '..';it('should work', async ({browser}) => {diff --git a/test/check.spec.ts b/test/check.spec.tsindex 05f4b1afd1..95e7505b2c 100644--- a/test/check.spec.ts+++ b/test/check.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should check the box', async ({page}) => {await page.setContent(`<input id='checkbox' type='checkbox'></input>`);diff --git a/test/chromium-css-coverage.spec.ts b/test/chromium-css-coverage.spec.tsindex ec55553a4c..2f9d8f9489 100644--- a/test/chromium-css-coverage.spec.ts+++ b/test/chromium-css-coverage.spec.ts@@ -13,7 +13,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, describe, options } from './playwright.fixtures';describe('oopif', suite => {suite.skip(!options.CHROMIUM);diff --git a/test/chromium-js-coverage.spec.ts b/test/chromium-js-coverage.spec.tsindex dfa78b7500..2971bfa6b0 100644--- a/test/chromium-js-coverage.spec.ts+++ b/test/chromium-js-coverage.spec.ts@@ -13,7 +13,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, describe, options } from './playwright.fixtures';it('should be missing', test => {test.skip(options.CHROMIUM);diff --git a/test/chromium/chromium.spec.ts b/test/chromium/chromium.spec.tsindex 50b076b10c..50ffdbf298 100644--- a/test/chromium/chromium.spec.ts+++ b/test/chromium/chromium.spec.ts@@ -13,7 +13,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from '../playwright.fixtures';+import { it, describe, options } from '../playwright.fixtures';import type { ChromiumBrowserContext } from '../..';describe('chromium', suite => {diff --git a/test/chromium/launcher.spec.ts b/test/chromium/launcher.spec.tsindex 21159f99cb..487239c880 100644--- a/test/chromium/launcher.spec.ts+++ b/test/chromium/launcher.spec.ts@@ -13,7 +13,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from '../playwright.fixtures';+import { it, options } from '../playwright.fixtures';import path from 'path';import utils from '../utils';diff --git a/test/chromium/oopif.spec.ts b/test/chromium/oopif.spec.tsindex e79cee1f3a..7dbcb2abbc 100644--- a/test/chromium/oopif.spec.ts+++ b/test/chromium/oopif.spec.ts@@ -15,7 +15,7 @@*/import { options } from '../playwright.fixtures';-import { registerWorkerFixture } from '@playwright/test-runner';+import { it, describe, registerWorkerFixture } from '@playwright/test-runner';registerWorkerFixture('browser', async ({browserType, defaultBrowserOptions}, test) => {const browser = await browserType.launch({diff --git a/test/chromium/session.spec.ts b/test/chromium/session.spec.tsindex 4a365af938..ea11a942f1 100644--- a/test/chromium/session.spec.ts+++ b/test/chromium/session.spec.ts@@ -13,7 +13,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from '../playwright.fixtures';+import { it, describe, options } from '../playwright.fixtures';import type { ChromiumBrowserContext, ChromiumBrowser } from '../../types/types';describe('session', suite => {diff --git a/test/chromium/tracing.spec.ts b/test/chromium/tracing.spec.tsindex 9faec67c24..ea004baeee 100644--- a/test/chromium/tracing.spec.ts+++ b/test/chromium/tracing.spec.ts@@ -15,7 +15,7 @@*/import { options } from '../playwright.fixtures';-import { registerFixture } from '@playwright/test-runner';+import { it, describe, registerFixture } from '@playwright/test-runner';import fs from 'fs';import path from 'path';@@ -23,25 +23,25 @@ import type { ChromiumBrowser } from '../..';declare global {interface TestState {- outputFile: string;+ outputTraceFile: string;}}-registerFixture('outputFile', async ({tmpDir}, test) => {- const outputFile = path.join(tmpDir, `trace.json`);- await test(outputFile);- if (fs.existsSync(outputFile))- fs.unlinkSync(outputFile);+registerFixture('outputTraceFile', async ({tmpDir}, test) => {+ const outputTraceFile = path.join(tmpDir, `trace.json`);+ await test(outputTraceFile);+ if (fs.existsSync(outputTraceFile))+ fs.unlinkSync(outputTraceFile);});describe('oopif', suite => {suite.skip(!options.CHROMIUM);}, () => {- it('should output a trace', async ({browser, page, server, outputFile}) => {- await (browser as ChromiumBrowser).startTracing(page, {screenshots: true, path: outputFile});+ it('should output a trace', async ({browser, page, server, outputTraceFile}) => {+ await (browser as ChromiumBrowser).startTracing(page, {screenshots: true, path: outputTraceFile});await page.goto(server.PREFIX + '/grid.html');await (browser as ChromiumBrowser).stopTracing();- expect(fs.existsSync(outputFile)).toBe(true);+ expect(fs.existsSync(outputTraceFile)).toBe(true);});it('should create directories as needed', async ({browser, page, server, tmpDir}) => {@@ -52,29 +52,29 @@ describe('oopif', suite => {expect(fs.existsSync(filePath)).toBe(true);});- it('should run with custom categories if provided', async ({browser, page, outputFile}) => {- await (browser as ChromiumBrowser).startTracing(page, {path: outputFile, categories: ['disabled-by-default-v8.cpu_profiler.hires']});+ it('should run with custom categories if provided', async ({browser, page, outputTraceFile}) => {+ await (browser as ChromiumBrowser).startTracing(page, {path: outputTraceFile, categories: ['disabled-by-default-v8.cpu_profiler.hires']});await (browser as ChromiumBrowser).stopTracing();- const traceJson = JSON.parse(fs.readFileSync(outputFile).toString());+ const traceJson = JSON.parse(fs.readFileSync(outputTraceFile).toString());expect(traceJson.metadata['trace-config']).toContain('disabled-by-default-v8.cpu_profiler.hires');});- it('should throw if tracing on two pages', async ({browser, page, outputFile}) => {- await (browser as ChromiumBrowser).startTracing(page, {path: outputFile});+ it('should throw if tracing on two pages', async ({browser, page, outputTraceFile}) => {+ await (browser as ChromiumBrowser).startTracing(page, {path: outputTraceFile});const newPage = await browser.newPage();let error = null;- await (browser as ChromiumBrowser).startTracing(newPage, {path: outputFile}).catch(e => error = e);+ await (browser as ChromiumBrowser).startTracing(newPage, {path: outputTraceFile}).catch(e => error = e);await newPage.close();expect(error).toBeTruthy();await (browser as ChromiumBrowser).stopTracing();});- it('should return a buffer', async ({browser, page, server, outputFile}) => {- await (browser as ChromiumBrowser).startTracing(page, {screenshots: true, path: outputFile});+ it('should return a buffer', async ({browser, page, server, outputTraceFile}) => {+ await (browser as ChromiumBrowser).startTracing(page, {screenshots: true, path: outputTraceFile});await page.goto(server.PREFIX + '/grid.html');const trace = await (browser as ChromiumBrowser).stopTracing();- const buf = fs.readFileSync(outputFile);+ const buf = fs.readFileSync(outputTraceFile);expect(trace.toString()).toEqual(buf.toString());});diff --git a/test/click-react.spec.ts b/test/click-react.spec.tsindex 1dd697bcce..077c74a019 100644--- a/test/click-react.spec.ts+++ b/test/click-react.spec.ts@@ -14,7 +14,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';declare const renderComponent;declare const e;diff --git a/test/click-timeout-1.spec.ts b/test/click-timeout-1.spec.tsindex ace4ca8f33..a44ef96c59 100644--- a/test/click-timeout-1.spec.ts+++ b/test/click-timeout-1.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should avoid side effects after timeout', test => {test.skip(options.WIRE);diff --git a/test/click-timeout-2.spec.ts b/test/click-timeout-2.spec.tsindex e81b7039f6..ac8cf6d8ab 100644--- a/test/click-timeout-2.spec.ts+++ b/test/click-timeout-2.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should timeout waiting for display:none to be gone', async ({page, server}) => {await page.goto(server.PREFIX + '/input/button.html');diff --git a/test/click-timeout-3.spec.ts b/test/click-timeout-3.spec.tsindex 1b1b1193c5..d8f1e0b46f 100644--- a/test/click-timeout-3.spec.ts+++ b/test/click-timeout-3.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should fail when element jumps during hit testing', test => {test.skip(options.WIRE);diff --git a/test/click-timeout-4.spec.ts b/test/click-timeout-4.spec.tsindex 05b0ee272a..b6447a08a8 100644--- a/test/click-timeout-4.spec.ts+++ b/test/click-timeout-4.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should timeout waiting for stable position', async ({page, server}) => {await page.goto(server.PREFIX + '/input/button.html');diff --git a/test/click.spec.ts b/test/click.spec.tsindex 5d52b1a6ab..8f28fa62e2 100644--- a/test/click.spec.ts+++ b/test/click.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import utils from './utils';async function giveItAChanceToClick(page) {diff --git a/test/defaultbrowsercontext-1.spec.ts b/test/defaultbrowsercontext-1.spec.tsindex b9bb7b7083..c93b0447ec 100644--- a/test/defaultbrowsercontext-1.spec.ts+++ b/test/defaultbrowsercontext-1.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import fs from 'fs';import utils from './utils';diff --git a/test/defaultbrowsercontext-2.spec.ts b/test/defaultbrowsercontext-2.spec.tsindex 93f36233be..b239bf66a6 100644--- a/test/defaultbrowsercontext-2.spec.ts+++ b/test/defaultbrowsercontext-2.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import fs from 'fs';import utils from './utils';const { removeUserDataDir, makeUserDataDir } = utils;diff --git a/test/dialog.spec.ts b/test/dialog.spec.tsindex a4903bce4a..eb1014a5fc 100644--- a/test/dialog.spec.ts+++ b/test/dialog.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should fire', async ({page, server}) => {page.on('dialog', dialog => {diff --git a/test/dispatchevent.spec.ts b/test/dispatchevent.spec.tsindex f6b986b861..a8228be847 100644--- a/test/dispatchevent.spec.ts+++ b/test/dispatchevent.spec.ts@@ -13,7 +13,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';import utils from './utils';diff --git a/test/download.spec.ts b/test/download.spec.tsindex 811416d626..3f3af9b068 100644--- a/test/download.spec.ts+++ b/test/download.spec.ts@@ -15,13 +15,13 @@*/import { options } from './playwright.fixtures';+import { it, beforeEach } from '@playwright/test-runner';import './remoteServer.fixture';import fs from 'fs';import path from 'path';import util from 'util';-beforeEach(async ({server}) => {server.setRoute('/download', (req, res) => {res.setHeader('Content-Type', 'application/octet-stream');diff --git a/test/downloads-path.spec.ts b/test/downloads-path.spec.tsindex 5796f5fd7f..39f1d7b008 100644--- a/test/downloads-path.spec.ts+++ b/test/downloads-path.spec.ts@@ -14,11 +14,9 @@* limitations under the License.*/-+import { it, registerFixture } from '@playwright/test-runner';import './playwright.fixtures';-import { registerFixture } from '@playwright/test-runner';-import path from 'path';import fs from 'fs';import os from 'os';diff --git a/test/electron/electron-app.spec.ts b/test/electron/electron-app.spec.tsindex 7ddacef1fa..82cd6db683 100644--- a/test/electron/electron-app.spec.ts+++ b/test/electron/electron-app.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { options } from '../playwright.fixtures';+import { it, describe, options } from '../playwright.fixtures';import './electron.fixture';import path from 'path';diff --git a/test/electron/electron-window.spec.ts b/test/electron/electron-window.spec.tsindex c249bb71e0..09fdcf9474 100644--- a/test/electron/electron-window.spec.ts+++ b/test/electron/electron-window.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { options } from '../playwright.fixtures';+import { it, describe, options } from '../playwright.fixtures';import './electron.fixture';describe('electron window', suite => {diff --git a/test/elementhandle-bounding-box.spec.ts b/test/elementhandle-bounding-box.spec.tsindex 826d913288..97d48c9e9c 100644--- a/test/elementhandle-bounding-box.spec.ts+++ b/test/elementhandle-bounding-box.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';it('should work', test => {diff --git a/test/elementhandle-click.spec.ts b/test/elementhandle-click.spec.tsindex d5d1fad02b..698571fe93 100644--- a/test/elementhandle-click.spec.ts+++ b/test/elementhandle-click.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({ page, server }) => {await page.goto(server.PREFIX + '/input/button.html');diff --git a/test/elementhandle-content-frame.spec.ts b/test/elementhandle-content-frame.spec.tsindex 1461190de4..2bf6165d4b 100644--- a/test/elementhandle-content-frame.spec.ts+++ b/test/elementhandle-content-frame.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';diff --git a/test/elementhandle-convenience.spec.ts b/test/elementhandle-convenience.spec.tsindex 179731e03a..bdadea33fe 100644--- a/test/elementhandle-convenience.spec.ts+++ b/test/elementhandle-convenience.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';it('should have a nice preview', async ({ page, server }) => {diff --git a/test/elementhandle-eval-on-selector.spec.ts b/test/elementhandle-eval-on-selector.spec.tsindex 4034847b9c..08bfb31549 100644--- a/test/elementhandle-eval-on-selector.spec.ts+++ b/test/elementhandle-eval-on-selector.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';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/test/elementhandle-misc.spec.ts b/test/elementhandle-misc.spec.tsindex 6bb88e8db0..9c2e8186c7 100644--- a/test/elementhandle-misc.spec.ts+++ b/test/elementhandle-misc.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should hover', async ({ page, server }) => {await page.goto(server.PREFIX + '/input/scrollable.html');diff --git a/test/elementhandle-owner-frame.spec.ts b/test/elementhandle-owner-frame.spec.tsindex 2e3f6ae89a..1e27251d4e 100644--- a/test/elementhandle-owner-frame.spec.ts+++ b/test/elementhandle-owner-frame.spec.ts@@ -15,9 +15,8 @@* limitations under the License.*/-import './playwright.fixtures';import utils from './utils';-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should work', async ({ page, server }) => {await page.goto(server.EMPTY_PAGE);diff --git a/test/elementhandle-press.spec.ts b/test/elementhandle-press.spec.tsindex 5d6ad7409d..e6ffad3ab3 100644--- a/test/elementhandle-press.spec.ts+++ b/test/elementhandle-press.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({ page }) => {await page.setContent(`<input type='text' />`);diff --git a/test/elementhandle-query-selector.spec.ts b/test/elementhandle-query-selector.spec.tsindex 19fe10d453..184b635360 100644--- a/test/elementhandle-query-selector.spec.ts+++ b/test/elementhandle-query-selector.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should query existing element', async ({page, server}) => {await page.goto(server.PREFIX + '/playground.html');diff --git a/test/elementhandle-screenshot.spec.ts b/test/elementhandle-screenshot.spec.tsindex e7e2ca1771..6ad0a8e27f 100644--- a/test/elementhandle-screenshot.spec.ts+++ b/test/elementhandle-screenshot.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, describe, options } from './playwright.fixtures';import utils from './utils';import {PNG} from 'pngjs';diff --git a/test/elementhandle-scroll-into-view.spec.ts b/test/elementhandle-scroll-into-view.spec.tsindex d949e4623e..b190d6b59f 100644--- a/test/elementhandle-scroll-into-view.spec.ts+++ b/test/elementhandle-scroll-into-view.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({ page, server }) => {await page.goto(server.PREFIX + '/offscreenbuttons.html');diff --git a/test/elementhandle-select-text.spec.ts b/test/elementhandle-select-text.spec.tsindex 2affe12983..39adfad304 100644--- a/test/elementhandle-select-text.spec.ts+++ b/test/elementhandle-select-text.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should select textarea', async ({ page, server }) => {await page.goto(server.PREFIX + '/input/textarea.html');diff --git a/test/elementhandle-type.spec.ts b/test/elementhandle-type.spec.tsindex 96c3b67b90..3c91cf78e7 100644--- a/test/elementhandle-type.spec.ts+++ b/test/elementhandle-type.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({ page }) => {await page.setContent(`<input type='text' />`);diff --git a/test/elementhandle-wait-for-element-state.spec.ts b/test/elementhandle-wait-for-element-state.spec.tsindex 4fab1e0868..b76e4d6b53 100644--- a/test/elementhandle-wait-for-element-state.spec.ts+++ b/test/elementhandle-wait-for-element-state.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';async function giveItAChanceToResolve(page) {for (let i = 0; i < 5; i++)diff --git a/test/emulation-focus.spec.ts b/test/emulation-focus.spec.tsindex 607e76a2d1..2d515da3cc 100644--- a/test/emulation-focus.spec.ts+++ b/test/emulation-focus.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import utils from './utils';it('should think that it is focused by default', async ({page}) => {diff --git a/test/eval-on-selector-all.spec.ts b/test/eval-on-selector-all.spec.tsindex f0519d42d8..3df47f2cd0 100644--- a/test/eval-on-selector-all.spec.ts+++ b/test/eval-on-selector-all.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work with css selector', async ({page, server}) => {await page.setContent('<div>hello</div><div>beautiful</div><div>world!</div>');diff --git a/test/eval-on-selector.spec.ts b/test/eval-on-selector.spec.tsindex 11aec2084a..aa15f5bf97 100644--- a/test/eval-on-selector.spec.ts+++ b/test/eval-on-selector.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work with css selector', async ({page, server}) => {await page.setContent('<section id="testAttribute">43543</section>');diff --git a/test/firefox/launcher.spec.ts b/test/firefox/launcher.spec.tsindex 8d25b6ec57..3d11a2bff0 100644--- a/test/firefox/launcher.spec.ts+++ b/test/firefox/launcher.spec.ts@@ -13,7 +13,7 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from '../playwright.fixtures';+import { it, options } from '../playwright.fixtures';it('should pass firefox user preferences', test => {test.skip(!options.FIREFOX);diff --git a/test/fixtures.spec.ts b/test/fixtures.spec.tsindex 6059640b05..f6e5c85538 100644--- a/test/fixtures.spec.ts+++ b/test/fixtures.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, describe, options } from './playwright.fixtures';import './remoteServer.fixture';import { execSync } from 'child_process';diff --git a/test/focus.spec.ts b/test/focus.spec.tsindex edd85f8127..70751a7597 100644--- a/test/focus.spec.ts+++ b/test/focus.spec.ts@@ -13,7 +13,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';it('should work', test => {test.skip(options.FIREFOX);diff --git a/test/frame-evaluate.spec.ts b/test/frame-evaluate.spec.tsindex a35cce6a74..f40f359123 100644--- a/test/frame-evaluate.spec.ts+++ b/test/frame-evaluate.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';import utils from './utils';diff --git a/test/frame-frame-element.spec.ts b/test/frame-frame-element.spec.tsindex ae48d66c9a..9459cb437d 100644--- a/test/frame-frame-element.spec.ts+++ b/test/frame-frame-element.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';diff --git a/test/frame-goto.spec.ts b/test/frame-goto.spec.tsindex be83951234..0e0ad9e45d 100644--- a/test/frame-goto.spec.ts+++ b/test/frame-goto.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';diff --git a/test/frame-hierarchy.spec.ts b/test/frame-hierarchy.spec.tsindex 67cb511a44..3142bd9622 100644--- a/test/frame-hierarchy.spec.ts+++ b/test/frame-hierarchy.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';import utils from './utils';it('should handle nested frames', async ({page, server}) => {diff --git a/test/geolocation.spec.ts b/test/geolocation.spec.tsindex caebd57f8d..a7f949c658 100644--- a/test/geolocation.spec.ts+++ b/test/geolocation.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({page, server, context}) => {await context.grantPermissions(['geolocation']);diff --git a/test/headful.spec.ts b/test/headful.spec.tsindex 171cce2dd1..bd4ba9fc27 100644--- a/test/headful.spec.ts+++ b/test/headful.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import utils from './utils';const { makeUserDataDir, removeUserDataDir } = utils;diff --git a/test/ignorehttpserrors.spec.ts b/test/ignorehttpserrors.spec.tsindex 9fcd16c271..1e1711f013 100644--- a/test/ignorehttpserrors.spec.ts+++ b/test/ignorehttpserrors.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({browser, httpsServer}) => {let error = null;diff --git a/test/interception.spec.ts b/test/interception.spec.tsindex 1e62bd1090..2cdf98c79d 100644--- a/test/interception.spec.ts+++ b/test/interception.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import { globToRegex } from '../lib/client/clientHelper';import vm from 'vm';diff --git a/test/jshandle-as-element.spec.ts b/test/jshandle-as-element.spec.tsindex 3e18bc301a..4bf6479e40 100644--- a/test/jshandle-as-element.spec.ts+++ b/test/jshandle-as-element.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({page}) => {const aHandle = await page.evaluateHandle(() => document.body);diff --git a/test/jshandle-evaluate.spec.ts b/test/jshandle-evaluate.spec.tsindex ecf5ba83ea..3209ff6588 100644--- a/test/jshandle-evaluate.spec.ts+++ b/test/jshandle-evaluate.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work with function', async ({page}) => {const windowHandle = await page.evaluateHandle(() => {diff --git a/test/jshandle-json-value.spec.ts b/test/jshandle-json-value.spec.tsindex cb76084faa..dd28996b5a 100644--- a/test/jshandle-json-value.spec.ts+++ b/test/jshandle-json-value.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({page}) => {const aHandle = await page.evaluateHandle(() => ({foo: 'bar'}));diff --git a/test/jshandle-properties.spec.ts b/test/jshandle-properties.spec.tsindex fdc78a7760..5557ea5330 100644--- a/test/jshandle-properties.spec.ts+++ b/test/jshandle-properties.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({page}) => {const aHandle = await page.evaluateHandle(() => ({diff --git a/test/jshandle-to-string.spec.ts b/test/jshandle-to-string.spec.tsindex e946eb4e14..2ab5e0249c 100644--- a/test/jshandle-to-string.spec.ts+++ b/test/jshandle-to-string.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should work for primitives', async ({page}) => {const numberHandle = await page.evaluateHandle(() => 2);diff --git a/test/keyboard.spec.ts b/test/keyboard.spec.tsindex e27d902261..554f727492 100644--- a/test/keyboard.spec.ts+++ b/test/keyboard.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';import utils from './utils';it('should type into a textarea', async ({page}) => {diff --git a/test/launcher.spec.ts b/test/launcher.spec.tsindex 01c1b4766b..56b778bd53 100644--- a/test/launcher.spec.ts+++ b/test/launcher.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import path from 'path';import utils from './utils';diff --git a/test/logger.spec.ts b/test/logger.spec.tsindex 2914936063..0142db8e4a 100644--- a/test/logger.spec.ts+++ b/test/logger.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should log', async ({browserType, defaultBrowserOptions}) => {const log = [];diff --git a/test/mouse.spec.ts b/test/mouse.spec.tsindex 1b91c70f4a..7b45193da7 100644--- a/test/mouse.spec.ts+++ b/test/mouse.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, xdescribe, options } from './playwright.fixtures';function dimensions() {const rect = document.querySelector('textarea').getBoundingClientRect();diff --git a/test/navigation.spec.ts b/test/navigation.spec.tsindex 065525e680..f92cf82cf3 100644--- a/test/navigation.spec.ts+++ b/test/navigation.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work with _blank target', async ({page, server}) => {server.setRoute('/empty.html', (req, res) => {diff --git a/test/network-request.spec.ts b/test/network-request.spec.tsindex e0952c972c..6f248d5cf4 100644--- a/test/network-request.spec.ts+++ b/test/network-request.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import utils from './utils';it('should work for main frame navigation request', async ({page, server}) => {diff --git a/test/network-response.spec.ts b/test/network-response.spec.tsindex 2e7180f696..9a6625d8dc 100644--- a/test/network-response.spec.ts+++ b/test/network-response.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import fs from 'fs';import path from 'path';diff --git a/test/page-add-init-script.spec.ts b/test/page-add-init-script.spec.tsindex 90f8dc86c8..57463b3523 100644--- a/test/page-add-init-script.spec.ts+++ b/test/page-add-init-script.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import path from 'path';it('should evaluate before anything else on the page', async ({ page, server }) => {diff --git a/test/page-add-script-tag.spec.ts b/test/page-add-script-tag.spec.tsindex ec4e773cda..0ed829daea 100644--- a/test/page-add-script-tag.spec.ts+++ b/test/page-add-script-tag.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import path from 'path';it('should throw an error if no options are provided', async ({page, server}) => {diff --git a/test/page-add-style-tag.spec.ts b/test/page-add-style-tag.spec.tsindex 4afb6bb7c0..f79b3d96fb 100644--- a/test/page-add-style-tag.spec.ts+++ b/test/page-add-style-tag.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import path from 'path';it('should throw an error if no options are provided', async ({page, server}) => {diff --git a/test/page-basic.spec.ts b/test/page-basic.spec.tsindex f8ea2bfb76..b3bbe038b9 100644--- a/test/page-basic.spec.ts+++ b/test/page-basic.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should reject all promises when page is closed', async ({context}) => {const newPage = await context.newPage();diff --git a/test/page-emulate-media.spec.ts b/test/page-emulate-media.spec.tsindex e4e9ef5192..9c169463da 100644--- a/test/page-emulate-media.spec.ts+++ b/test/page-emulate-media.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';it('should emulate type', async ({page, server}) => {diff --git a/test/page-evaluate-handle.spec.ts b/test/page-evaluate-handle.spec.tsindex 7f7548392f..30a18f2695 100644--- a/test/page-evaluate-handle.spec.ts+++ b/test/page-evaluate-handle.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({page, server}) => {const windowHandle = await page.evaluateHandle(() => window);diff --git a/test/page-evaluate.spec.ts b/test/page-evaluate.spec.tsindex f8a619154f..12fbe72755 100644--- a/test/page-evaluate.spec.ts+++ b/test/page-evaluate.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should work', async ({ page, server }) => {const result = await page.evaluate(() => 7 * 3);diff --git a/test/page-event-console.spec.ts b/test/page-event-console.spec.tsindex 9b6e3fb101..392c3915f6 100644--- a/test/page-event-console.spec.ts+++ b/test/page-event-console.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import util from 'util';it('should work', async ({page, server}) => {diff --git a/test/page-event-crash.spec.ts b/test/page-event-crash.spec.tsindex cc0eeaa0aa..9a67cc0a55 100644--- a/test/page-event-crash.spec.ts+++ b/test/page-event-crash.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, describe, options } from './playwright.fixtures';function crash(pageImpl, browserName) {if (browserName === 'chromium')diff --git a/test/page-event-network.spec.ts b/test/page-event-network.spec.tsindex 5152b86ec1..36adb2ce25 100644--- a/test/page-event-network.spec.ts+++ b/test/page-event-network.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('Page.Events.Request', async ({page, server}) => {const requests = [];diff --git a/test/page-event-pageerror.spec.ts b/test/page-event-pageerror.spec.tsindex 4e7ff6dde5..59c6ca5988 100644--- a/test/page-event-pageerror.spec.ts+++ b/test/page-event-pageerror.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should fire', async ({page, server}) => {const [error] = await Promise.all([diff --git a/test/page-event-popup.spec.ts b/test/page-event-popup.spec.tsindex d84bdedf49..d4119cf0ef 100644--- a/test/page-event-popup.spec.ts+++ b/test/page-event-popup.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({browser}) => {const context = await browser.newContext();diff --git a/test/page-event-request.spec.ts b/test/page-event-request.spec.tsindex 8e3089a083..e7cfa68846 100644--- a/test/page-event-request.spec.ts+++ b/test/page-event-request.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';it('should fire for navigation requests', async ({page, server}) => {diff --git a/test/page-expose-function.spec.ts b/test/page-expose-function.spec.tsindex 126471d9c8..5659b7ef4f 100644--- a/test/page-expose-function.spec.ts+++ b/test/page-expose-function.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('exposeBinding should work', async ({browser}) => {const context = await browser.newContext();diff --git a/test/page-fill.spec.ts b/test/page-fill.spec.tsindex 24bd4af678..f3ad5e585a 100644--- a/test/page-fill.spec.ts+++ b/test/page-fill.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';async function giveItAChanceToFill(page) {for (let i = 0; i < 5; i++)diff --git a/test/page-goto.spec.ts b/test/page-goto.spec.tsindex 055579487a..31ddc0c973 100644--- a/test/page-goto.spec.ts+++ b/test/page-goto.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import utils from './utils';import path from 'path';diff --git a/test/page-history.spec.ts b/test/page-history.spec.tsindex be08dc6041..500e2a5b12 100644--- a/test/page-history.spec.ts+++ b/test/page-history.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import url from 'url';it('page.goBack should work', async ({page, server}) => {diff --git a/test/page-network-idle.spec.ts b/test/page-network-idle.spec.tsindex 93ffc396f0..d868a69fa2 100644--- a/test/page-network-idle.spec.ts+++ b/test/page-network-idle.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import type { Frame, Page } from '..';import { TestServer } from '../utils/testserver';diff --git a/test/page-route.spec.ts b/test/page-route.spec.tsindex 43ff4596a5..79146a72a1 100644--- a/test/page-route.spec.ts+++ b/test/page-route.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should intercept', async ({page, server}) => {let intercepted = false;diff --git a/test/page-screenshot.spec.ts b/test/page-screenshot.spec.tsindex 64d51952ec..745155642d 100644--- a/test/page-screenshot.spec.ts+++ b/test/page-screenshot.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, describe, options } from './playwright.fixtures';import utils from './utils';import path from 'path';import fs from 'fs';diff --git a/test/page-select-option.spec.ts b/test/page-select-option.spec.tsindex 9ddaa9151a..aaa27a97fc 100644--- a/test/page-select-option.spec.ts+++ b/test/page-select-option.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should select single option', async ({page, server}) => {await page.goto(server.PREFIX + '/input/select.html');diff --git a/test/page-set-content.spec.ts b/test/page-set-content.spec.tsindex 6662127843..947c855abe 100644--- a/test/page-set-content.spec.ts+++ b/test/page-set-content.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';const expectedOutput = '<html><head></head><body><div>hello</div></body></html>';diff --git a/test/page-set-extra-http-headers.spec.ts b/test/page-set-extra-http-headers.spec.tsindex 9999f400f9..b3fe3e262d 100644--- a/test/page-set-extra-http-headers.spec.ts+++ b/test/page-set-extra-http-headers.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({page, server}) => {await page.setExtraHTTPHeaders({diff --git a/test/page-set-input-files.spec.ts b/test/page-set-input-files.spec.tsindex f93eb1c80d..5ca8e54e84 100644--- a/test/page-set-input-files.spec.ts+++ b/test/page-set-input-files.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import path from 'path';import fs from 'fs';diff --git a/test/page-wait-for-load-state.spec.ts b/test/page-wait-for-load-state.spec.tsindex 1eb1f88929..1946632e2d 100644--- a/test/page-wait-for-load-state.spec.ts+++ b/test/page-wait-for-load-state.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import type { Route } from '..';it('should pick up ongoing navigation', async ({page, server}) => {diff --git a/test/page-wait-for-navigation.spec.ts b/test/page-wait-for-navigation.spec.tsindex 783aea0526..a6787a8eb2 100644--- a/test/page-wait-for-navigation.spec.ts+++ b/test/page-wait-for-navigation.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';import type { Frame } from '..';diff --git a/test/page-wait-for-request.spec.ts b/test/page-wait-for-request.spec.tsindex fb81982b81..1803a0ce5b 100644--- a/test/page-wait-for-request.spec.ts+++ b/test/page-wait-for-request.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import vm from 'vm';diff --git a/test/page-wait-for-response.spec.ts b/test/page-wait-for-response.spec.tsindex ae3b5db379..a5c91a41a1 100644--- a/test/page-wait-for-response.spec.ts+++ b/test/page-wait-for-response.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({page, server}) => {await page.goto(server.EMPTY_PAGE);diff --git a/test/pdf.spec.ts b/test/pdf.spec.tsindex 6a19708d99..d28d404668 100644--- a/test/pdf.spec.ts+++ b/test/pdf.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import fs from 'fs';import path from 'path';diff --git a/test/permissions.spec.ts b/test/permissions.spec.tsindex 1089bd496e..1c71e3bb9b 100644--- a/test/permissions.spec.ts+++ b/test/permissions.spec.ts@@ -14,7 +14,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, describe, options } from './playwright.fixtures';function getPermission(page, name) {return page.evaluate(name => navigator.permissions.query({name}).then(result => result.state), name);diff --git a/test/playwright.fixtures.ts b/test/playwright.fixtures.tsindex b05262e299..eb3c2485bb 100644--- a/test/playwright.fixtures.ts+++ b/test/playwright.fixtures.ts@@ -25,6 +25,7 @@ import { Transport } from '../lib/protocol/transport';import { installCoverageHooks } from './coverage';import { parameters, registerFixture, registerWorkerFixture } from '@playwright/test-runner';import { mkdtempAsync, removeFolderAsync } from './utils';+export { it, fit, xit, describe, fdescribe, xdescribe } from '@playwright/test-runner';export const options = {CHROMIUM: parameters.browserName === 'chromium',@@ -43,6 +44,7 @@ declare global {defaultBrowserOptions: LaunchOptions;golden: (path: string) => string;playwright: typeof import('../index');+ browserName: string;browserType: BrowserType<Browser>;browser: Browser;httpService: {server: TestServer, httpsServer: TestServer}@@ -56,9 +58,6 @@ declare global {browserServer: BrowserServer;launchPersistent: (options?: Parameters<BrowserType<Browser>['launchPersistentContext']>[1]) => Promise<{context: BrowserContext, page: Page}>;}- interface FixtureParameters {- browserName: string;- }}declare global {diff --git a/test/popup.spec.ts b/test/popup.spec.tsindex 4e95458bc8..636f005a12 100644--- a/test/popup.spec.ts+++ b/test/popup.spec.ts@@ -13,7 +13,8 @@* See the License for the specific language governing permissions and* limitations under the License.*/-import { options } from './playwright.fixtures';++import { it, options } from './playwright.fixtures';it('should inherit user agent from browser context', async function({browser, server}) {const context = await browser.newContext({diff --git a/test/proxy.spec.ts b/test/proxy.spec.tsindex c2b5dea757..adcde04dc6 100644--- a/test/proxy.spec.ts+++ b/test/proxy.spec.ts@@ -15,7 +15,7 @@*/import { parameters } from '@playwright/test-runner';-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import socks from 'socksv5';diff --git a/test/queryselector.spec.ts b/test/queryselector.spec.tsindex 4f0f7fe104..e57c72e502 100644--- a/test/queryselector.spec.ts+++ b/test/queryselector.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should throw for non-string selector', async ({page}) => {const error = await page.$(null).catch(e => e);diff --git a/test/request-continue.spec.ts b/test/request-continue.spec.tsindex cb9268253c..0f94605ceb 100644--- a/test/request-continue.spec.ts+++ b/test/request-continue.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work', async ({page, server}) => {await page.route('**/*', route => route.continue());diff --git a/test/request-fulfill.spec.ts b/test/request-fulfill.spec.tsindex 9398fcf7df..35e1aac807 100644--- a/test/request-fulfill.spec.ts+++ b/test/request-fulfill.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';import fs from 'fs';import path from 'path';diff --git a/test/screencast.spec.ts b/test/screencast.spec.tsindex 2457cdd03e..b685da3bf3 100644--- a/test/screencast.spec.ts+++ b/test/screencast.spec.ts@@ -15,7 +15,7 @@*/import { options } from './playwright.fixtures';-import { registerFixture } from '@playwright/test-runner';+import { it, describe, registerFixture } from '@playwright/test-runner';import type { Page } from '..';import fs from 'fs';diff --git a/test/selectors-css.spec.ts b/test/selectors-css.spec.tsindex a92b02450b..ec3e363373 100644--- a/test/selectors-css.spec.ts+++ b/test/selectors-css.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work for open shadow roots', async ({page, server}) => {await page.goto(server.PREFIX + '/deep-shadow.html');diff --git a/test/selectors-misc.spec.ts b/test/selectors-misc.spec.tsindex 3175ffbe35..01729d1d08 100644--- a/test/selectors-misc.spec.ts+++ b/test/selectors-misc.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should work for open shadow roots', async ({page, server}) => {await page.goto(server.PREFIX + '/deep-shadow.html');diff --git a/test/selectors-register.spec.ts b/test/selectors-register.spec.tsindex 7ab767f7fb..a8f7b2fc6b 100644--- a/test/selectors-register.spec.ts+++ b/test/selectors-register.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import path from 'path';import utils from './utils';diff --git a/test/selectors-text.spec.ts b/test/selectors-text.spec.tsindex d5308921ae..73bd07fe3a 100644--- a/test/selectors-text.spec.ts+++ b/test/selectors-text.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('query', async ({page}) => {await page.setContent(`<div>yo</div><div>ya</div><div>\nye </div>`);diff --git a/test/slowmo.spec.ts b/test/slowmo.spec.tsindex 3c0a037e92..6ea4be82f6 100644--- a/test/slowmo.spec.ts+++ b/test/slowmo.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, describe, options } from './playwright.fixtures';import { attachFrame } from './utils';async function checkSlowMo(toImpl, page, task) {diff --git a/test/snapshot.spec.ts b/test/snapshot.spec.tsindex 678828f9e8..32be5a3793 100644--- a/test/snapshot.spec.ts+++ b/test/snapshot.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { options } from './playwright.fixtures';+import { it, options } from './playwright.fixtures';it('should not throw', test => {test.skip(!options.TRACING);diff --git a/test/test-runner-helper.ts b/test/test-runner-helper.tsdeleted file mode 100644index 0a73f87528..0000000000--- a/test/test-runner-helper.ts+++ /dev/null@@ -1,28 +0,0 @@-/**--* Copyright (c) Microsoft Corporation.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--import { registerFixture } from '@playwright/test-runner';--declare global {- interface TestState {- helperFixture: string;- }-}--registerFixture('helperFixture', async ({}, test) => {- await test('helperFixture');-});diff --git a/test/test-runner-overrides-1.spec.ts b/test/test-runner-overrides-1.spec.tsdeleted file mode 100644index c8253014c4..0000000000--- a/test/test-runner-overrides-1.spec.ts+++ /dev/null@@ -1,26 +0,0 @@-/**- * Copyright (c) Microsoft Corporation.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--import './test-runner-helper';-import { registerFixture } from '@playwright/test-runner';--registerFixture('helperFixture', async ({}, test) => {- await test('helperFixture - overridden');-});--it('should override fixture from requires', async ({helperFixture}) => {- expect(helperFixture).toBe('helperFixture - overridden');-});diff --git a/test/test-runner-overrides-2.spec.ts b/test/test-runner-overrides-2.spec.tsdeleted file mode 100644index b29536f808..0000000000--- a/test/test-runner-overrides-2.spec.ts+++ /dev/null@@ -1,21 +0,0 @@-/**- * Copyright (c) Microsoft Corporation.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--import './test-runner-helper';--it('override should have no side effects', async ({helperFixture}) => {- expect(helperFixture).toBe('helperFixture');-});diff --git a/test/test-runner.spec.ts b/test/test-runner.spec.tsdeleted file mode 100644index 08624e3ac9..0000000000--- a/test/test-runner.spec.ts+++ /dev/null@@ -1,49 +0,0 @@-/**- * Copyright (c) Microsoft Corporation.- *- * Licensed under the Apache License, Version 2.0 (the "License");- * you may not use this file except in compliance with the License.- * You may obtain a copy of the License at- *- * http://www.apache.org/licenses/LICENSE-2.0- *- * Unless required by applicable law or agreed to in writing, software- * distributed under the License is distributed on an "AS IS" BASIS,- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- * See the License for the specific language governing permissions and- * limitations under the License.- */--import './test-runner-helper';-import { registerFixture } from '@playwright/test-runner';--declare global {- interface TestState {- a: string;- b: string;- ab: string;- zero: number;- tear: string;- }-}--let zero = 0;-registerFixture('zero', async ({}, test) => {- await test(zero++);-});--registerFixture('a', async ({zero}, test) => {- await test('a' + zero);-});--registerFixture('b', async ({zero}, test) => {- await test('b' + zero);-});--registerFixture('ab', async ({a, b}, test) => {- await test(a + b);-});--it('should eval fixture once', async ({ab}) => {- expect(ab).toBe('a0b0');-});diff --git a/test/wait-for-function.spec.ts b/test/wait-for-function.spec.tsindex c6b82c76f7..383f286bbb 100644--- a/test/wait-for-function.spec.ts+++ b/test/wait-for-function.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';it('should timeout', async ({page}) => {const startTime = Date.now();diff --git a/test/wait-for-selector-1.spec.ts b/test/wait-for-selector-1.spec.tsindex 1140db499a..ecd0621b20 100644--- a/test/wait-for-selector-1.spec.ts+++ b/test/wait-for-selector-1.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';async function giveItTimeToLog(frame) {diff --git a/test/wait-for-selector-2.spec.ts b/test/wait-for-selector-2.spec.tsindex 4d86f4ab03..7698bbe429 100644--- a/test/wait-for-selector-2.spec.ts+++ b/test/wait-for-selector-2.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import utils from './utils';const addElement = tag => document.body.appendChild(document.createElement(tag));diff --git a/test/workers.spec.ts b/test/workers.spec.tsindex 023327dcfb..dc72bef465 100644--- a/test/workers.spec.ts+++ b/test/workers.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import './playwright.fixtures';+import { it } from './playwright.fixtures';import type { ConsoleMessage } from '..';it('Page.workers', async function({page, server}) {