-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
34 lines (32 loc) · 947 Bytes
/
Copy pathplaywright.config.ts
File metadata and controls
34 lines (32 loc) · 947 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
import { defineConfig } from '@playwright/test'
const APP_PORT = 3311
const MOCK_PORT = 4517
export default defineConfig({
testDir: 'tests/e2e',
timeout: 60_000,
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI ? [['github'], ['html', { open: 'never' }]] : 'list',
use: {
baseURL: `http://127.0.0.1:${APP_PORT}`,
colorScheme: 'dark',
viewport: { width: 1280, height: 800 }
},
webServer: [
{
command: `node scripts/mock-opencode.mjs`,
url: `http://127.0.0.1:${MOCK_PORT}/project`,
reuseExistingServer: !process.env.CI,
env: { MOCK_PORT: String(MOCK_PORT) }
},
{
command: `node .output/server/index.mjs`,
url: `http://127.0.0.1:${APP_PORT}/api/health`,
reuseExistingServer: !process.env.CI,
env: {
NITRO_PORT: String(APP_PORT),
NUXT_OPENCODE_URL: `http://127.0.0.1:${MOCK_PORT}`,
NUXT_OPENCODE_PASSWORD: ''
}
}
]
})