forked from NicTool/server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.js
More file actions
35 lines (34 loc) · 967 Bytes
/
Copy pathplaywright.config.js
File metadata and controls
35 lines (34 loc) · 967 Bytes
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
import { defineConfig } from '@playwright/test'
// Two front-end e2e surfaces, each with its own server:
// components — Vite dev server serving the component playground (web/index.html)
// app — static server serving the built UI (html/ + html/dist/app.js)
// Network is mocked per-test where it matters.
export default defineConfig({
testDir: './web/e2e',
webServer: [
{
command: 'npx vite --port 5174 --strictPort',
port: 5174,
reuseExistingServer: !process.env.CI,
timeout: 60_000,
},
{
command: 'node web/e2e/serve-html.js 5175',
port: 5175,
reuseExistingServer: !process.env.CI,
timeout: 60_000,
},
],
projects: [
{
name: 'components',
testMatch: /dsn-status\.spec\.js/,
use: { baseURL: 'http://localhost:5174' },
},
{
name: 'app',
testMatch: /app\.[^/]*\.spec\.js/,
use: { baseURL: 'http://localhost:5175' },
},
],
})