-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
45 lines (43 loc) · 1.01 KB
/
playwright.config.ts
File metadata and controls
45 lines (43 loc) · 1.01 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
import { defineConfig, devices } from "@playwright/test";
const baseURL = process.env.BASE_URL || "http://127.0.0.1:3000";
const useWebServer = process.env.PLAYWRIGHT_WEB_SERVER !== "0";
export default defineConfig({
testDir: "./tests",
timeout: 45_000,
expect: {
timeout: 10_000,
},
fullyParallel: false,
reporter: [["list"]],
use: {
baseURL,
screenshot: "only-on-failure",
trace: "retain-on-failure",
video: "off",
ignoreHTTPSErrors: true,
},
webServer: useWebServer
? {
command: process.env.PLAYWRIGHT_WEB_SERVER_COMMAND || "pnpm dev",
url: baseURL,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
}
: undefined,
projects: [
{
name: "desktop-chromium",
use: {
...devices["Desktop Chrome"],
viewport: { width: 1440, height: 1600 },
},
},
{
name: "mobile-chromium",
use: {
...devices["Pixel 7"],
viewport: { width: 393, height: 1200 },
},
},
],
});