diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index 5ece956..8b8987d 100644 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -101,10 +101,13 @@ export default defineConfig({ /** * Use the dev server by default for faster feedback loop. * Use the preview server on CI for more realistic testing. + * CI mode chains `npm run build` so a fresh clone has dist/ in place + * before preview serves it (otherwise page.title() is empty). * Playwright will re-use the local server if there is already a dev-server running. */ - command: process.env.CI ? 'npm run preview' : 'npm run dev', + command: process.env.CI ? 'npm run build && npm run preview' : 'npm run dev', port: process.env.CI ? 4173 : 5173, reuseExistingServer: !process.env.CI, + timeout: 180_000, }, })