import { defineConfig, devices } from "@playwright/test"; import { join } from "node:path"; import { tmpdir } from "node:os"; export default defineConfig({ testDir: "./e2e", timeout: 30_000, fullyParallel: false, reporter: "list", use: { baseURL: "http://127.0.0.1:4173", trace: "retain-on-failure", }, projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }], webServer: { command: "python -m uvicorn app.main:app --app-dir ../backend --host 127.0.0.1 --port 4173", url: "http://127.0.0.1:4173/health", reuseExistingServer: !process.env.CI, env: { ...process.env, SERVICEMAP_DB: join(tmpdir(), "servicemap-playwright-v160.db"), SERVICEMAP_STATIC_DIR: "dist", SERVICEMAP_AUTH_MODE: "disabled", SERVICEMAP_PROBE_INTERVAL: "0", }, }, });