-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
43 lines (40 loc) · 1.06 KB
/
playwright.config.ts
File metadata and controls
43 lines (40 loc) · 1.06 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
40
41
42
43
import { defineConfig, devices } from '@playwright/test'
import 'dotenv/config'
export default defineConfig({
testDir: './tests',
workers: 1, // Force Playwright to run everything one-by-one
fullyParallel: false, // Also disable parallel test execution inside files
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 1 : 0,
reporter: 'list', // Best for agents: easy to parse in stdout
use: {
baseURL: 'http://localhost:' + process.env.NGINX_PORT,
trace: 'on-first-retry', // Keeps it lean, only logs on fail
},
projects: [
{
name: 'state-setup',
testMatch: /state-setup\.ts/,
teardown: 'state-teardown'
},
{
name: 'state-teardown',
testMatch: /state-teardown\.ts/,
},
{
name: 'unit',
testMatch: /.*\.unit\.spec\.ts/,
},
{
name: 'api',
testMatch: /.*\.api\.spec\.ts/,
dependencies: ['state-setup'],
},
{
name: 'e2e',
testMatch: /.*\.e2e\.spec\.ts/,
use: { ...devices['Desktop Chrome'] },
dependencies: ['state-setup'],
},
],
})