diff --git a/adminfront/playwright.config.ts b/adminfront/playwright.config.ts index 2acbace2..0e21a206 100644 --- a/adminfront/playwright.config.ts +++ b/adminfront/playwright.config.ts @@ -61,7 +61,7 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: "npm run dev", + command: process.env.CI ? "npm run build && npm run preview -- --port 5173" : "npm run dev", url: "http://localhost:5173", reuseExistingServer: !process.env.CI, timeout: 120 * 1000, diff --git a/devfront/playwright.config.ts b/devfront/playwright.config.ts index b52394df..53716cfa 100644 --- a/devfront/playwright.config.ts +++ b/devfront/playwright.config.ts @@ -56,7 +56,7 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { - command: "npm run dev -- --port 5174", + command: process.env.CI ? "npm run build && npm run preview -- --port 5174" : "npm run dev -- --port 5174", url: "http://localhost:5174", reuseExistingServer: !process.env.CI, },