From b6fdc23508a7a603ee16dd123db6c0d18bb0880f Mon Sep 17 00:00:00 2001 From: kawa Date: Sat, 17 Oct 2026 13:50:55 +0200 Subject: [PATCH] Add a Playwright config that runs the browser suite on separate ports [no-card] Ports 5473 and 4473 never reuse a running server, so the suite can run beside `npm run dev` or another session's servers. Co-Authored-By: Claude Opus 5.5 --- playwright.resume.config.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 playwright.resume.config.ts diff --git a/playwright.resume.config.ts b/playwright.resume.config.ts new file mode 100644 index 0000000..8640db8 --- /dev/null +++ b/playwright.resume.config.ts @@ -0,0 +1,27 @@ +import { defineConfig, devices } from "@playwright/test"; +export default defineConfig({ + testDir: "./tests", + testMatch: "**/*.spec.ts", + use: { baseURL: "http://127.0.0.1:5473", trace: "retain-on-failure" }, + projects: [ + { name: "chromium", use: { ...devices["Desktop Chrome"] } }, + { + name: "webkit", + use: { ...devices["iPhone 13"], defaultBrowserType: "webkit" }, + }, + ], + webServer: [ + { + command: "npm run dev -- --host 127.0.0.1 --port 5473 --strictPort", + url: "http://127.0.0.1:5473", + reuseExistingServer: false, + }, + // The production build, for the service worker and offline checks. + { + command: "npm run build && npx vite preview --host 127.0.0.1 --port 4473 --strictPort", + url: "http://127.0.0.1:4473", + reuseExistingServer: false, + timeout: 120_000, + }, + ], +});