-
Notifications
You must be signed in to change notification settings - Fork 968
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
38 lines (37 loc) · 1.19 KB
/
Copy pathplaywright.config.ts
File metadata and controls
38 lines (37 loc) · 1.19 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, devices } from "@playwright/test";
import { siteHeader } from "./e2e/helpers/site";
/**
* E2E suite for the Helpdesk SPA, run against a real bench site.
* `global.setup.ts` seeds personas and saves one logged-in session per persona.
*/
export default defineConfig({
testDir: "./e2e",
fullyParallel: false,
workers: 1,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
// CI shards write blob reports that the merge-reports job joins into one HTML report.
reporter: process.env.CI ? [["github"], ["blob"]] : "list",
timeout: 60_000,
expect: { timeout: 10_000 },
use: {
baseURL: process.env.BASE_URL || "http://localhost:8000",
extraHTTPHeaders: siteHeader(),
trace: "retain-on-failure",
screenshot: "only-on-failure",
actionTimeout: 15_000,
navigationTimeout: 30_000,
...devices["Desktop Chrome"],
viewport: { width: 1440, height: 900 },
// Differs from a fresh site's Asia/Kolkata, so timezone bugs show up locally too.
timezoneId: "UTC",
},
projects: [
{ name: "setup", testMatch: /global\.setup\.ts/ },
{
name: "chromium",
testMatch: /.*\.spec\.ts/,
dependencies: ["setup"],
},
],
});