import { defineConfig, devices } from "@playwright/test"; // Accounts' pages end to end (docs/ACCOUNTS-1.0-PLAN.md ยง12): the real backend on an in-memory // database with a test product (e2e/server.ts), and the Next.js pages. Run with `npm run test:e2e` // in apps/accounts. Nothing needs a database. export default defineConfig({ testDir: "./e2e", testMatch: "**/*.spec.ts", workers: 1, fullyParallel: false, timeout: 120_000, expect: { timeout: 20_000 }, reporter: "list", outputDir: "e2e/test-results", use: { baseURL: "http://localhost:3210", trace: "retain-on-failure", navigationTimeout: 90_000 }, projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }], webServer: [ { command: "npx tsx e2e/server.ts", url: "http://127.0.0.1:5210/api/health", timeout: 120_000, reuseExistingServer: false, stdout: "pipe", }, { command: "npx next dev -p 3210", cwd: "frontend", url: "http://localhost:3210/privacy", timeout: 180_000, reuseExistingServer: false, env: { ACCOUNTS_API_URL: "http://127.0.0.1:5210" }, }, ], });