Open History to see the last commit
1import { defineConfig, devices } from '@playwright/test'
2
3export default defineConfig({
4 testDir: './tests',
5 fullyParallel: true,
6 forbidOnly: !!process.env.CI,
7 retries: 2,
8 workers: process.env.CI ? 4 : undefined,
9 reporter: [['html', { open: 'never' }], ['list']],
10 timeout: 30_000,
11 expect: {
12 timeout: 15_000,
13 },
14 use: {
15 baseURL: 'http://localhost:3010',
16 video: 'on',
17 screenshot: 'only-on-failure',
18 trace: 'on-first-retry',
19 },
20 projects: [
21 {
22 name: 'chromium',
23 use: { ...devices['Desktop Chrome'] },
24 },
25 ],
26 // aimock started in globalSetup, shared across all workers on port 4010.
27 // Tests send X-Test-Id headers for per-test sequenceIndex isolation.
28 globalSetup: './global-setup.ts',
29 globalTeardown: './global-teardown.ts',
30 webServer: {
31 command: 'pnpm run dev',
32 url: 'http://localhost:3010',
33 reuseExistingServer: !process.env.CI,
34 timeout: 120_000,
35 },
36})