test: harden MVP QA gate

This commit is contained in:
vince 2026-06-18 19:50:28 +02:00
parent 081d6085a5
commit bdb02daa96
11 changed files with 479 additions and 44 deletions

View file

@ -2,6 +2,9 @@ import { defineConfig, devices } from "@playwright/test";
const port = Number(process.env.PLAYWRIGHT_PORT || 4173);
const baseURL = `http://127.0.0.1:${port}`;
const databaseUrl =
process.env.PLAYWRIGHT_DATABASE_URL ||
`file:./data/playwright-${process.pid}-${Date.now()}.sqlite`;
export default defineConfig({
testDir: "tests/e2e",
@ -15,9 +18,9 @@ export default defineConfig({
screenshot: "only-on-failure",
},
webServer: {
command: `DATABASE_URL=file:./data/playwright.sqlite bun run dev -- --port ${port}`,
command: `bun run build && DATABASE_URL=${databaseUrl} HOST=127.0.0.1 PORT=${port} bun build/index.js`,
url: baseURL,
reuseExistingServer: !process.env.CI,
reuseExistingServer: false,
timeout: 120_000,
},
projects: [