/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
- baseURL: 'http://localhost:5173',
+ baseURL: process.env.CI ? 'http://localhost:4173' : 'http://localhost:5173',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
* Use the preview server on CI for more realistic testing.
* Playwright will re-use the local server if there is already a dev-server running.
*/
- command: process.env.CI ? 'vite preview --port 5173' : 'vite dev',
- port: 5173,
+ command: process.env.CI ? 'npm run preview' : 'npm run dev',
+ port: process.env.CI ? 4173 : 5173,
reuseExistingServer: !process.env.CI
}
})