-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathplaywright.critical.config.ts
More file actions
59 lines (57 loc) · 1.25 KB
/
Copy pathplaywright.critical.config.ts
File metadata and controls
59 lines (57 loc) · 1.25 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
56
57
58
59
import { defineConfig, devices } from "@playwright/test";
const PORT = 4173;
const isCI = Boolean(process.env.CI);
export default defineConfig({
testDir: "tests/critical",
outputDir: "test-results/critical",
fullyParallel: false,
forbidOnly: isCI,
retries: isCI ? 2 : 0,
workers: 1,
timeout: 45_000,
reporter: isCI
? [
["list"],
[
"html",
{
open: "never",
outputFolder: "playwright-report/critical",
},
],
]
: "list",
use: {
baseURL: `http://localhost:${PORT}`,
screenshot: "only-on-failure",
trace: "retain-on-failure",
video: "retain-on-failure",
},
projects: [
{
name: "desktop-chromium",
use: {
...devices["Desktop Chrome"],
permissions: ["clipboard-read", "clipboard-write"],
},
},
{
name: "emulated-pixel-chromium",
use: { ...devices["Pixel 7"] },
},
{
name: "desktop-webkit",
use: { ...devices["Desktop Safari"] },
},
{
name: "emulated-iphone-webkit",
use: { ...devices["iPhone 15"] },
},
],
webServer: {
command: `pnpm exec next start -p ${PORT}`,
port: PORT,
reuseExistingServer: false,
timeout: 60_000,
},
});