yeg
2026-09-08 cfd4511378aefa04d4e06058cee628b6edd8e9c1
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
import { defineConfig, devices } from '@playwright/test'
 
const webPort = Number(process.env.TICKET04_WEB_PORT || 15174)
const apiPort = Number(process.env.TICKET04_API_PORT || 18001)
 
export default defineConfig({
  testDir: './tests/e2e',
  fullyParallel: false,
  workers: 1,
  timeout: 10 * 60 * 1000,
  expect: { timeout: 20_000 },
  reporter: [['list']],
  use: {
    ...devices['Desktop Chrome'],
    baseURL: `http://127.0.0.1:${webPort}`,
    channel: 'chrome',
    trace: 'retain-on-failure',
    screenshot: 'only-on-failure',
  },
  webServer: {
    command: `npm run dev -- --host 127.0.0.1 --port ${webPort}`,
    env: { E2E_API_TARGET: `http://127.0.0.1:${apiPort}` },
    url: `http://127.0.0.1:${webPort}/login`,
    reuseExistingServer: false,
    timeout: 120_000,
  },
})