Skip to content

Commit 21ade1f

Browse files
committedSep 16, 2024··
test: bump playwright setup time for windows
1 parent 0163fca commit 21ade1f

File tree

3 files changed

+218
-43
lines changed

3 files changed

+218
-43
lines changed
 

Diff for: ‎examples/app-playwright/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"devDependencies": {
1919
"@nuxt/test-utils": "latest",
20-
"@playwright/test": "1.47.1"
20+
"@playwright/test": "1.47.1",
21+
"std-env": "^3.7.0"
2122
}
2223
}

Diff for: ‎examples/app-playwright/playwright.config.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { fileURLToPath } from 'node:url'
22
import { defineConfig, devices } from '@playwright/test'
33
import type { ConfigOptions } from '@nuxt/test-utils/playwright'
4+
import { isCI, isWindows } from 'std-env'
45

56
const devicesToTest = [
67
'Desktop Chrome',
@@ -21,11 +22,12 @@ export default defineConfig<ConfigOptions>({
2122
/* Run tests in files in parallel */
2223
fullyParallel: true,
2324
/* Fail the build on CI if you accidentally left test.only in the source code. */
24-
forbidOnly: !!process.env.CI,
25+
forbidOnly: !!isCI,
2526
/* Retry on CI only */
26-
retries: process.env.CI ? 2 : 0,
27+
retries: isCI ? 2 : 0,
2728
/* Opt out of parallel tests on CI. */
28-
workers: process.env.CI ? 1 : undefined,
29+
workers: isCI ? 1 : undefined,
30+
timeout: isWindows ? 60000 : undefined,
2931
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
3032
reporter: 'html',
3133
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */

0 commit comments

Comments
 (0)
Please sign in to comment.