import { defineConfig } from "@playwright/test";
import { browserLaunch, config } from "./harness/config";
export default defineConfig({
globalSetup: "./harness/global.ts",
fullyParallel: true,
workers: 12,
timeout: 90_000,
expect: { timeout: 2_000 },
reporter: [["./harness/reporter.ts", { html: process.env.E2E_REPORT }]],
use: {
baseURL: config.webUrl,
ignoreHTTPSErrors: true,
// screenshots are most of a trace's cost, the dom snapshots show each step
trace: { mode: "retain-on-failure", screenshots: false },
launchOptions: browserLaunch
},
projects: [
{ name: "setup", testMatch: "harness/auth.setup.ts" },
{ name: "flows", testDir: "specs", dependencies: ["setup"] },
// stops stack processes, so it only runs on pc with E2E_OUTAGES=1
...(process.env.E2E_STACK === "pc" && process.env.E2E_OUTAGES
? [
{
name: "outages",
testDir: "outages",
dependencies: ["setup"],
fullyParallel: false,
timeout: 300_000
}
]
: []),
...(process.env.E2E_SWEEP ? [{ name: "sweep", testDir: "tools" }] : [])
]
});