import { defineConfig, devices } from "@playwright/test"; const PORT = 4321; const BASE_URL = `http://localhost:${PORT}`; /** * Lean critical-path E2E suite. Runs against the Astro dev server (no Confluence * access needed at runtime — promo data is read from the committed * src/assets/data/promos/campaigns.ts). See e2e/*.spec.ts. */ export default defineConfig({ testDir: "./e2e", fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 1 : 0, reporter: process.env.CI ? "github" : "list", use: { baseURL: BASE_URL, trace: "on-first-retry", }, projects: [ { name: "chromium", use: { ...devices["Desktop Chrome"] }, }, ], webServer: { command: "bun run dev", url: BASE_URL, reuseExistingServer: !process.env.CI, timeout: 120_000, }, });