1
0

playwright.config.ts 737 B

12345678910111213141516171819202122232425262728
  1. import { defineConfig, devices } from '@playwright/test'
  2. // Use a dedicated port for E2E tests to avoid conflicts with other dev servers
  3. const E2E_PORT = 5174
  4. export default defineConfig({
  5. testDir: './e2e',
  6. fullyParallel: true,
  7. forbidOnly: !!process.env.CI,
  8. retries: process.env.CI ? 2 : 0,
  9. workers: process.env.CI ? 1 : undefined,
  10. reporter: 'html',
  11. use: {
  12. baseURL: `http://localhost:${E2E_PORT}`,
  13. trace: 'on-first-retry',
  14. },
  15. projects: [
  16. {
  17. name: 'chromium',
  18. use: { ...devices['Desktop Chrome'] },
  19. },
  20. ],
  21. webServer: {
  22. command: `npm run dev -- --port ${E2E_PORT}`,
  23. url: `http://localhost:${E2E_PORT}`,
  24. reuseExistingServer: !process.env.CI,
  25. },
  26. })