-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
55 lines (53 loc) · 1.41 KB
/
Copy pathplaywright.config.js
File metadata and controls
55 lines (53 loc) · 1.41 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { defineConfig } from "@playwright/test";
const CI = Boolean(process.env.CI);
const evidenceOutput = process.env.PIERVIEW_BROWSER_EVIDENCE_FILE || "test-results/browser-evidence.json";
export default defineConfig({
testDir: "./tests/browser",
testMatch: "**/*.browser.test.js",
testIgnore: process.env.PIERVIEW_NEGATIVE_CONTROL === "1"
? []
: "**/negative-control.browser.test.js",
fullyParallel: false,
workers: 1,
retries: CI ? 1 : 0,
timeout: 30_000,
expect: { timeout: 10_000 },
forbidOnly: CI,
outputDir: "test-results/artifacts",
reporter: [
["line"],
["./tests/browser/evidence-reporter.js", { outputFile: evidenceOutput }]
],
metadata: {
fixtureVersion: "pre-v10-m10-browser-fixtures-v4",
harnessVersion: "pre-v10-m10-browser-harness-v7"
},
use: {
baseURL: "http://127.0.0.1:4173",
browserName: "chromium",
serviceWorkers: "block",
trace: "retain-on-failure",
screenshot: "only-on-failure",
video: "retain-on-failure"
},
projects: [
{
name: "desktop-chromium",
use: { viewport: { width: 1280, height: 900 } }
},
{
name: "mobile-chromium",
use: {
viewport: { width: 390, height: 844 },
hasTouch: true,
isMobile: true
}
}
],
webServer: {
command: "node scripts/serve-static.mjs",
url: "http://127.0.0.1:4173/",
reuseExistingServer: !CI,
timeout: 20_000
}
});