import { defineConfig, devices } from "@playwright/test"; import { FIXTURE_PUBLIC_KEY_RAW_BASE64 } from "./tests/e2e/fixtures/gateway-key"; export default defineConfig({ testDir: "tests/e2e", fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 1 : 0, reporter: [["list"], ["html", { open: "never" }]], use: { baseURL: "http://localhost:5173", trace: "retain-on-failure", screenshot: "only-on-failure", }, projects: [ { name: "chromium-desktop", use: { ...devices["Desktop Chrome"] } }, { name: "webkit-desktop", use: { ...devices["Desktop Safari"] } }, // devices["iPhone 13"] picks WebKit by default; the project name // here claims a Chromium engine on a mobile viewport, so the // browser is explicitly overridden. WebKit on a desktop viewport // is already covered by webkit-desktop. { name: "chromium-mobile-iphone-13", use: { ...devices["iPhone 13"], browserName: "chromium" }, }, { name: "chromium-mobile-pixel-5", use: { ...devices["Pixel 5"] } }, ], webServer: { command: "pnpm run dev", url: "http://localhost:5173", reuseExistingServer: !process.env.CI, timeout: 120_000, env: { // The Phase 7 Playwright spec mocks the gateway and signs // every response with the deterministic fixture key in // `tests/e2e/fixtures/gateway-key.ts`. The dev server picks // up the matching public key here so the in-page // `GalaxyClient` accepts the forged signatures. VITE_GATEWAY_RESPONSE_PUBLIC_KEY: FIXTURE_PUBLIC_KEY_RAW_BASE64, }, }, });