-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
47 lines (45 loc) · 1.07 KB
/
Copy pathplaywright.config.ts
File metadata and controls
47 lines (45 loc) · 1.07 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
import { defineConfig, devices } from '@playwright/test'
const localBaseURL = 'http://127.0.0.1:4173'
const baseURL = process.env.PLAYWRIGHT_TEST_BASE_URL ?? localBaseURL
export default defineConfig({
testDir: './tests/browser',
timeout: 30_000,
expect: { timeout: 5_000 },
fullyParallel: false,
forbidOnly: Boolean(process.env.CI),
retries: 0,
workers: 1,
reporter: 'list',
use: {
baseURL,
screenshot: 'only-on-failure',
trace: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
],
webServer: process.env.PLAYWRIGHT_TEST_BASE_URL
? undefined
: {
command: 'node .output/server/index.mjs',
env: {
HOST: '0.0.0.0',
NODE_ENV: 'production',
PORT: '4173',
},
url: `${localBaseURL}/health`,
reuseExistingServer: false,
timeout: 30_000,
stdout: 'pipe',
stderr: 'pipe',
gracefulShutdown: {
signal: 'SIGTERM',
timeout: 5_000,
},
},
})