From 444907aac46053f4f335284fd772c4a4c7bf4b2e Mon Sep 17 00:00:00 2001 From: Nick Zeng Date: Wed, 20 May 2026 16:18:57 +0800 Subject: [PATCH] update pw set --- frontend/playwright.config.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index 8b8987d..62c2edd 100644 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -101,13 +101,16 @@ 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). + * + * CI mode assumes `dist/` is already built by an upstream node container + * (Step 1 of the two-step e2e flow); preview only serves dist here, never + * builds. See docs/tmp/deploy-ref/ci-cd/02-frontend-image/design.md ยง7.0.1 + * for the two-container workflow contract. + * * Playwright will re-use the local server if there is already a dev-server running. */ - command: process.env.CI ? 'npm run build && npm run preview' : 'npm run dev', + command: process.env.CI ? 'npm run preview' : 'npm run dev', port: process.env.CI ? 4173 : 5173, reuseExistingServer: !process.env.CI, - timeout: 180_000, }, })