playwright.config.ts 661 B

12345678910111213141516171819202122232425262728293031
  1. import { defineConfig } from "@playwright/test"
  2. const isCI = !!process?.env?.CI
  3. const isWindow = process?.platform?.startsWith("win")
  4. export default defineConfig({
  5. workers: 1,
  6. retries: 1,
  7. forbidOnly: isCI,
  8. testDir: "src/test/e2e",
  9. testMatch: /.*\.test\.ts/,
  10. timeout: isCI || isWindow ? 40000 : 20000,
  11. expect: {
  12. timeout: isCI || isWindow ? 5000 : 2000,
  13. },
  14. fullyParallel: true,
  15. reporter: isCI ? [["github"], ["list"]] : [["list"]],
  16. use: {
  17. video: "retain-on-failure",
  18. },
  19. projects: [
  20. {
  21. name: "setup test environment",
  22. testMatch: /global\.setup\.ts/,
  23. },
  24. {
  25. name: "e2e tests",
  26. dependencies: ["setup test environment"],
  27. },
  28. ],
  29. })