* feat: add Playwright testing infrastructure - Add @playwright/test dependency - Add playwright.config.ts with Chromium setup - Add test scripts (test, test:ui, test:headed) - Add hello world test to verify setup works This is the foundation for adding comprehensive E2E tests. Tests run against the Vite dev server on port 1420. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: add E2E test workflow Runs Playwright tests on pull requests using Chromium. Uploads test artifacts on failure. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: rename e2e to playwright, fix CI test - Rename workflow from "E2E Tests" to "Playwright" - Rename scripts from test:e2e to test:playwright - Fix test to not require Tauri APIs (just check server responds) - Run prettier Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: CJ Pais <cj@cjpais.com>
26 lines
596 B
TypeScript
26 lines
596 B
TypeScript
import { defineConfig, devices } from "@playwright/test";
|
|
|
|
export default defineConfig({
|
|
testDir: "./tests",
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: "html",
|
|
use: {
|
|
baseURL: "http://localhost:1420",
|
|
trace: "on-first-retry",
|
|
},
|
|
projects: [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
],
|
|
webServer: {
|
|
command: "bunx vite dev",
|
|
url: "http://localhost:1420",
|
|
reuseExistingServer: !process.env.CI,
|
|
timeout: 30000,
|
|
},
|
|
});
|