-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
31 lines (29 loc) · 898 Bytes
/
playwright.config.ts
File metadata and controls
31 lines (29 loc) · 898 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
import { defineConfig, devices } from "@playwright/test";
const playwrightPort = 45173;
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? `http://127.0.0.1:${playwrightPort}`;
export default defineConfig({
testDir: "./tests",
fullyParallel: false,
retries: process.env.CI ? 2 : 0,
reporter: [["list"], ["html", { open: "never" }]],
use: {
baseURL,
trace: "on-first-retry",
screenshot: "only-on-failure",
video: "retain-on-failure",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
webServer: process.env.PLAYWRIGHT_BASE_URL
? undefined
: {
command: `./node_modules/.bin/webpack serve --config webpack.dev.js --hot --host 127.0.0.1 --port ${playwrightPort}`,
url: `http://127.0.0.1:${playwrightPort}`,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});