-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
36 lines (34 loc) · 888 Bytes
/
playwright.config.ts
File metadata and controls
36 lines (34 loc) · 888 Bytes
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
import { defineConfig, devices } from "@playwright/test";
const HOST = "127.0.0.1";
const PORT = 3100;
const baseURL = `http://${HOST}:${PORT}`;
export default defineConfig({
testDir: "./tests/e2e",
fullyParallel: true,
workers: process.env.CI ? 4 : undefined,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI
? [["github"], ["html", { open: "never" }]]
: [["list"], ["html", { open: "never" }]],
outputDir: "test-results/playwright",
use: {
baseURL,
trace: "retain-on-failure",
screenshot: "only-on-failure",
},
projects: [
{
name: "chromium",
use: {
...devices["Desktop Chrome"],
},
},
],
webServer: {
command: `npm run start -- --hostname ${HOST} --port ${PORT}`,
url: baseURL,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});