diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69feaefc..f083ed49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,7 +61,7 @@ jobs: browser: runs-on: ubuntu-latest container: - image: mcr.microsoft.com/playwright:v1.57.0-noble + image: mcr.microsoft.com/playwright:v1.58.0-noble steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 diff --git a/playwright.config.ts b/playwright.config.ts index 39527d2b..1a46b923 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -3,18 +3,27 @@ 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({ testDir: './tests', fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, - workers: process.env.CI ? 1 : undefined, reporter: 'html', timeout: 120_000, + webServer: { + command: 'NODE_ENV=test pnpm build && pnpm preview --port 5678', + url: baseURL, + reuseExistingServer: false, + timeout: 120_000, + }, use: { + baseURL, trace: 'on-first-retry', nuxt: { rootDir: fileURLToPath(new URL('.', import.meta.url)), + host: baseURL, }, }, projects: [