~james/core

core/e2e/playwright.config.ts -rw-r--r-- 1.1 KiB
452f17b7 — james chore(import): snapshot james.dad.town/core at f70c71c7696a 16 hours ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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" }] : [])
	]
});