diff --git a/tests/beforeunload.spec.ts b/tests/library/beforeunload.spec.ts
similarity index 98%
rename from tests/beforeunload.spec.ts
rename to tests/library/beforeunload.spec.ts
index 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.ts
similarity index 95%
rename from tests/browser.spec.ts
rename to tests/library/browser.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-add-cookies.spec.ts
rename to tests/library/browsercontext-add-cookies.spec.ts
index 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.ts
similarity index 97%
rename from tests/browsercontext-add-init-script.spec.ts
rename to tests/library/browsercontext-add-init-script.spec.ts
index 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.ts
similarity index 98%
rename from tests/browsercontext-base-url.spec.ts
rename to tests/library/browsercontext-base-url.spec.ts
index 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.ts
similarity index 98%
rename from tests/browsercontext-basic.spec.ts
rename to tests/library/browsercontext-basic.spec.ts
index 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.ts
similarity index 96%
rename from tests/browsercontext-clearcookies.spec.ts
rename to tests/library/browsercontext-clearcookies.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-cookies.spec.ts
rename to tests/library/browsercontext-cookies.spec.ts
index 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.ts
similarity index 97%
rename from tests/browsercontext-credentials.spec.ts
rename to tests/library/browsercontext-credentials.spec.ts
index 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.ts
similarity index 97%
rename from tests/browsercontext-csp.spec.ts
rename to tests/library/browsercontext-csp.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-device.spec.ts
rename to tests/library/browsercontext-device.spec.ts
index 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.ts
similarity index 95%
rename from tests/browsercontext-dsf.spec.ts
rename to tests/library/browsercontext-dsf.spec.ts
index 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.ts
similarity index 98%
rename from tests/browsercontext-expose-function.spec.ts
rename to tests/library/browsercontext-expose-function.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-fetch.spec.ts
rename to tests/library/browsercontext-fetch.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-locale.spec.ts
rename to tests/library/browsercontext-locale.spec.ts
index 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.ts
similarity index 98%
rename from tests/browsercontext-network-event.spec.ts
rename to tests/library/browsercontext-network-event.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-page-event.spec.ts
rename to tests/library/browsercontext-page-event.spec.ts
index 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.ts
similarity index 97%
rename from tests/browsercontext-pages.spec.ts
rename to tests/library/browsercontext-pages.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-proxy.spec.ts
rename to tests/library/browsercontext-proxy.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-route.spec.ts
rename to tests/library/browsercontext-route.spec.ts
index 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.ts
similarity index 95%
rename from tests/browsercontext-set-extra-http-headers.spec.ts
rename to tests/library/browsercontext-set-extra-http-headers.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-storage-state.spec.ts
rename to tests/library/browsercontext-storage-state.spec.ts
index 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.ts
similarity index 96%
rename from tests/browsercontext-strict.spec.ts
rename to tests/library/browsercontext-strict.spec.ts
index 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(`span1
target
`);
diff --git a/tests/browsercontext-timezone-id.spec.ts b/tests/library/browsercontext-timezone-id.spec.ts
similarity index 98%
rename from tests/browsercontext-timezone-id.spec.ts
rename to tests/library/browsercontext-timezone-id.spec.ts
index 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.ts
similarity index 96%
rename from tests/browsercontext-user-agent.spec.ts
rename to tests/library/browsercontext-user-agent.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsercontext-viewport-mobile.spec.ts
rename to tests/library/browsercontext-viewport-mobile.spec.ts
index 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.ts
similarity index 97%
rename from tests/browsercontext-viewport.spec.ts
rename to tests/library/browsercontext-viewport.spec.ts
index 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.ts
similarity index 95%
rename from tests/browsertype-basic.spec.ts
rename to tests/library/browsertype-basic.spec.ts
index 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.ts
similarity index 99%
rename from tests/browsertype-connect.spec.ts
rename to tests/library/browsertype-connect.spec.ts
index 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.ts
similarity index 98%
rename from tests/browsertype-launch-selenium.spec.ts
rename to tests/library/browsertype-launch-selenium.spec.ts
index 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.ts
similarity index 98%
rename from tests/browsertype-launch-server.spec.ts
rename to tests/library/browsertype-launch-server.spec.ts
index 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.ts
similarity index 98%
rename from tests/browsertype-launch.spec.ts
rename to tests/library/browsertype-launch.spec.ts
index 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.ts
similarity index 98%
rename from tests/capabilities.spec.ts
rename to tests/library/capabilities.spec.ts
index 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.ts
similarity index 99%
rename from tests/channels.spec.ts
rename to tests/library/channels.spec.ts
index 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.ts
similarity index 98%
rename from tests/chromium/chromium.spec.ts
rename to tests/library/chromium/chromium.spec.ts
index 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.ts
similarity index 98%
rename from tests/chromium/css-coverage.spec.ts
rename to tests/library/chromium/css-coverage.spec.ts
index 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.ts
similarity index 98%
rename from tests/chromium/js-coverage.spec.ts
rename to tests/library/chromium/js-coverage.spec.ts
index 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.ts
similarity index 98%
rename from tests/chromium/launcher.spec.ts
rename to tests/library/chromium/launcher.spec.ts
index 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.ts
similarity index 99%
rename from tests/chromium/oopif.spec.ts
rename to tests/library/chromium/oopif.spec.ts
index 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.png
similarity index 100%
rename from tests/chromium/oopif.spec.ts-snapshots/screenshot-oopif-chromium.png
rename to tests/library/chromium/oopif.spec.ts-snapshots/screenshot-oopif-chromium.png
diff --git a/tests/chromium/session.spec.ts b/tests/library/chromium/session.spec.ts
similarity index 97%
rename from tests/chromium/session.spec.ts
rename to tests/library/chromium/session.spec.ts
index 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.ts
similarity index 98%
rename from tests/chromium/tracing.spec.ts
rename to tests/library/chromium/tracing.spec.ts
index 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.ts
similarity index 97%
rename from tests/component-parser.spec.ts
rename to tests/library/component-parser.spec.ts
index 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.ts
similarity index 95%
rename from tests/css-parser.spec.ts
rename to tests/library/css-parser.spec.ts
index 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.ts
similarity index 98%
rename from tests/defaultbrowsercontext-1.spec.ts
rename to tests/library/defaultbrowsercontext-1.spec.ts
index 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.ts
similarity index 99%
rename from tests/defaultbrowsercontext-2.spec.ts
rename to tests/library/defaultbrowsercontext-2.spec.ts
index 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.ts
similarity index 99%
rename from tests/download.spec.ts
rename to tests/library/download.spec.ts
index 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.ts
similarity index 98%
rename from tests/downloads-path.spec.ts
rename to tests/library/downloads-path.spec.ts
index 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.ts
similarity index 98%
rename from tests/emulation-focus.spec.ts
rename to tests/library/emulation-focus.spec.ts
index 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.png
similarity index 100%
rename from tests/emulation-focus.spec.ts-snapshots/grid-cell-0-chromium.png
rename to tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-chromium.png
diff --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.png
similarity index 100%
rename from tests/emulation-focus.spec.ts-snapshots/grid-cell-0-firefox.png
rename to tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-firefox.png
diff --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.png
similarity index 100%
rename from tests/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.png
rename to tests/library/emulation-focus.spec.ts-snapshots/grid-cell-0-webkit.png
diff --git a/tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-chromium.png b/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-chromium.png
similarity index 100%
rename from tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-chromium.png
rename to tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-chromium.png
diff --git a/tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-firefox.png b/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-firefox.png
similarity index 100%
rename from tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-firefox.png
rename to tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-firefox.png
diff --git a/tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.png b/tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.png
similarity index 100%
rename from tests/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.png
rename to tests/library/emulation-focus.spec.ts-snapshots/screenshot-sanity-webkit.png
diff --git a/tests/favicon.spec.ts b/tests/library/favicon.spec.ts
similarity index 97%
rename from tests/favicon.spec.ts
rename to tests/library/favicon.spec.ts
index 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.ts
similarity index 93%
rename from tests/firefox/launcher.spec.ts
rename to tests/library/firefox/launcher.spec.ts
index 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.ts
similarity index 98%
rename from tests/geolocation.spec.ts
rename to tests/library/geolocation.spec.ts
index 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.ts
similarity index 99%
rename from tests/global-fetch-cookie.spec.ts
rename to tests/library/global-fetch-cookie.spec.ts
index 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.ts
similarity index 98%
rename from tests/global-fetch.spec.ts
rename to tests/library/global-fetch.spec.ts
index 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.ts
similarity index 98%
rename from tests/har.spec.ts
rename to tests/library/har.spec.ts
index 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, testInfo: any, outputPath: string = 'test.har') {
const harPath = testInfo.outputPath(outputPath);
@@ -48,7 +48,7 @@ it('should have version and creator', async ({ contextFactory, server }, testInf
const 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, browserNa
it.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.ts
similarity index 99%
rename from tests/headful.spec.ts
rename to tests/library/headful.spec.ts
index 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.ts
similarity index 99%
rename from tests/hit-target.spec.ts
rename to tests/library/hit-target.spec.ts
index 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.ts
similarity index 98%
rename from tests/ignorehttpserrors.spec.ts
rename to tests/library/ignorehttpserrors.spec.ts
index 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.ts
similarity index 100%
rename from tests/inspector/cli-codegen-1.spec.ts
rename to tests/library/inspector/cli-codegen-1.spec.ts
diff --git a/tests/inspector/cli-codegen-2.spec.ts b/tests/library/inspector/cli-codegen-2.spec.ts
similarity index 100%
rename from tests/inspector/cli-codegen-2.spec.ts
rename to tests/library/inspector/cli-codegen-2.spec.ts
diff --git a/tests/inspector/cli-codegen-3.spec.ts b/tests/library/inspector/cli-codegen-3.spec.ts
similarity index 100%
rename from tests/inspector/cli-codegen-3.spec.ts
rename to tests/library/inspector/cli-codegen-3.spec.ts
diff --git a/tests/inspector/cli-codegen-csharp.spec.ts b/tests/library/inspector/cli-codegen-csharp.spec.ts
similarity index 99%
rename from tests/inspector/cli-codegen-csharp.spec.ts
rename to tests/library/inspector/cli-codegen-csharp.spec.ts
index 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.ts
similarity index 99%
rename from tests/inspector/cli-codegen-java.spec.ts
rename to tests/library/inspector/cli-codegen-java.spec.ts
index 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.ts
similarity index 99%
rename from tests/inspector/cli-codegen-javascript.spec.ts
rename to tests/library/inspector/cli-codegen-javascript.spec.ts
index 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.ts
similarity index 99%
rename from tests/inspector/cli-codegen-python-async.spec.ts
rename to tests/library/inspector/cli-codegen-python-async.spec.ts
index 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.ts
similarity index 99%
rename from tests/inspector/cli-codegen-python.spec.ts
rename to tests/library/inspector/cli-codegen-python.spec.ts
index 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.ts
similarity index 98%
rename from tests/inspector/cli-codegen-test.spec.ts
rename to tests/library/inspector/cli-codegen-test.spec.ts
index 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.ts
similarity index 100%
rename from tests/inspector/console-api.spec.ts
rename to tests/library/inspector/console-api.spec.ts
diff --git a/tests/inspector/inspectorTest.ts b/tests/library/inspector/inspectorTest.ts
similarity index 94%
rename from tests/inspector/inspectorTest.ts
rename to tests/library/inspector/inspectorTest.ts
index 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({
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.ts
similarity index 100%
rename from tests/inspector/pause.spec.ts
rename to tests/library/inspector/pause.spec.ts
diff --git a/tests/launcher.spec.ts b/tests/library/launcher.spec.ts
similarity index 96%
rename from tests/launcher.spec.ts
rename to tests/library/launcher.spec.ts
index 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.ts
similarity index 96%
rename from tests/logger.spec.ts
rename to tests/library/logger.spec.ts
index 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.ts
similarity index 98%
rename from tests/modernizr.spec.ts
rename to tests/library/modernizr.spec.ts
index 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.ts
similarity index 94%
rename from tests/pdf.spec.ts
rename to tests/library/pdf.spec.ts
index 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.ts
similarity index 99%
rename from tests/permissions.spec.ts
rename to tests/library/permissions.spec.ts
index 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.ts
similarity index 99%
rename from tests/popup.spec.ts
rename to tests/library/popup.spec.ts
index 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.ts
similarity index 97%
rename from tests/port-forwarding-server.spec.ts
rename to tests/library/port-forwarding-server.spec.ts
index 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;
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.ts
similarity index 99%
rename from tests/proxy.spec.ts
rename to tests/library/proxy.spec.ts
index 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.ts
similarity index 98%
rename from tests/resource-timing.spec.ts
rename to tests/library/resource-timing.spec.ts
index 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.ts
similarity index 97%
rename from tests/role-utils.spec.ts
rename to tests/library/role-utils.spec.ts
index 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.ts
similarity index 99%
rename from tests/screenshot.spec.ts
rename to tests/library/screenshot.spec.ts
index 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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-chromium.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-chromium.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-firefox.png
rename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-firefox.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-css-size-webkit.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-firefox.png
rename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-firefox.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/element-larger-than-viewport-dsf-webkit.png
diff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-0-chromium.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-chromium.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/grid-cell-0-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/grid-cell-0-chromium.png
diff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-0-firefox.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-firefox.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/grid-cell-0-firefox.png
rename to tests/library/screenshot.spec.ts-snapshots/grid-cell-0-firefox.png
diff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-0-webkit.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-0-webkit.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/grid-cell-0-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/grid-cell-0-webkit.png
diff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-1-chromium.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-chromium.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/grid-cell-1-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/grid-cell-1-chromium.png
diff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-1-firefox.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-firefox.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/grid-cell-1-firefox.png
rename to tests/library/screenshot.spec.ts-snapshots/grid-cell-1-firefox.png
diff --git a/tests/screenshot.spec.ts-snapshots/grid-cell-1-webkit.png b/tests/library/screenshot.spec.ts-snapshots/grid-cell-1-webkit.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/grid-cell-1-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/grid-cell-1-webkit.png
diff --git a/tests/screenshot.spec.ts-snapshots/hanging-main-resource-firefox.png b/tests/library/screenshot.spec.ts-snapshots/hanging-main-resource-firefox.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/hanging-main-resource-firefox.png
rename to tests/library/screenshot.spec.ts-snapshots/hanging-main-resource-firefox.png
diff --git a/tests/screenshot.spec.ts-snapshots/hanging-main-resource-webkit.png b/tests/library/screenshot.spec.ts-snapshots/hanging-main-resource-webkit.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/hanging-main-resource-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/hanging-main-resource-webkit.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-chromium.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-chromium.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-chromium.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-firefox.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-firefox.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-css-size-webkit.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-firefox.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-firefox.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-clip-webkit.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-chromium.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-firefox.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-firefox.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-css-size-webkit.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-firefox.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-firefox.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-device-scale-factor-webkit.png
diff --git a/tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-chromium.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-chromium.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-chromium.png
diff --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.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-dsf-webkit.png
diff --git a/tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-element-mobile-webkit.png
diff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-chromium.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-chromium.png
diff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-clip-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-clip-chromium.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-clip-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-clip-chromium.png
diff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-clip-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-clip-webkit.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-clip-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-clip-webkit.png
diff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-chromium.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-chromium.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-chromium.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-chromium.png
diff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-webkit.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-fullpage-webkit.png
diff --git a/tests/screenshot.spec.ts-snapshots/screenshot-mobile-webkit.png b/tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-webkit.png
similarity index 100%
rename from tests/screenshot.spec.ts-snapshots/screenshot-mobile-webkit.png
rename to tests/library/screenshot.spec.ts-snapshots/screenshot-mobile-webkit.png
diff --git a/tests/selector-generator.spec.ts b/tests/library/selector-generator.spec.ts
similarity index 99%
rename from tests/selector-generator.spec.ts
rename to tests/library/selector-generator.spec.ts
index 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 {
diff --git a/tests/selectors-register.spec.ts b/tests/library/selectors-register.spec.ts
similarity index 99%
rename from tests/selectors-register.spec.ts
rename to tests/library/selectors-register.spec.ts
index 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.ts
similarity index 98%
rename from tests/signals.spec.ts
rename to tests/library/signals.spec.ts
index 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.ts
similarity index 98%
rename from tests/slowmo.spec.ts
rename to tests/library/slowmo.spec.ts
index 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.ts
similarity index 98%
rename from tests/snapshotter.spec.ts
rename to tests/library/snapshotter.spec.ts
index 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.ts
similarity index 99%
rename from tests/tap.spec.ts
rename to tests/library/tap.spec.ts
index 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.ts
similarity index 100%
rename from tests/trace-viewer/trace-viewer.spec.ts
rename to tests/library/trace-viewer.spec.ts
diff --git a/tests/tracing.spec.ts b/tests/library/tracing.spec.ts
similarity index 99%
rename from tests/tracing.spec.ts
rename to tests/library/tracing.spec.ts
index 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.ts
similarity index 99%
rename from tests/video.spec.ts
rename to tests/library/video.spec.ts
index 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.ts
similarity index 99%
rename from tests/web-socket.spec.ts
rename to tests/library/web-socket.spec.ts
index 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 }) => {