import { defineConfig, devices } from "@playwright/test"; /** * Playwright configuration for Mission Control E2E tests * * For Tauri desktop app testing, we use the webview URL directly * rather than launching the full native app wrapper. */ export default defineConfig({ testDir: "./tests/e2e", fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, reporter: "html", use: { // Base URL for webview testing baseURL: "http://localhost:1420", trace: "on-first-retry", screenshot: "only-on-failure", }, projects: [ { name: "chromium", use: { ...devices["Desktop Chrome"] }, }, // Note: Tauri uses WebKit on macOS, so we test against Safari-like behavior { name: "webkit", use: { ...devices["Desktop Safari"] }, }, ], // Run the Vite dev server before tests webServer: { command: "npm run dev", url: "http://localhost:1420", reuseExistingServer: !process.env.CI, timeout: 120000, }, });