main
js 31 lines 737 Bytes
Raw
1 import {defineConfig, devices} from '@playwright/test';
2
3 const isCI = Boolean(process.env.CI);
4
5 export default defineConfig({
6 // relative to this configuration file.
7 testDir: '__tests__/__e2e__',
8 fullyParallel: true,
9 // Fail the build on CI if you accidentally left test.only in the source code.
10 forbidOnly: !isCI,
11 retries: isCI ? 2 : 0,
12 // Opt out of parallel tests on CI.
13 workers: isCI ? 1 : undefined,
14 reporter: 'html',
15 use: {
16 baseURL: 'http://localhost:3000',
17
18 trace: 'on-first-retry',
19 },
20 projects: [
21 {
22 name: 'chromium',
23 use: {...devices['Desktop Chrome']},
24 },
25 ],
26 webServer: {
27 command: 'yarn dev',
28 url: 'http://localhost:3000',
29 reuseExistingServer: !isCI,
30 },
31 });