-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (38 loc) · 1.24 KB
/
Copy pathplaywright.config.ts
File metadata and controls
39 lines (38 loc) · 1.24 KB
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 { defineConfig, devices } from '@playwright/test';
export default defineConfig({
testDir: '.',
testMatch: [
'packages/*/acceptance/tests/**/*.{spec,test}.{ts,tsx}',
'apps/*/acceptance/tests/**/*.{spec,test}.{ts,tsx}',
],
// Ignore ephemeral git worktrees (e.g. `.codex/worktrees/*`), whose duplicate
// test copies would otherwise be collected and fail to resolve dependencies.
testIgnore: ['**/.codex/**', '**/node_modules/**'],
outputDir: 'playwright/results',
// Disable parallel tests to avoid conflicts creating/deleting content
workers: 1,
// Fail the build on CI if you accidentally left test.only in the source code.
forbidOnly: !!process.env.CI,
// Retry on CI only.
retries: process.env.CI ? 3 : 0,
timeout: 10_000,
expect: {
timeout: 10_000,
},
use: {
baseURL: process.env.BASE_URL ?? 'http://localhost:3000',
browserName: 'chromium',
viewport: { width: 1280, height: 720 },
trace: 'retain-on-failure',
// Use video only while debugging CI
// video: 'retain-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
snapshotPathTemplate:
'{testDir}/__screenshots__/{testFilePath}/{arg}{-projectName}{ext}',
});