# Runway E2E Tests End-to-end tests for the Runway Calendar application using Playwright. ## Setup 1. Install dependencies: ```bash npm install ``` 2. Install browser binaries: ```bash npm run install-browsers ``` 3. Install system dependencies (Arch Linux): ```bash npm run install-deps ``` ## Running Tests ### Local Development - Run all tests: `npm test` - Run tests with browser UI: `npm run test:headed` - Debug tests: `npm run test:debug` - Interactive UI mode: `npm run test:ui` ### Browser-specific Tests - Chrome only: `npm run test:chromium` - Firefox only: `npm run test:firefox` ### CI/Headless Testing Tests automatically run in headless mode when `CI=true` environment variable is set. ## Test Structure - `tests/auth.spec.ts` - Authentication flow tests - `tests/calendar-ui.spec.ts` - General UI interaction tests - `tests/drag-and-drop.spec.ts` - Drag and drop functionality tests - `helpers/auth-helpers.ts` - Authentication test utilities - `helpers/calendar-helpers.ts` - Calendar interaction utilities ## Environment Variables For CI and automated testing: - `TEST_CALDAV_SERVER` - CalDAV server URL (default: http://localhost:3000/baikal) - `TEST_CALDAV_USERNAME` - Test user username (default: testuser) - `TEST_CALDAV_PASSWORD` - Test user password (default: testpass) - `CI` - Set to true for headless testing ## Configuration Test configuration is in `playwright.config.ts`: - Chromium and Firefox browsers for CI compatibility - Automatic headless mode in CI environments - Screenshot and video capture on failure - Timeout and retry settings optimized for WebAssembly apps