-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
53 lines (52 loc) · 1.5 KB
/
playwright.config.ts
File metadata and controls
53 lines (52 loc) · 1.5 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
import { defineConfig, devices } from "@playwright/test"
export default defineConfig({
testDir: "./tests",
testMatch: "*.test.ts",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: 0,
timeout: 120000, // 2 minutes per test.
reporter: [
["html", { outputFolder: "playwright-report", open: "never" }],
["junit", { outputFile: "test-results/junit.xml" }],
],
use: {
baseURL: process.env.PEERDB_URL || "https://localhost:8080",
ignoreHTTPSErrors: false,
trace: "on-first-retry",
viewport: { width: 1280, height: 720 },
headless: true,
// Assertions are generally used when the element should be present. This timeout only accounts for asynchronicity.
actionTimeout: 10000,
...devices["Desktop Chrome"],
contextOptions: {
reducedMotion: "reduce", // Avoids animation-related test flakiness.
},
launchOptions: {
args: ["--font-render-hinting=none", "--disable-skia-runtime-opts", "--disable-font-subpixel-positioning", "--disable-lcd-text"],
},
},
snapshotPathTemplate: "playwright-screenshots/{testFilePath}/{arg}{ext}",
expect: {
timeout: 10000,
toMatchSnapshot: {
threshold: 0,
},
},
projects: [
{
name: "search",
testMatch: /search\/.*\.test\.ts$/,
},
{
name: "documents",
testMatch: /document\/.*\.test\.ts$/,
dependencies: ["search"],
},
{
name: "navigation",
testMatch: /navigation\/.*\.test\.ts$/,
dependencies: ["search"],
},
],
})