-
-
Notifications
You must be signed in to change notification settings - Fork 338
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
39 lines (37 loc) · 1.16 KB
/
playwright.config.ts
File metadata and controls
39 lines (37 loc) · 1.16 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
import process from 'node:process'
import { fileURLToPath } from 'node:url'
import { defineConfig, devices } from '@playwright/test'
import type { ConfigOptions } from '@nuxt/test-utils/playwright'
const baseURL = 'http://localhost:5678'
export default defineConfig<ConfigOptions>({
testDir: './test/e2e',
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: 'html',
timeout: 120_000,
webServer: {
command: 'pnpm start:playwright:webserver',
url: baseURL,
reuseExistingServer: false,
timeout: 60_000,
},
// Start/stop mock connector server before/after all tests (teardown via returned closure)
globalSetup: fileURLToPath(new URL('./test/e2e/global-setup.ts', import.meta.url)),
// We currently only test on one browser on one platform
snapshotPathTemplate: '{snapshotDir}/{testFileDir}/{testFileName}-snapshots/{arg}{ext}',
use: {
baseURL,
trace: 'on-first-retry',
nuxt: {
rootDir: fileURLToPath(new URL('.', import.meta.url)),
host: baseURL,
},
},
projects: [
{
name: 'chromium-headless-shell',
use: { ...devices['Desktop Chrome'] },
},
],
})