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
chore: group tests under tests/ (1) (#13081)
Pavel Feldman02cac8a0668c
diff --git a/tests/beforeunload.spec.ts b/tests/library/beforeunload.spec.tssimilarity index 98%rename from tests/beforeunload.spec.tsrename to tests/library/beforeunload.spec.tsindex 3779de6de1..f3de13e90b 100644--- a/tests/beforeunload.spec.ts+++ b/tests/library/beforeunload.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';it('should close browser with beforeunload page', async ({ server, browserType }) => {const browser = await browserType.launch();diff --git a/tests/browser.spec.ts b/tests/library/browser.spec.tssimilarity index 95%rename from tests/browser.spec.tsrename to tests/library/browser.spec.tsindex e80325946e..da8d740175 100644--- a/tests/browser.spec.ts+++ b/tests/library/browser.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { browserTest as test, expect } from './config/browserTest';+import { browserTest as test, expect } from '../config/browserTest';test('should create new page @smoke', async function({ browser }) {const page1 = await browser.newPage();diff --git a/tests/browsercontext-add-cookies.spec.ts b/tests/library/browsercontext-add-cookies.spec.tssimilarity index 99%rename from tests/browsercontext-add-cookies.spec.tsrename to tests/library/browsercontext-add-cookies.spec.tsindex d41984acc6..96e0a64d78 100644--- a/tests/browsercontext-add-cookies.spec.ts+++ b/tests/library/browsercontext-add-cookies.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { contextTest as it, playwrightTest, expect } from './config/browserTest';+import { contextTest as it, playwrightTest, expect } from '../config/browserTest';it('should work @smoke', async ({ context, page, server }) => {await page.goto(server.EMPTY_PAGE);diff --git a/tests/browsercontext-add-init-script.spec.ts b/tests/library/browsercontext-add-init-script.spec.tssimilarity index 97%rename from tests/browsercontext-add-init-script.spec.tsrename to tests/library/browsercontext-add-init-script.spec.tsindex 788ee1bd2e..369c5713e2 100644--- a/tests/browsercontext-add-init-script.spec.ts+++ b/tests/library/browsercontext-add-init-script.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';it('should work with browser context scripts @smoke', async ({ context, server }) => {await context.addInitScript(() => window['temp'] = 123);diff --git a/tests/browsercontext-base-url.spec.ts b/tests/library/browsercontext-base-url.spec.tssimilarity index 98%rename from tests/browsercontext-base-url.spec.tsrename to tests/library/browsercontext-base-url.spec.tsindex ea0ffc42f8..b6dd40b90d 100644--- a/tests/browsercontext-base-url.spec.ts+++ b/tests/library/browsercontext-base-url.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should construct a new URL when a baseURL in browser.newContext is passed to page.goto @smoke', async function({ browser, server }) {const context = await browser.newContext({diff --git a/tests/browsercontext-basic.spec.ts b/tests/library/browsercontext-basic.spec.tssimilarity index 98%rename from tests/browsercontext-basic.spec.tsrename to tests/library/browsercontext-basic.spec.tsindex aaa309bdf5..e0b74be625 100644--- a/tests/browsercontext-basic.spec.ts+++ b/tests/library/browsercontext-basic.spec.ts@@ -15,8 +15,8 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';-import { attachFrame, verifyViewport } from './config/utils';+import { browserTest as it, expect } from '../config/browserTest';+import { attachFrame, verifyViewport } from '../config/utils';it('should create new context @smoke', async function({ browser }) {expect(browser.contexts().length).toBe(0);diff --git a/tests/browsercontext-clearcookies.spec.ts b/tests/library/browsercontext-clearcookies.spec.tssimilarity index 96%rename from tests/browsercontext-clearcookies.spec.tsrename to tests/library/browsercontext-clearcookies.spec.tsindex 85ebec5bb3..e368aadbe3 100644--- a/tests/browsercontext-clearcookies.spec.ts+++ b/tests/library/browsercontext-clearcookies.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';it('should clear cookies', async ({ context, page, server }) => {await page.goto(server.EMPTY_PAGE);diff --git a/tests/browsercontext-cookies.spec.ts b/tests/library/browsercontext-cookies.spec.tssimilarity index 99%rename from tests/browsercontext-cookies.spec.tsrename to tests/library/browsercontext-cookies.spec.tsindex fed3670ed8..c619a620a0 100644--- a/tests/browsercontext-cookies.spec.ts+++ b/tests/library/browsercontext-cookies.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';it('should return no cookies in pristine browser context', async ({ context, page, server }) => {expect(await context.cookies()).toEqual([]);diff --git a/tests/browsercontext-credentials.spec.ts b/tests/library/browsercontext-credentials.spec.tssimilarity index 97%rename from tests/browsercontext-credentials.spec.tsrename to tests/library/browsercontext-credentials.spec.tsindex cb411b2ecf..e8705af4a6 100644--- a/tests/browsercontext-credentials.spec.ts+++ b/tests/library/browsercontext-credentials.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should fail without credentials', async ({ browser, server, browserName, headless }) => {it.fail(browserName === 'chromium' && !headless);diff --git a/tests/browsercontext-csp.spec.ts b/tests/library/browsercontext-csp.spec.tssimilarity index 97%rename from tests/browsercontext-csp.spec.tsrename to tests/library/browsercontext-csp.spec.tsindex 32c4ba5e49..9e155bef88 100644--- a/tests/browsercontext-csp.spec.ts+++ b/tests/library/browsercontext-csp.spec.ts@@ -15,8 +15,8 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';-import { attachFrame } from './config/utils';+import { browserTest as it, expect } from '../config/browserTest';+import { attachFrame } from '../config/utils';it('should bypass CSP meta tag @smoke', async ({ browser, server }) => {// Make sure CSP prohibits addScriptTag.diff --git a/tests/browsercontext-device.spec.ts b/tests/library/browsercontext-device.spec.tssimilarity index 99%rename from tests/browsercontext-device.spec.tsrename to tests/library/browsercontext-device.spec.tsindex 4c0366cc9c..12624650da 100644--- a/tests/browsercontext-device.spec.ts+++ b/tests/library/browsercontext-device.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it.describe('device', () => {it.skip(({ browserName }) => browserName === 'firefox');diff --git a/tests/browsercontext-dsf.spec.ts b/tests/library/browsercontext-dsf.spec.tssimilarity index 95%rename from tests/browsercontext-dsf.spec.tsrename to tests/library/browsercontext-dsf.spec.tsindex b341a40107..de35de59b0 100644--- a/tests/browsercontext-dsf.spec.ts+++ b/tests/library/browsercontext-dsf.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should fetch lodpi assets @smoke', async ({ contextFactory, server }) => {const context = await contextFactory({diff --git a/tests/browsercontext-expose-function.spec.ts b/tests/library/browsercontext-expose-function.spec.tssimilarity index 98%rename from tests/browsercontext-expose-function.spec.tsrename to tests/library/browsercontext-expose-function.spec.tsindex 1848f3bed8..57fc466316 100644--- a/tests/browsercontext-expose-function.spec.ts+++ b/tests/library/browsercontext-expose-function.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';it('expose binding should work', async ({ context }) => {let bindingSource;diff --git a/tests/browsercontext-fetch.spec.ts b/tests/library/browsercontext-fetch.spec.tssimilarity index 99%rename from tests/browsercontext-fetch.spec.tsrename to tests/library/browsercontext-fetch.spec.tsindex 4abf4be71a..dabd15328d 100644--- a/tests/browsercontext-fetch.spec.ts+++ b/tests/library/browsercontext-fetch.spec.ts@@ -19,8 +19,8 @@ import http from 'http';import zlib from 'zlib';import fs from 'fs';import { pipeline } from 'stream';-import { contextTest as it, expect } from './config/browserTest';-import { suppressCertificateWarning } from './config/utils';+import { contextTest as it, expect } from '../config/browserTest';+import { suppressCertificateWarning } from '../config/utils';it.skip(({ mode }) => mode !== 'default');diff --git a/tests/browsercontext-locale.spec.ts b/tests/library/browsercontext-locale.spec.tssimilarity index 99%rename from tests/browsercontext-locale.spec.tsrename to tests/library/browsercontext-locale.spec.tsindex c957897ddc..1c213f9657 100644--- a/tests/browsercontext-locale.spec.ts+++ b/tests/library/browsercontext-locale.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should affect accept-language header @smoke', async ({ browser, server }) => {const context = await browser.newContext({ locale: 'fr-CH' });diff --git a/tests/browsercontext-network-event.spec.ts b/tests/library/browsercontext-network-event.spec.tssimilarity index 98%rename from tests/browsercontext-network-event.spec.tsrename to tests/library/browsercontext-network-event.spec.tsindex 61dd7113c9..d423f07388 100644--- a/tests/browsercontext-network-event.spec.ts+++ b/tests/library/browsercontext-network-event.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('BrowserContext.Events.Request', async ({ context, server }) => {const page = await context.newPage();diff --git a/tests/browsercontext-page-event.spec.ts b/tests/library/browsercontext-page-event.spec.tssimilarity index 99%rename from tests/browsercontext-page-event.spec.tsrename to tests/library/browsercontext-page-event.spec.tsindex 6b96038171..cdfade1dfb 100644--- a/tests/browsercontext-page-event.spec.ts+++ b/tests/library/browsercontext-page-event.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should have url', async ({ browser, server }) => {const context = await browser.newContext();diff --git a/tests/browsercontext-pages.spec.ts b/tests/library/browsercontext-pages.spec.tssimilarity index 97%rename from tests/browsercontext-pages.spec.tsrename to tests/library/browsercontext-pages.spec.tsindex e395cc904d..9a11382890 100644--- a/tests/browsercontext-pages.spec.ts+++ b/tests/library/browsercontext-pages.spec.ts@@ -15,8 +15,8 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';-import { attachFrame, chromiumVersionLessThan } from './config/utils';+import { browserTest as it, expect } from '../config/browserTest';+import { attachFrame, chromiumVersionLessThan } from '../config/utils';it('should not be visible in context.pages', async ({ contextFactory }) => {const context = await contextFactory();diff --git a/tests/browsercontext-proxy.spec.ts b/tests/library/browsercontext-proxy.spec.tssimilarity index 99%rename from tests/browsercontext-proxy.spec.tsrename to tests/library/browsercontext-proxy.spec.tsindex 165ea2c08b..ee50c17951 100644--- a/tests/browsercontext-proxy.spec.ts+++ b/tests/library/browsercontext-proxy.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it.use({launchOptions: async ({ launchOptions }, use) => {diff --git a/tests/browsercontext-route.spec.ts b/tests/library/browsercontext-route.spec.tssimilarity index 99%rename from tests/browsercontext-route.spec.tsrename to tests/library/browsercontext-route.spec.tsindex cc69ef8061..3726d050c5 100644--- a/tests/browsercontext-route.spec.ts+++ b/tests/library/browsercontext-route.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should intercept', async ({ browser, server }) => {const context = await browser.newContext();diff --git a/tests/browsercontext-set-extra-http-headers.spec.ts b/tests/library/browsercontext-set-extra-http-headers.spec.tssimilarity index 95%rename from tests/browsercontext-set-extra-http-headers.spec.tsrename to tests/library/browsercontext-set-extra-http-headers.spec.tsindex 85cd52b788..4281833112 100644--- a/tests/browsercontext-set-extra-http-headers.spec.ts+++ b/tests/library/browsercontext-set-extra-http-headers.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should override extra headers from browser context', async ({ browser, server }) => {const context = await browser.newContext({diff --git a/tests/browsercontext-storage-state.spec.ts b/tests/library/browsercontext-storage-state.spec.tssimilarity index 99%rename from tests/browsercontext-storage-state.spec.tsrename to tests/library/browsercontext-storage-state.spec.tsindex c6975f00bf..8319ef892e 100644--- a/tests/browsercontext-storage-state.spec.ts+++ b/tests/library/browsercontext-storage-state.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';import fs from 'fs';it('should capture local storage', async ({ contextFactory }) => {diff --git a/tests/browsercontext-strict.spec.ts b/tests/library/browsercontext-strict.spec.tssimilarity index 96%rename from tests/browsercontext-strict.spec.tsrename to tests/library/browsercontext-strict.spec.tsindex f35ad2f7d5..1c617a2085 100644--- a/tests/browsercontext-strict.spec.ts+++ b/tests/library/browsercontext-strict.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should not fail page.textContent in non-strict mode', async ({ page }) => {await page.setContent(`<span>span1</span><div><span>target</span></div>`);diff --git a/tests/browsercontext-timezone-id.spec.ts b/tests/library/browsercontext-timezone-id.spec.tssimilarity index 98%rename from tests/browsercontext-timezone-id.spec.tsrename to tests/library/browsercontext-timezone-id.spec.tsindex 548058606d..feb36ee801 100644--- a/tests/browsercontext-timezone-id.spec.ts+++ b/tests/library/browsercontext-timezone-id.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should work @smoke', async ({ browser, browserName }) => {const func = () => new Date(1479579154987).toString();diff --git a/tests/browsercontext-user-agent.spec.ts b/tests/library/browsercontext-user-agent.spec.tssimilarity index 96%rename from tests/browsercontext-user-agent.spec.tsrename to tests/library/browsercontext-user-agent.spec.tsindex 0e87f2545a..2fbb2ef5a2 100644--- a/tests/browsercontext-user-agent.spec.ts+++ b/tests/library/browsercontext-user-agent.spec.ts@@ -15,8 +15,8 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';-import { attachFrame } from './config/utils';+import { browserTest as it, expect } from '../config/browserTest';+import { attachFrame } from '../config/utils';it('should work', async ({ browser, server }) => {{diff --git a/tests/browsercontext-viewport-mobile.spec.ts b/tests/library/browsercontext-viewport-mobile.spec.tssimilarity index 99%rename from tests/browsercontext-viewport-mobile.spec.tsrename to tests/library/browsercontext-viewport-mobile.spec.tsindex fb55986a27..20cc7c4b15 100644--- a/tests/browsercontext-viewport-mobile.spec.ts+++ b/tests/library/browsercontext-viewport-mobile.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it.describe('mobile viewport', () => {it.skip(({ browserName }) => browserName === 'firefox');diff --git a/tests/browsercontext-viewport.spec.ts b/tests/library/browsercontext-viewport.spec.tssimilarity index 97%rename from tests/browsercontext-viewport.spec.tsrename to tests/library/browsercontext-viewport.spec.tsindex 620bb6b110..6b222bc000 100644--- a/tests/browsercontext-viewport.spec.ts+++ b/tests/library/browsercontext-viewport.spec.ts@@ -15,9 +15,9 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';-import { browserTest } from './config/browserTest';-import { verifyViewport } from './config/utils';+import { contextTest as it, expect } from '../config/browserTest';+import { browserTest } from '../config/browserTest';+import { verifyViewport } from '../config/utils';it('should get the proper default viewport size', async ({ page, server }) => {await verifyViewport(page, 1280, 720);diff --git a/tests/browsertype-basic.spec.ts b/tests/library/browsertype-basic.spec.tssimilarity index 95%rename from tests/browsertype-basic.spec.tsrename to tests/library/browsertype-basic.spec.tsindex c29229c658..77ede07014 100644--- a/tests/browsertype-basic.spec.ts+++ b/tests/library/browsertype-basic.spec.ts@@ -16,7 +16,7 @@*/import fs from 'fs';-import { playwrightTest as test, expect } from './config/browserTest';+import { playwrightTest as test, expect } from '../config/browserTest';test('browserType.executablePath should work', async ({ browserType, channel }) => {test.skip(!!channel, 'We skip browser download when testing a channel');diff --git a/tests/browsertype-connect.spec.ts b/tests/library/browsertype-connect.spec.tssimilarity index 99%rename from tests/browsertype-connect.spec.tsrename to tests/library/browsertype-connect.spec.tsindex 6c39849448..f61f6f83d7 100644--- a/tests/browsertype-connect.spec.ts+++ b/tests/library/browsertype-connect.spec.ts@@ -18,10 +18,10 @@import fs from 'fs';import os from 'os';import * as path from 'path';-import { getUserAgent } from '../packages/playwright-core/lib/utils/utils';+import { getUserAgent } from '../../packages/playwright-core/lib/utils/utils';import WebSocket from 'ws';-import { expect, playwrightTest as test } from './config/browserTest';-import { parseTrace, suppressCertificateWarning } from './config/utils';+import { expect, playwrightTest as test } from '../config/browserTest';+import { parseTrace, suppressCertificateWarning } from '../config/utils';import formidable from 'formidable';test.slow(true, 'All connect tests are slow');diff --git a/tests/browsertype-launch-selenium.spec.ts b/tests/library/browsertype-launch-selenium.spec.tssimilarity index 98%rename from tests/browsertype-launch-selenium.spec.tsrename to tests/library/browsertype-launch-selenium.spec.tsindex 30f3159bdd..0ce1cfba30 100644--- a/tests/browsertype-launch-selenium.spec.ts+++ b/tests/library/browsertype-launch-selenium.spec.ts@@ -14,11 +14,11 @@* limitations under the License.*/-import { playwrightTest as test, expect } from './config/browserTest';+import { playwrightTest as test, expect } from '../config/browserTest';import type { TestInfo } from '@playwright/test';import path from 'path';import fs from 'fs';-import { start } from '../packages/playwright-core/lib/outofprocess';+import { start } from '../../packages/playwright-core/lib/outofprocess';const chromeDriver = process.env.PWTEST_CHROMEDRIVER;const brokenDriver = path.join(__dirname, 'assets', 'selenium-grid', 'broken-selenium-driver.js');diff --git a/tests/browsertype-launch-server.spec.ts b/tests/library/browsertype-launch-server.spec.tssimilarity index 98%rename from tests/browsertype-launch-server.spec.tsrename to tests/library/browsertype-launch-server.spec.tsindex f7c469ebbf..3b1ecb8644 100644--- a/tests/browsertype-launch-server.spec.ts+++ b/tests/library/browsertype-launch-server.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';+import { playwrightTest as it, expect } from '../config/browserTest';it.describe('launch server', () => {it.skip(({ mode }) => mode !== 'default');diff --git a/tests/browsertype-launch.spec.ts b/tests/library/browsertype-launch.spec.tssimilarity index 98%rename from tests/browsertype-launch.spec.tsrename to tests/library/browsertype-launch.spec.tsindex 4b2d23b193..aab8170679 100644--- a/tests/browsertype-launch.spec.ts+++ b/tests/library/browsertype-launch.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';+import { playwrightTest as it, expect } from '../config/browserTest';it('should reject all promises when browser is closed', async ({ browserType }) => {const browser = await browserType.launch();diff --git a/tests/capabilities.spec.ts b/tests/library/capabilities.spec.tssimilarity index 98%rename from tests/capabilities.spec.tsrename to tests/library/capabilities.spec.tsindex 3fdb180aa3..e9bb8ad537 100644--- a/tests/capabilities.spec.ts+++ b/tests/library/capabilities.spec.ts@@ -16,7 +16,7 @@import os from 'os';import url from 'url';-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';it('SharedArrayBuffer should work @smoke', async function({ contextFactory, httpsServer, browserName }) {it.fail(browserName === 'webkit', 'no shared array buffer on webkit');diff --git a/tests/channels.spec.ts b/tests/library/channels.spec.tssimilarity index 99%rename from tests/channels.spec.tsrename to tests/library/channels.spec.tsindex d4e444b1ce..00ac430ae4 100644--- a/tests/channels.spec.ts+++ b/tests/library/channels.spec.ts@@ -16,7 +16,7 @@*/import domain from 'domain';-import { playwrightTest as it, expect } from './config/browserTest';+import { playwrightTest as it, expect } from '../config/browserTest';// Use something worker-scoped (e.g. launch args) to force a new worker for this file.// Otherwise, a browser launched for other tests in this worker will affect the expectations.diff --git a/tests/chromium/chromium.spec.ts b/tests/library/chromium/chromium.spec.tssimilarity index 98%rename from tests/chromium/chromium.spec.tsrename to tests/library/chromium/chromium.spec.tsindex 2d7f12ada1..369c079d5c 100644--- a/tests/chromium/chromium.spec.ts+++ b/tests/library/chromium/chromium.spec.ts@@ -15,12 +15,12 @@* limitations under the License.*/-import { contextTest as test, expect } from '../config/browserTest';-import { playwrightTest } from '../config/browserTest';+import { contextTest as test, expect } from '../../config/browserTest';+import { playwrightTest } from '../../config/browserTest';import http from 'http';import fs from 'fs';-import { getUserAgent } from '../../packages/playwright-core/lib/utils/utils';-import { suppressCertificateWarning } from '../config/utils';+import { getUserAgent } from '../../../packages/playwright-core/lib/utils/utils';+import { suppressCertificateWarning } from '../../config/utils';test('should create a worker from a service worker', async ({ page, server }) => {const [worker] = await Promise.all([diff --git a/tests/chromium/css-coverage.spec.ts b/tests/library/chromium/css-coverage.spec.tssimilarity index 98%rename from tests/chromium/css-coverage.spec.tsrename to tests/library/chromium/css-coverage.spec.tsindex 800f9fda19..bb385caa6f 100644--- a/tests/chromium/css-coverage.spec.ts+++ b/tests/library/chromium/css-coverage.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { contextTest as it, expect } from '../config/browserTest';+import { contextTest as it, expect } from '../../config/browserTest';it('should work', async function({ page, server }) {await page.coverage.startCSSCoverage();diff --git a/tests/chromium/js-coverage.spec.ts b/tests/library/chromium/js-coverage.spec.tssimilarity index 98%rename from tests/chromium/js-coverage.spec.tsrename to tests/library/chromium/js-coverage.spec.tsindex b08dd6d603..09fcb69f11 100644--- a/tests/chromium/js-coverage.spec.ts+++ b/tests/library/chromium/js-coverage.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { contextTest as it, expect } from '../config/browserTest';+import { contextTest as it, expect } from '../../config/browserTest';it.skip(({ trace }) => trace === 'on');diff --git a/tests/chromium/launcher.spec.ts b/tests/library/chromium/launcher.spec.tssimilarity index 98%rename from tests/chromium/launcher.spec.tsrename to tests/library/chromium/launcher.spec.tsindex 00a9ee7302..89ca8a3eb6 100644--- a/tests/chromium/launcher.spec.ts+++ b/tests/library/chromium/launcher.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { playwrightTest as it, expect } from '../config/browserTest';+import { playwrightTest as it, expect } from '../../config/browserTest';it('should throw with remote-debugging-pipe argument', async ({ browserType, mode }) => {it.skip(mode !== 'default');diff --git a/tests/chromium/oopif.spec.ts b/tests/library/chromium/oopif.spec.tssimilarity index 99%rename from tests/chromium/oopif.spec.tsrename to tests/library/chromium/oopif.spec.tsindex 4fefe2849d..49855fb3f0 100644--- a/tests/chromium/oopif.spec.ts+++ b/tests/library/chromium/oopif.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { contextTest as it, expect } from '../config/browserTest';+import { contextTest as it, expect } from '../../config/browserTest';it.use({launchOptions: async ({ launchOptions }, use) => {diff --git a/tests/chromium/oopif.spec.ts-snapshots/screenshot-oopif-chromium.png b/tests/library/chromium/oopif.spec.ts-snapshots/screenshot-oopif-chromium.pngsimilarity index 100%rename from tests/chromium/oopif.spec.ts-snapshots/screenshot-oopif-chromium.pngrename to tests/library/chromium/oopif.spec.ts-snapshots/screenshot-oopif-chromium.pngdiff --git a/tests/chromium/session.spec.ts b/tests/library/chromium/session.spec.tssimilarity index 97%rename from tests/chromium/session.spec.tsrename to tests/library/chromium/session.spec.tsindex 02d735dd7d..bb9dfc4af1 100644--- a/tests/chromium/session.spec.ts+++ b/tests/library/chromium/session.spec.ts@@ -14,8 +14,8 @@* limitations under the License.*/-import { contextTest as it, expect } from '../config/browserTest';-import { browserTest } from '../config/browserTest';+import { contextTest as it, expect } from '../../config/browserTest';+import { browserTest } from '../../config/browserTest';it('should work', async function({ page }) {const client = await page.context().newCDPSession(page);diff --git a/tests/chromium/tracing.spec.ts b/tests/library/chromium/tracing.spec.tssimilarity index 98%rename from tests/chromium/tracing.spec.tsrename to tests/library/chromium/tracing.spec.tsindex 028acf5b0d..07bfdec534 100644--- a/tests/chromium/tracing.spec.ts+++ b/tests/library/chromium/tracing.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { browserTest as it, expect } from '../config/browserTest';+import { browserTest as it, expect } from '../../config/browserTest';import fs from 'fs';import path from 'path';diff --git a/tests/component-parser.spec.ts b/tests/library/component-parser.spec.tssimilarity index 97%rename from tests/component-parser.spec.tsrename to tests/library/component-parser.spec.tsindex fe03b6fb61..250fda319a 100644--- a/tests/component-parser.spec.ts+++ b/tests/library/component-parser.spec.ts@@ -14,8 +14,8 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';-import { ParsedComponentSelector, parseComponentSelector } from '../packages/playwright-core/src/server/injected/componentUtils';+import { playwrightTest as it, expect } from '../config/browserTest';+import { ParsedComponentSelector, parseComponentSelector } from '../../packages/playwright-core/src/server/injected/componentUtils';const parse = parseComponentSelector;const serialize = (parsed: ParsedComponentSelector) => {diff --git a/tests/css-parser.spec.ts b/tests/library/css-parser.spec.tssimilarity index 95%rename from tests/css-parser.spec.tsrename to tests/library/css-parser.spec.tsindex 6bec605839..a6b9a2b9d7 100644--- a/tests/css-parser.spec.ts+++ b/tests/library/css-parser.spec.ts@@ -14,8 +14,8 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';-import { parseCSS, serializeSelector as serialize } from '../packages/playwright-core/lib/server/common/cssParser';+import { playwrightTest as it, expect } from '../config/browserTest';+import { parseCSS, serializeSelector as serialize } from '../../packages/playwright-core/lib/server/common/cssParser';const parse = (selector: string) => {return parseCSS(selector, new Set(['text', 'not', 'has', 'react', 'scope', 'right-of', 'is'])).selector;diff --git a/tests/defaultbrowsercontext-1.spec.ts b/tests/library/defaultbrowsercontext-1.spec.tssimilarity index 98%rename from tests/defaultbrowsercontext-1.spec.tsrename to tests/library/defaultbrowsercontext-1.spec.tsindex ea877f7679..f0a886dd31 100644--- a/tests/defaultbrowsercontext-1.spec.ts+++ b/tests/library/defaultbrowsercontext-1.spec.ts@@ -15,8 +15,8 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';-import { verifyViewport } from './config/utils';+import { playwrightTest as it, expect } from '../config/browserTest';+import { verifyViewport } from '../config/utils';import fs from 'fs';it('context.cookies() should work @smoke', async ({ server, launchPersistent, defaultSameSiteCookieValue }) => {diff --git a/tests/defaultbrowsercontext-2.spec.ts b/tests/library/defaultbrowsercontext-2.spec.tssimilarity index 99%rename from tests/defaultbrowsercontext-2.spec.tsrename to tests/library/defaultbrowsercontext-2.spec.tsindex 6c66fb3043..3cde43b3d5 100644--- a/tests/defaultbrowsercontext-2.spec.ts+++ b/tests/library/defaultbrowsercontext-2.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';+import { playwrightTest as it, expect } from '../config/browserTest';import fs from 'fs';import path from 'path';diff --git a/tests/download.spec.ts b/tests/library/download.spec.tssimilarity index 99%rename from tests/download.spec.tsrename to tests/library/download.spec.tsindex 2b9a493583..110f439e6c 100644--- a/tests/download.spec.ts+++ b/tests/library/download.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';import fs from 'fs';import path from 'path';import crypto from 'crypto';diff --git a/tests/downloads-path.spec.ts b/tests/library/downloads-path.spec.tssimilarity index 98%rename from tests/downloads-path.spec.tsrename to tests/library/downloads-path.spec.tsindex 5983113831..3af0d22d5b 100644--- a/tests/downloads-path.spec.ts+++ b/tests/library/downloads-path.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';+import { playwrightTest as it, expect } from '../config/browserTest';import fs from 'fs';import path from 'path';diff --git a/tests/emulation-focus.spec.ts b/tests/library/emulation-focus.spec.tssimilarity index 98%rename from tests/emulation-focus.spec.tsrename to tests/library/emulation-focus.spec.tsindex 5df92dc58d..75953e9591 100644--- a/tests/emulation-focus.spec.ts+++ b/tests/library/emulation-focus.spec.ts@@ -15,8 +15,8 @@* limitations under the License.*/-import { contextTest as it, browserTest, expect } from './config/browserTest';-import { attachFrame } from './config/utils';+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);diff --git a/tests/emulation-focus.spec.ts-snapshots/grid-cell-0-chromium.png b/tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-chromium.pngsimilarity index 100%rename from tests/emulation-focus.spec.ts-snapshots/grid-cell-0-chromium.pngrename to tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-chromium.pngdiff --git a/tests/emulation-focus.spec.ts-snapshots/grid-cell-0-firefox.png b/tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-firefox.pngsimilarity index 100%rename from tests/emulation-focus.spec.ts-snapshots/grid-cell-0-firefox.pngrename to tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-firefox.pngdiff --git a/tests/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.png b/tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.pngsimilarity index 100%rename from tests/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.pngrename to tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.pngdiff --git a/tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-chromium.png b/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-chromium.pngsimilarity index 100%rename from tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-chromium.pngrename to tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-chromium.pngdiff --git a/tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-firefox.png b/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-firefox.pngsimilarity index 100%rename from tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-firefox.pngrename to tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-firefox.pngdiff --git a/tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.png b/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.pngsimilarity index 100%rename from tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.pngrename to tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.pngdiff --git a/tests/favicon.spec.ts b/tests/library/favicon.spec.tssimilarity index 97%rename from tests/favicon.spec.tsrename to tests/library/favicon.spec.tsindex 82df7e7c68..6c9e206168 100644--- a/tests/favicon.spec.ts+++ b/tests/library/favicon.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { contextTest as it } from './config/browserTest';+import { contextTest as it } from '../config/browserTest';it('should load svg favicon with prefer-color-scheme', async ({ page, server, browserName, channel, headless, asset }) => {it.skip(headless && browserName !== 'firefox', 'headless browsers, except firefox, do not request favicons');diff --git a/tests/firefox/launcher.spec.ts b/tests/library/firefox/launcher.spec.tssimilarity index 93%rename from tests/firefox/launcher.spec.tsrename to tests/library/firefox/launcher.spec.tsindex b37aaeae63..45c9050f7e 100644--- a/tests/firefox/launcher.spec.ts+++ b/tests/library/firefox/launcher.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { playwrightTest as it, expect } from '../config/browserTest';+import { playwrightTest as it, expect } from '../../config/browserTest';it('should pass firefox user preferences', async ({ browserType }) => {const browser = await browserType.launch({diff --git a/tests/geolocation.spec.ts b/tests/library/geolocation.spec.tssimilarity index 98%rename from tests/geolocation.spec.tsrename to tests/library/geolocation.spec.tsindex 3cbb8f1741..424b03e43d 100644--- a/tests/geolocation.spec.ts+++ b/tests/library/geolocation.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should work @smoke', async ({ server, contextFactory }) => {const context = await contextFactory();diff --git a/tests/global-fetch-cookie.spec.ts b/tests/library/global-fetch-cookie.spec.tssimilarity index 99%rename from tests/global-fetch-cookie.spec.tsrename to tests/library/global-fetch-cookie.spec.tsindex 6c6fdf44c2..e0b91d2208 100644--- a/tests/global-fetch-cookie.spec.ts+++ b/tests/library/global-fetch-cookie.spec.ts@@ -17,7 +17,7 @@import fs from 'fs';import http from 'http';import type { APIRequestContext } from 'playwright-core';-import { expect, playwrightTest } from './config/browserTest';+import { expect, playwrightTest } from '../config/browserTest';export type GlobalFetchFixtures = {request: APIRequestContext;diff --git a/tests/global-fetch.spec.ts b/tests/library/global-fetch.spec.tssimilarity index 98%rename from tests/global-fetch.spec.tsrename to tests/library/global-fetch.spec.tsindex 82bd8683eb..e86a56bc92 100644--- a/tests/global-fetch.spec.ts+++ b/tests/library/global-fetch.spec.ts@@ -17,8 +17,8 @@import http from 'http';import os from 'os';import * as util from 'util';-import { getPlaywrightVersion } from '../packages/playwright-core/lib/utils/utils';-import { expect, playwrightTest as it } from './config/browserTest';+import { getPlaywrightVersion } from '../../packages/playwright-core/lib/utils/utils';+import { expect, playwrightTest as it } from '../config/browserTest';it.skip(({ mode }) => mode !== 'default');diff --git a/tests/har.spec.ts b/tests/library/har.spec.tssimilarity index 98%rename from tests/har.spec.tsrename to tests/library/har.spec.tsindex ead0a95770..f0c70cb993 100644--- a/tests/har.spec.ts+++ b/tests/library/har.spec.ts@@ -15,13 +15,13 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';import * as path from 'path';import fs from 'fs';import http2 from 'http2';import type { BrowserContext, BrowserContextOptions } from 'playwright-core';import type { AddressInfo } from 'net';-import type { Log } from '../packages/playwright-core/src/server/supplements/har/har';+import type { Log } from '../../packages/playwright-core/src/server/supplements/har/har';async function pageWithHar(contextFactory: (options?: BrowserContextOptions) => Promise<BrowserContext>, testInfo: any, outputPath: string = 'test.har') {const harPath = testInfo.outputPath(outputPath);@@ -48,7 +48,7 @@ it('should have version and creator', async ({ contextFactory, server }, testInfconst log = await getLog();expect(log.version).toBe('1.2');expect(log.creator.name).toBe('Playwright');- expect(log.creator.version).toBe(require('../package.json')['version']);+ expect(log.creator.version).toBe(require('../../package.json')['version']);});it('should have browser', async ({ browserName, browser, contextFactory, server }, testInfo) => {@@ -500,8 +500,8 @@ it('should contain http2 for http2 requests', async ({ contextFactory, browserNait.fixme(browserName === 'webkit' && platform === 'win32');const server = http2.createSecureServer({- key: await fs.promises.readFile(path.join(__dirname, '..', 'utils', 'testserver', 'key.pem')),- cert: await fs.promises.readFile(path.join(__dirname, '..', 'utils', 'testserver', 'cert.pem')),+ key: await fs.promises.readFile(path.join(__dirname, '..', '..', 'utils', 'testserver', 'key.pem')),+ cert: await fs.promises.readFile(path.join(__dirname, '..', '..', 'utils', 'testserver', 'cert.pem')),});server.on('stream', stream => {stream.respond({diff --git a/tests/headful.spec.ts b/tests/library/headful.spec.tssimilarity index 99%rename from tests/headful.spec.tsrename to tests/library/headful.spec.tsindex 5b5287456c..b362e7d912 100644--- a/tests/headful.spec.ts+++ b/tests/library/headful.spec.ts@@ -16,7 +16,7 @@import pixelmatch from 'pixelmatch';import { PNG } from 'pngjs';-import { expect, playwrightTest as it } from './config/browserTest';+import { expect, playwrightTest as it } from '../config/browserTest';it('should have default url when launching browser @smoke', async ({ browserType, createUserDataDir }) => {const browserContext = await browserType.launchPersistentContext(await createUserDataDir(), { headless: false });diff --git a/tests/hit-target.spec.ts b/tests/library/hit-target.spec.tssimilarity index 99%rename from tests/hit-target.spec.tsrename to tests/library/hit-target.spec.tsindex 57c3aaf802..c36d3e665a 100644--- a/tests/hit-target.spec.ts+++ b/tests/library/hit-target.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';declare const renderComponent;declare const e;diff --git a/tests/ignorehttpserrors.spec.ts b/tests/library/ignorehttpserrors.spec.tssimilarity index 98%rename from tests/ignorehttpserrors.spec.tsrename to tests/library/ignorehttpserrors.spec.tsindex 71da9a92fe..02ccf3af77 100644--- a/tests/ignorehttpserrors.spec.ts+++ b/tests/library/ignorehttpserrors.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should work @smoke', async ({ browser, httpsServer }) => {let error = null;diff --git a/tests/inspector/cli-codegen-1.spec.ts b/tests/library/inspector/cli-codegen-1.spec.tssimilarity index 100%rename from tests/inspector/cli-codegen-1.spec.tsrename to tests/library/inspector/cli-codegen-1.spec.tsdiff --git a/tests/inspector/cli-codegen-2.spec.ts b/tests/library/inspector/cli-codegen-2.spec.tssimilarity index 100%rename from tests/inspector/cli-codegen-2.spec.tsrename to tests/library/inspector/cli-codegen-2.spec.tsdiff --git a/tests/inspector/cli-codegen-3.spec.ts b/tests/library/inspector/cli-codegen-3.spec.tssimilarity index 100%rename from tests/inspector/cli-codegen-3.spec.tsrename to tests/library/inspector/cli-codegen-3.spec.tsdiff --git a/tests/inspector/cli-codegen-csharp.spec.ts b/tests/library/inspector/cli-codegen-csharp.spec.tssimilarity index 99%rename from tests/inspector/cli-codegen-csharp.spec.tsrename to tests/library/inspector/cli-codegen-csharp.spec.tsindex ce2ac01dc0..f78b35ad82 100644--- a/tests/inspector/cli-codegen-csharp.spec.ts+++ b/tests/library/inspector/cli-codegen-csharp.spec.ts@@ -18,7 +18,7 @@ import path from 'path';import fs from 'fs';import { test, expect } from './inspectorTest';-const emptyHTML = new URL('file://' + path.join(__dirname, '..', 'assets', 'empty.html')).toString();+const emptyHTML = new URL('file://' + path.join(__dirname, '..', '..', 'assets', 'empty.html')).toString();const launchOptions = (channel: string) => {return channel ? `Headless = false,\n Channel = "${channel}",` : `Headless = false,`;};diff --git a/tests/inspector/cli-codegen-java.spec.ts b/tests/library/inspector/cli-codegen-java.spec.tssimilarity index 99%rename from tests/inspector/cli-codegen-java.spec.tsrename to tests/library/inspector/cli-codegen-java.spec.tsindex b8170313e8..e41a6746b8 100644--- a/tests/inspector/cli-codegen-java.spec.ts+++ b/tests/library/inspector/cli-codegen-java.spec.ts@@ -18,7 +18,7 @@ import fs from 'fs';import path from 'path';import { test, expect } from './inspectorTest';-const emptyHTML = new URL('file://' + path.join(__dirname, '..', 'assets', 'empty.html')).toString();+const emptyHTML = new URL('file://' + path.join(__dirname, '..', '..', 'assets', 'empty.html')).toString();const launchOptions = (channel: string) => {return channel ? `.setHeadless(false)\n .setChannel("${channel}")` : '.setHeadless(false)';};diff --git a/tests/inspector/cli-codegen-javascript.spec.ts b/tests/library/inspector/cli-codegen-javascript.spec.tssimilarity index 99%rename from tests/inspector/cli-codegen-javascript.spec.tsrename to tests/library/inspector/cli-codegen-javascript.spec.tsindex 6c8308d7cc..fe202ccb2c 100644--- a/tests/inspector/cli-codegen-javascript.spec.ts+++ b/tests/library/inspector/cli-codegen-javascript.spec.ts@@ -18,7 +18,7 @@ import fs from 'fs';import path from 'path';import { test, expect } from './inspectorTest';-const emptyHTML = new URL('file://' + path.join(__dirname, '..', 'assets', 'empty.html')).toString();+const emptyHTML = new URL('file://' + path.join(__dirname, '..', '..', 'assets', 'empty.html')).toString();const launchOptions = (channel: string) => {return channel ? `headless: false,\n channel: '${channel}'` : 'headless: false';diff --git a/tests/inspector/cli-codegen-python-async.spec.ts b/tests/library/inspector/cli-codegen-python-async.spec.tssimilarity index 99%rename from tests/inspector/cli-codegen-python-async.spec.tsrename to tests/library/inspector/cli-codegen-python-async.spec.tsindex db62c6b2b0..b7b2507adf 100644--- a/tests/inspector/cli-codegen-python-async.spec.ts+++ b/tests/library/inspector/cli-codegen-python-async.spec.ts@@ -18,7 +18,7 @@ import fs from 'fs';import path from 'path';import { test, expect } from './inspectorTest';-const emptyHTML = new URL('file://' + path.join(__dirname, '..', 'assets', 'empty.html')).toString();+const emptyHTML = new URL('file://' + path.join(__dirname, '..', '..', 'assets', 'empty.html')).toString();const launchOptions = (channel: string) => {return channel ? `headless=False, channel="${channel}"` : 'headless=False';};diff --git a/tests/inspector/cli-codegen-python.spec.ts b/tests/library/inspector/cli-codegen-python.spec.tssimilarity index 99%rename from tests/inspector/cli-codegen-python.spec.tsrename to tests/library/inspector/cli-codegen-python.spec.tsindex 594483a92d..53bb91924a 100644--- a/tests/inspector/cli-codegen-python.spec.ts+++ b/tests/library/inspector/cli-codegen-python.spec.ts@@ -18,7 +18,7 @@ import fs from 'fs';import path from 'path';import { test, expect } from './inspectorTest';-const emptyHTML = new URL('file://' + path.join(__dirname, '..', 'assets', 'empty.html')).toString();+const emptyHTML = new URL('file://' + path.join(__dirname, '..', '..', 'assets', 'empty.html')).toString();const launchOptions = (channel: string) => {return channel ? `headless=False, channel="${channel}"` : 'headless=False';};diff --git a/tests/inspector/cli-codegen-test.spec.ts b/tests/library/inspector/cli-codegen-test.spec.tssimilarity index 98%rename from tests/inspector/cli-codegen-test.spec.tsrename to tests/library/inspector/cli-codegen-test.spec.tsindex 82dad27b2a..25604566f0 100644--- a/tests/inspector/cli-codegen-test.spec.ts+++ b/tests/library/inspector/cli-codegen-test.spec.ts@@ -18,7 +18,7 @@ import fs from 'fs';import path from 'path';import { test, expect } from './inspectorTest';-const emptyHTML = new URL('file://' + path.join(__dirname, '..', 'assets', 'empty.html')).toString();+const emptyHTML = new URL('file://' + path.join(__dirname, '..', '..', 'assets', 'empty.html')).toString();test('should print the correct imports and context options', async ({ runCLI }) => {const cli = runCLI([emptyHTML]);diff --git a/tests/inspector/console-api.spec.ts b/tests/library/inspector/console-api.spec.tssimilarity index 100%rename from tests/inspector/console-api.spec.tsrename to tests/library/inspector/console-api.spec.tsdiff --git a/tests/inspector/inspectorTest.ts b/tests/library/inspector/inspectorTest.tssimilarity index 94%rename from tests/inspector/inspectorTest.tsrename to tests/library/inspector/inspectorTest.tsindex a78779823d..5b8c1625cf 100644--- a/tests/inspector/inspectorTest.ts+++ b/tests/library/inspector/inspectorTest.ts@@ -14,11 +14,11 @@* limitations under the License.*/-import { contextTest } from '../config/browserTest';+import { contextTest } from '../../config/browserTest';import type { Page } from 'playwright-core';import * as path from 'path';-import type { Source } from '../../packages/playwright-core/src/server/supplements/recorder/recorderTypes';-import { CommonFixtures, TestChildProcess } from '../config/commonFixtures';+import type { Source } from '../../../packages/playwright-core/src/server/supplements/recorder/recorderTypes';+import { CommonFixtures, TestChildProcess } from '../../config/commonFixtures';export { expect } from '@playwright/test';type CLITestArgs = {@@ -28,7 +28,7 @@ type CLITestArgs = {runCLI: (args: string[]) => CLIMock;};-const playwrightToAutomateInspector = require('../../packages/playwright-core/lib/inProcessFactory').createInProcessPlaywright();+const playwrightToAutomateInspector = require('../../../packages/playwright-core/lib/inProcessFactory').createInProcessPlaywright();export const test = contextTest.extend<CLITestArgs>({recorderPageGetter: async ({ context, toImpl, mode }, run, testInfo) => {@@ -186,7 +186,7 @@ class CLIMock {constructor(childProcess: CommonFixtures['childProcess'], browserName: string, channel: string | undefined, headless: boolean | undefined, args: string[], executablePath: string | undefined) {const nodeArgs = ['node',- path.join(__dirname, '..', '..', 'packages', 'playwright-core', 'lib', 'cli', 'cli.js'),+ path.join(__dirname, '..', '..', '..', 'packages', 'playwright-core', 'lib', 'cli', 'cli.js'),'codegen',...args,`--browser=${browserName}`,diff --git a/tests/inspector/pause.spec.ts b/tests/library/inspector/pause.spec.tssimilarity index 100%rename from tests/inspector/pause.spec.tsrename to tests/library/inspector/pause.spec.tsdiff --git a/tests/launcher.spec.ts b/tests/library/launcher.spec.tssimilarity index 96%rename from tests/launcher.spec.tsrename to tests/library/launcher.spec.tsindex 4be5982e06..068f217aba 100644--- a/tests/launcher.spec.ts+++ b/tests/library/launcher.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';+import { playwrightTest as it, expect } from '../config/browserTest';it('should have an errors object', async ({ playwright }) => {expect(String(playwright.errors.TimeoutError)).toContain('TimeoutError');diff --git a/tests/logger.spec.ts b/tests/library/logger.spec.tssimilarity index 96%rename from tests/logger.spec.tsrename to tests/library/logger.spec.tsindex 8b77d27c39..b75a2adccc 100644--- a/tests/logger.spec.ts+++ b/tests/library/logger.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';+import { playwrightTest as it, expect } from '../config/browserTest';it('should log @smoke', async ({ browserType }) => {const log = [];diff --git a/tests/modernizr.spec.ts b/tests/library/modernizr.spec.tssimilarity index 98%rename from tests/modernizr.spec.tsrename to tests/library/modernizr.spec.tsindex e5c5f0c7f7..394ca484eb 100644--- a/tests/modernizr.spec.ts+++ b/tests/library/modernizr.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';import fs from 'fs';async function checkFeatures(name: string, context: any, server: any) {diff --git a/tests/pdf.spec.ts b/tests/library/pdf.spec.tssimilarity index 94%rename from tests/pdf.spec.tsrename to tests/library/pdf.spec.tsindex 0764c524ef..74b89b776e 100644--- a/tests/pdf.spec.ts+++ b/tests/library/pdf.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';import fs from 'fs';it('should be able to save file', async ({ contextFactory, headless, browserName }, testInfo) => {diff --git a/tests/permissions.spec.ts b/tests/library/permissions.spec.tssimilarity index 99%rename from tests/permissions.spec.tsrename to tests/library/permissions.spec.tsindex d3de464dbe..13b8c354f9 100644--- a/tests/permissions.spec.ts+++ b/tests/library/permissions.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';function getPermission(page, name) {return page.evaluate(name => navigator.permissions.query({ name }).then(result => result.state), name);diff --git a/tests/popup.spec.ts b/tests/library/popup.spec.tssimilarity index 99%rename from tests/popup.spec.tsrename to tests/library/popup.spec.tsindex 5b631fb9f9..79d7f049d3 100644--- a/tests/popup.spec.ts+++ b/tests/library/popup.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should inherit user agent from browser context @smoke', async function({ browser, server }) {const context = await browser.newContext({diff --git a/tests/port-forwarding-server.spec.ts b/tests/library/port-forwarding-server.spec.tssimilarity index 97%rename from tests/port-forwarding-server.spec.tsrename to tests/library/port-forwarding-server.spec.tsindex 3310989253..deda2af5a0 100644--- a/tests/port-forwarding-server.spec.ts+++ b/tests/library/port-forwarding-server.spec.ts@@ -19,7 +19,7 @@ import http from 'http';import path from 'path';import net from 'net';-import { contextTest, expect } from './config/browserTest';+import { contextTest, expect } from '../config/browserTest';import type { Page, Browser } from 'playwright-core';class OutOfProcessPlaywrightServer {@@ -27,7 +27,7 @@ class OutOfProcessPlaywrightServer {private _receivedPortPromise: Promise<string>;constructor(port: number, proxyPort: number) {- this._driverProcess = childProcess.fork(path.join(__dirname, '..', 'packages', 'playwright-core', 'lib', 'cli', 'cli.js'), ['run-server', '--port', port.toString()], {+ this._driverProcess = childProcess.fork(path.join(__dirname, '..', '..', 'packages', 'playwright-core', 'lib', 'cli', 'cli.js'), ['run-server', '--port', port.toString()], {stdio: 'pipe',detached: true,env: {diff --git a/tests/proxy.spec.ts b/tests/library/proxy.spec.tssimilarity index 99%rename from tests/proxy.spec.tsrename to tests/library/proxy.spec.tsindex 5a336f30d0..c339756763 100644--- a/tests/proxy.spec.ts+++ b/tests/library/proxy.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { playwrightTest as it, expect } from './config/browserTest';+import { playwrightTest as it, expect } from '../config/browserTest';import socks from 'socksv5';import net from 'net';diff --git a/tests/resource-timing.spec.ts b/tests/library/resource-timing.spec.tssimilarity index 98%rename from tests/resource-timing.spec.tsrename to tests/library/resource-timing.spec.tsindex ab4c9a00d9..383c6c5f44 100644--- a/tests/resource-timing.spec.ts+++ b/tests/library/resource-timing.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should work @smoke', async ({ contextFactory, server }) => {const context = await contextFactory();diff --git a/tests/role-utils.spec.ts b/tests/library/role-utils.spec.tssimilarity index 97%rename from tests/role-utils.spec.tsrename to tests/library/role-utils.spec.tsindex 1e0d856eaf..e61cab7f24 100644--- a/tests/role-utils.spec.ts+++ b/tests/library/role-utils.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { contextTest as test, expect } from './config/browserTest';+import { contextTest as test, expect } from '../config/browserTest';import fs from 'fs';test('wpt accname', async ({ page, asset, server, browserName }) => {diff --git a/tests/screenshot.spec.ts b/tests/library/screenshot.spec.tssimilarity index 99%rename from tests/screenshot.spec.tsrename to tests/library/screenshot.spec.tsindex 64943ed5a2..78d58b91ff 100644--- a/tests/screenshot.spec.ts+++ b/tests/library/screenshot.spec.ts@@ -15,9 +15,9 @@* limitations under the License.*/-import { expect, browserTest } from './config/browserTest';+import { expect, browserTest } from '../config/browserTest';import { PNG } from 'pngjs';-import { verifyViewport } from './config/utils';+import { verifyViewport } from '../config/utils';browserTest.describe('page screenshot', () => {browserTest.skip(({ browserName, headless }) => browserName === 'firefox' && !headless, 'Firefox headed produces a different image.');diff --git a/tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-chromium.png b/tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-chromium.png b/tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-firefox.png b/tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-firefox.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-firefox.pngrename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-firefox.pngdiff --git a/tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-webkit.png b/tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-firefox.png b/tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-firefox.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-firefox.pngrename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-firefox.pngdiff --git a/tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-webkit.png b/tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-0-chromium.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/grid-cell-0-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/grid-cell-0-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-0-firefox.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-firefox.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/grid-cell-0-firefox.pngrename to tests/library/screenshot.spec.ts-snapshots/grid-cell-0-firefox.pngdiff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-0-webkit.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/grid-cell-0-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/grid-cell-0-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-1-chromium.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/grid-cell-1-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/grid-cell-1-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-1-firefox.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-firefox.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/grid-cell-1-firefox.pngrename to tests/library/screenshot.spec.ts-snapshots/grid-cell-1-firefox.pngdiff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-1-webkit.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/grid-cell-1-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/grid-cell-1-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/hanging-main-resource-firefox.png b/tests/library/screenshot.spec.ts-snapshots/hanging-main-resource-firefox.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/hanging-main-resource-firefox.pngrename to tests/library/screenshot.spec.ts-snapshots/hanging-main-resource-firefox.pngdiff --git a/tests/screenshot.spec.ts-snapshots/hanging-main-resource-webkit.png b/tests/library/screenshot.spec.ts-snapshots/hanging-main-resource-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/hanging-main-resource-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/hanging-main-resource-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-firefox.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-firefox.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-firefox.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-firefox.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-firefox.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-firefox.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-firefox.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-firefox.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-firefox.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-firefox.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-firefox.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-firefox.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-firefox.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-firefox.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-firefox.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-firefox.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-clip-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-clip-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-clip-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-clip-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-clip-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-clip-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-clip-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-clip-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-chromium.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-chromium.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-chromium.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-webkit.pngdiff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-webkit.pngsimilarity index 100%rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-webkit.pngrename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-webkit.pngdiff --git a/tests/selector-generator.spec.ts b/tests/library/selector-generator.spec.tssimilarity index 99%rename from tests/selector-generator.spec.tsrename to tests/library/selector-generator.spec.tsindex 8e31efd025..95b7cae875 100644--- a/tests/selector-generator.spec.ts+++ b/tests/library/selector-generator.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';import type { Page, Frame } from 'playwright-core';async function generate(pageOrFrame: Page | Frame, target: string): Promise<string> {diff --git a/tests/selectors-register.spec.ts b/tests/library/selectors-register.spec.tssimilarity index 99%rename from tests/selectors-register.spec.tsrename to tests/library/selectors-register.spec.tsindex c5afda5166..4908fa7093 100644--- a/tests/selectors-register.spec.ts+++ b/tests/library/selectors-register.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';it('should work', async ({ playwright, browser }) => {const createTagSelector = () => ({diff --git a/tests/signals.spec.ts b/tests/library/signals.spec.tssimilarity index 98%rename from tests/signals.spec.tsrename to tests/library/signals.spec.tsindex fb59bc182c..2c6a43d2f8 100644--- a/tests/signals.spec.ts+++ b/tests/library/signals.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { playwrightTest as test, expect } from './config/browserTest';+import { playwrightTest as test, expect } from '../config/browserTest';import { execSync } from 'child_process';test.slow();diff --git a/tests/slowmo.spec.ts b/tests/library/slowmo.spec.tssimilarity index 98%rename from tests/slowmo.spec.tsrename to tests/library/slowmo.spec.tsindex 600286d9b9..e4a561c543 100644--- a/tests/slowmo.spec.ts+++ b/tests/library/slowmo.spec.ts@@ -14,8 +14,8 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';-import { attachFrame } from './config/utils';+import { contextTest as it, expect } from '../config/browserTest';+import { attachFrame } from '../config/utils';async function checkSlowMo(toImpl, page, task) {let didSlowMo = false;diff --git a/tests/snapshotter.spec.ts b/tests/library/snapshotter.spec.tssimilarity index 98%rename from tests/snapshotter.spec.tsrename to tests/library/snapshotter.spec.tsindex bf1c417189..6e87e48b08 100644--- a/tests/snapshotter.spec.ts+++ b/tests/library/snapshotter.spec.ts@@ -14,8 +14,8 @@* limitations under the License.*/-import { contextTest, expect } from './config/browserTest';-import { InMemorySnapshotter } from '../packages/playwright-core/lib/server/trace/test/inMemorySnapshotter';+import { contextTest, expect } from '../config/browserTest';+import { InMemorySnapshotter } from '../../packages/playwright-core/lib/server/trace/test/inMemorySnapshotter';const it = contextTest.extend<{ snapshotter: InMemorySnapshotter }>({snapshotter: async ({ mode, toImpl, context }, run, testInfo) => {diff --git a/tests/tap.spec.ts b/tests/library/tap.spec.tssimilarity index 99%rename from tests/tap.spec.tsrename to tests/library/tap.spec.tsindex efd4556f7d..5831787a38 100644--- a/tests/tap.spec.ts+++ b/tests/library/tap.spec.ts@@ -14,7 +14,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';import { ElementHandle } from 'playwright-core';import type { ServerResponse } from 'http';diff --git a/tests/trace-viewer/trace-viewer.spec.ts b/tests/library/trace-viewer.spec.tssimilarity index 100%rename from tests/trace-viewer/trace-viewer.spec.tsrename to tests/library/trace-viewer.spec.tsdiff --git a/tests/tracing.spec.ts b/tests/library/tracing.spec.tssimilarity index 99%rename from tests/tracing.spec.tsrename to tests/library/tracing.spec.tsindex 0ee7ab2366..ff7a47bc59 100644--- a/tests/tracing.spec.ts+++ b/tests/library/tracing.spec.ts@@ -17,8 +17,8 @@import fs from 'fs';import jpeg from 'jpeg-js';import path from 'path';-import { browserTest, contextTest as test, expect } from './config/browserTest';-import { parseTrace } from './config/utils';+import { browserTest, contextTest as test, expect } from '../config/browserTest';+import { parseTrace } from '../config/utils';test.skip(({ trace }) => trace === 'on');diff --git a/tests/video.spec.ts b/tests/library/video.spec.tssimilarity index 99%rename from tests/video.spec.tsrename to tests/library/video.spec.tsindex 9ee89f08ac..3fedd36b22 100644--- a/tests/video.spec.ts+++ b/tests/library/video.spec.ts@@ -14,12 +14,12 @@* limitations under the License.*/-import { browserTest as it, expect } from './config/browserTest';+import { browserTest as it, expect } from '../config/browserTest';import fs from 'fs';import path from 'path';import { spawnSync } from 'child_process';import { PNG } from 'pngjs';-import { registry } from '../packages/playwright-core/lib/utils/registry';+import { registry } from '../../packages/playwright-core/lib/utils/registry';const ffmpeg = registry.findExecutable('ffmpeg')!.executablePath('javascript');diff --git a/tests/web-socket.spec.ts b/tests/library/web-socket.spec.tssimilarity index 99%rename from tests/web-socket.spec.tsrename to tests/library/web-socket.spec.tsindex 6aaec2d0af..041bc6f72b 100644--- a/tests/web-socket.spec.ts+++ b/tests/library/web-socket.spec.ts@@ -15,7 +15,7 @@* limitations under the License.*/-import { contextTest as it, expect } from './config/browserTest';+import { contextTest as it, expect } from '../config/browserTest';import { Server as WebSocketServer } from 'ws';it('should work @smoke', async ({ page, server }) => {