syntaxai/tdd.md · main · playwright.config.ts

playwright.config.ts 27 lines · 836 bytes raw
import { defineConfig, devices } from "@playwright/test";

// E2E tests run against a deployed instance — never against a local
// dev server (per the project's deploy workflow: ship to p620, verify
// on the live site). Default baseURL is the production site; override
// with PLAYWRIGHT_BASE_URL if you want to test a staging URL.
const BASE_URL = process.env.PLAYWRIGHT_BASE_URL ?? "https://tdd.md";

export default defineConfig({
  testDir: "./e2e",
  timeout: 30_000,
  expect: { timeout: 10_000 },
  fullyParallel: true,
  forbidOnly: !!process.env.CI,
  retries: process.env.CI ? 2 : 0,
  reporter: [["list"]],
  use: {
    baseURL: BASE_URL,
    trace: "retain-on-failure",
    video: "retain-on-failure",
    ignoreHTTPSErrors: true,
  },
  projects: [
    { name: "chromium", use: { ...devices["Desktop Chrome"] } },
  ],
});