-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathplaywright.a11y.config.ts
More file actions
45 lines (43 loc) · 1.07 KB
/
Copy pathplaywright.a11y.config.ts
File metadata and controls
45 lines (43 loc) · 1.07 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
import { defineConfig, devices } from '@playwright/test'
// Dedicated Playwright config for axe-core accessibility scans. Shares the
// dev-server boot with the browser config but targets tests/e2e/a11y/.
const webServer =
process.env.PLAYWRIGHT_SKIP_WEBSERVER === '1'
? undefined
: [
{
command: 'bun run tests/e2e/browser/start-backend.ts',
port: 3000,
reuseExistingServer: false,
timeout: 30_000,
env: {
...process.env,
NODE_ENV: 'test',
ALLOWED_ORIGIN: 'http://localhost:5173',
},
},
{
command: 'bun run dev:web',
port: 5173,
reuseExistingServer: false,
timeout: 30_000,
},
]
export default defineConfig({
testDir: 'tests/e2e/a11y',
timeout: 30_000,
retries: 0,
workers: 1,
use: {
baseURL: 'http://localhost:5173',
headless: true,
screenshot: 'only-on-failure',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer,
})