-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
64 lines (62 loc) · 1.91 KB
/
playwright.config.ts
File metadata and controls
64 lines (62 loc) · 1.91 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
57
58
59
60
61
62
63
64
import process from 'node:process'
import { fileURLToPath } from 'node:url'
import { defineConfig, devices } from '@playwright/test'
const fixtureCwd = fileURLToPath(new URL('./tests/e2e/fixtures', import.meta.url))
const serveStatic = fileURLToPath(new URL('./tests/e2e/_support/serve-static.mjs', import.meta.url))
export default defineConfig({
testDir: './tests/e2e',
testIgnore: ['_support/**'],
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: process.env.CI ? [['github'], ['html']] : 'list',
use: {
trace: 'on-first-retry',
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},
],
webServer: [
{
command: 'node bin.mjs',
cwd: 'examples/files-inspector',
env: { DEVFRAME_E2E_CWD: fixtureCwd },
url: 'http://localhost:9876/__devframe-files-inspector/',
timeout: 60_000,
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
},
{
command: 'node bin.mjs',
cwd: 'examples/streaming-chat',
url: 'http://localhost:9897/__devframe-streaming-chat/',
timeout: 60_000,
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
},
{
command: `node bin.mjs build --out-dir dist/static && node ${JSON.stringify(serveStatic)} dist/static 9886`,
cwd: 'examples/files-inspector',
env: { DEVFRAME_E2E_CWD: fixtureCwd },
url: 'http://127.0.0.1:9886/',
timeout: 60_000,
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
},
{
command: `node bin.mjs build --out-dir dist/static && node ${JSON.stringify(serveStatic)} dist/static 9898`,
cwd: 'examples/streaming-chat',
url: 'http://127.0.0.1:9898/',
timeout: 60_000,
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
},
],
})