forked from epicweb-dev/epic-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
playwright.config.ts
39 lines (35 loc) · 802 Bytes
/
playwright.config.ts
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
import { devices, type PlaywrightTestConfig } from '@playwright/test'
import 'dotenv/config'
const PORT = process.env.PORT || '3000'
export default {
testDir: './tests/e2e',
timeout: 30 * 1000,
expect: {
timeout: 10 * 1000,
},
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: process.env.CI ? 1 : undefined,
reporter: 'html',
use: {
actionTimeout: 0,
baseURL: `https://localhost:${PORT}/`,
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
],
webServer: {
command: process.env.CI
? `cross-env PORT=${PORT} npm run start:mocks`
: `cross-env PORT=${PORT} npm run dev`,
port: Number(PORT),
reuseExistingServer: true,
},
} satisfies PlaywrightTestConfig