-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
32 lines (30 loc) · 916 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
32 lines (30 loc) · 916 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
import { defineConfig, devices } from '@playwright/test'
const port = 3100
const host = 'localhost'
export default defineConfig({
testDir: './tests/e2e',
fullyParallel: true,
forbidOnly: Boolean(process.env.CI),
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 2 : undefined,
reporter: process.env.CI ? 'line' : 'list',
use: {
baseURL: `http://${host}:${port}`,
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: {
command: 'pnpm dev:e2e',
// Locale negotiation redirects anonymous page requests once to set a cookie.
// Use the locale-independent health endpoint so readiness checks cannot enter that redirect flow.
url: `http://${host}:${port}/api/revalidate`,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
})