Files
MobilityOps/frontend/playwright.config.ts
NuklearRabbit 2d92084489
MobilityOps acceptance / acceptance (pull_request) Successful in 8m45s
test: stabilize browser assertions under CI load
2026-09-03 01:13:21 +02:00

32 lines
1.3 KiB
TypeScript

import { defineConfig, devices } from "@playwright/test";
export default defineConfig({
testDir: "./e2e",
// _capture-screenshots.spec.ts is evidence-generation tooling, not a regression test —
// it mutates demo data via a reset and is run explicitly, not as part of the suite.
testIgnore: process.env.CAPTURE_EVIDENCE === "1" ? undefined : "**/_*.spec.ts",
timeout: 30_000,
// CI exercises the browser while image scans and container services share the
// same runner. Keep assertions strict, but allow successful API-backed route
// transitions enough time to render under that bounded load.
expect: { timeout: 15_000 },
fullyParallel: false,
workers: 1,
snapshotPathTemplate: "{testDir}/__screenshots__/{arg}{ext}",
reporter: [["list"], ["html", { open: "never", outputFolder: "playwright-report" }]],
use: {
baseURL: process.env.MOBILITYOPS_PUBLIC_URL ?? "http://localhost:1228",
// Optional: point at a pre-installed Chromium (CI images, sandboxes) instead of the
// Playwright-managed download.
...(process.env.PW_CHROMIUM_PATH ? { launchOptions: { executablePath: process.env.PW_CHROMIUM_PATH } } : {}),
trace: "retain-on-failure",
screenshot: "only-on-failure",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
});