Files
storkit/frontend/playwright.config.ts
Dave c1ff530e50 fix: allow e2e tests to reuse existing vite server on port conflict
Set reuseExistingServer:true in playwright config so acceptance gates
don't fail when port 41700 is already occupied by a prior test run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-23 20:39:57 +00:00

28 lines
722 B
TypeScript

import { defineConfig } from "@playwright/test";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
const configDir = dirname(fileURLToPath(new URL(import.meta.url)));
const frontendRoot = resolve(configDir, ".");
export default defineConfig({
testDir: "./tests/e2e",
fullyParallel: true,
timeout: 30_000,
expect: {
timeout: 5_000,
},
use: {
baseURL: "http://127.0.0.1:41700",
trace: "on-first-retry",
},
webServer: {
command:
"pnpm exec vite --config vite.config.ts --host 127.0.0.1 --port 41700 --strictPort",
url: "http://127.0.0.1:41700/@vite/client",
reuseExistingServer: true,
timeout: 120_000,
cwd: frontendRoot,
},
});