mirror of
https://github.com/audacity/audacity.github.io.git
synced 2026-05-30 07:59:37 -05:00
Cover the three flows that must never silently break: - front page: hero + real Windows installer link, release video, nav. - downloads: /download OS targets, and real Windows/macOS installer links on the per-OS pages. - promo banner: fake the browser clock to prove the date-window logic holds — an active campaign banner renders inside its window and disappears the day after it ends. Data-driven from campaigns.ts so it survives future pulls. Setup: playwright.config.ts runs against `bun run dev`; `bun test` is scoped to src/scripts so it ignores the .spec.ts files; e2e artifacts gitignored (and the stale tracked test-results/ untracked). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
834 B
TypeScript
34 lines
834 B
TypeScript
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,
|
|
},
|
|
});
|