-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
56 lines (55 loc) · 1.59 KB
/
playwright.config.js
File metadata and controls
56 lines (55 loc) · 1.59 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
44
45
46
47
48
49
50
51
52
53
54
55
56
// @ts-check
import {defineConfig, devices} from '@playwright/test'
export default defineConfig({
// Default UI E2E tests live under tests/e2e
testDir: 'tests/e2e',
outputDir: 'tests-results',
timeout: 30_000,
expect: {timeout: 5_000},
fullyParallel: true,
retries: 0,
use: {
baseURL: 'http://localhost:3000',
trace: 'on-first-retry'
},
webServer: [
{
command: 'yarn workspace @starter/server start:dev',
port: 4000,
reuseExistingServer: true,
env: {NODE_ENV: 'development'}
},
{
command: 'yarn workspace @starter/client preview --port 3000',
port: 3000,
reuseExistingServer: true
}
],
projects: [
// Browser UI projects use the default testDir: tests/e2e
{
name: 'chromium',
use: {...devices['Desktop Chrome']}
},
{
name: 'firefox',
testIgnore: ['**/suggestionsAPI.spec.js'],
use: {...devices['Desktop Firefox']}
},
{
name: 'webkit',
testIgnore: ['**/suggestionsAPI.spec.js'],
use: {...devices['Desktop Safari']}
},
// Server API Playwright tests under server/tests matching *.e2e.{js,ts}
{
name: 'server-e2e',
testDir: 'server/tests',
testMatch: ['**/*.e2e.{js,ts}'],
use: {
// Point APIRequestContext to the API server by default
baseURL: 'http://localhost:4000'
}
}
]
})