- Add Playwright E2E testing framework with cross-browser support (Chrome, Firefox) - Create authentication helpers for CalDAV server integration - Implement calendar interaction helpers with event creation, drag-and-drop, and view switching - Add comprehensive drag-and-drop test suite with event cleanup - Configure CI/CD integration with Gitea Actions for headless testing - Support both local development and CI environments with proper dependency management - Include video recording, screenshots, and HTML reporting for test debugging - Handle Firefox-specific timing and interaction challenges with force clicks and timeouts 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
59 lines
1.6 KiB
Markdown
59 lines
1.6 KiB
Markdown
# 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 |