-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
56 lines (52 loc) · 1.46 KB
/
playwright.config.ts
File metadata and controls
56 lines (52 loc) · 1.46 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
import { defineConfig, devices } from '@playwright/test'
/**
* Playwright E2E configuration for Reqcore.
*
* Tests the most critical user outcomes:
* - Creating a job (authenticated recruiter flow)
* - Candidate applying to a job (public flow)
*
* @see https://playwright.dev/docs/test-configuration
*/
export default defineConfig({
testDir: './e2e',
fullyParallel: false, // sequential — tests share state (auth → create job → apply)
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1, // single worker — tests depend on each other
reporter: process.env.CI
? [
['github'],
['html', { open: 'never' }],
]
: [
['html'],
],
timeout: process.env.CI ? 120_000 : 60_000,
expect: { timeout: 10_000 },
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:3333',
actionTimeout: 15_000,
navigationTimeout: 30_000,
trace: 'on-first-retry',
screenshot: 'only-on-failure',
video: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
/* Start the Nuxt dev server before running tests (skipped in CI — we build there) */
...(process.env.CI
? {}
: {
webServer: {
command: 'BETTER_AUTH_URL=http://localhost:3333 npx nuxt dev --port 3333',
url: 'http://localhost:3333',
reuseExistingServer: true,
timeout: 60_000,
},
}),
})