playwright.config.ts 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. // kilocode_change - new file
  2. import { defineConfig } from "@playwright/test"
  3. import { TestOptions } from "./tests/playwright-base-test"
  4. import * as dotenv from "dotenv"
  5. import * as path from "path"
  6. import { fileURLToPath } from "url"
  7. // ES module equivalent of __dirname
  8. const __filename = fileURLToPath(import.meta.url)
  9. const __dirname = path.dirname(__filename)
  10. const envPath = path.resolve(__dirname, ".env")
  11. dotenv.config({ path: envPath })
  12. export default defineConfig<void, TestOptions>({
  13. timeout: 120_000,
  14. expect: { timeout: 30_000 },
  15. reporter: process.env.CI ? "html" : "list",
  16. workers: 1,
  17. retries: process.env.CI ? 2 : 0, // Retry in CI, never locally
  18. globalSetup: "./playwright.globalSetup",
  19. testDir: "./tests",
  20. testIgnore: "**/helpers/__tests__/**",
  21. outputDir: "./test-results",
  22. projects: [
  23. // { name: "VSCode insiders", use: { vscodeVersion: "insiders" } },
  24. { name: "VSCode stable", use: { vscodeVersion: "stable" } },
  25. ],
  26. use: {
  27. trace: "on-first-retry",
  28. video: "retry-with-video", // videos only on retries
  29. },
  30. })