Skip to content

Commit

Permalink
test: bump playwright setup time for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Sep 16, 2024
1 parent 0163fca commit 21ade1f
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 43 deletions.
3 changes: 2 additions & 1 deletion examples/app-playwright/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"devDependencies": {
"@nuxt/test-utils": "latest",
"@playwright/test": "1.47.1"
"@playwright/test": "1.47.1",
"std-env": "^3.7.0"
}
}
8 changes: 5 additions & 3 deletions examples/app-playwright/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { fileURLToPath } from 'node:url'
import { defineConfig, devices } from '@playwright/test'
import type { ConfigOptions } from '@nuxt/test-utils/playwright'
import { isCI, isWindows } from 'std-env'

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

0 comments on commit 21ade1f

Please sign in to comment.