-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
38 lines (37 loc) · 1.18 KB
/
Copy pathplaywright.config.ts
File metadata and controls
38 lines (37 loc) · 1.18 KB
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
37
38
import { defineConfig } from "@playwright/test";
import { SEEDED_STORAGE_STATE } from "./tests/e2e/global-setup";
export default defineConfig({
testDir: "tests/e2e",
timeout: 30_000,
// CI gets a single retry to absorb the occasional Neon cold start;
// local runs should fail fast.
retries: process.env.CI ? 1 : 0,
reporter: [["html", { open: "never" }], ["list"]],
globalSetup: "./tests/e2e/global-setup.ts",
globalTeardown: "./tests/e2e/global-teardown.ts",
use: {
baseURL: "http://localhost:5173",
screenshot: "only-on-failure",
trace: "on-first-retry",
},
projects: [
{
name: "anon",
// Tests that drive auth flows themselves (login, register).
testMatch: /(auth|smoke|accessibility)\.test\.ts$/,
},
{
name: "authed",
// Tests that operate against the seeded user's session.
testMatch: /(medication-lifecycle|dose-logging|analytics|exports|schedule-editor)\.test\.ts$/,
use: { storageState: SEEDED_STORAGE_STATE },
},
],
webServer: {
command: "npm run dev",
port: 5173,
reuseExistingServer: !process.env.CI,
// Vite dev startup can be slow on cold caches.
timeout: 120_000,
},
});