# ClawFort UI/UX Regression Test Suite

Playwright-based end-to-end testing for ClawFort AI News application.

## Quick Start

```bash
# Install dependencies and browsers
cd e2e
npm install
npm run install:browsers

# Run smoke tests (fast feedback)
npm run test:smoke

# Run full regression suite
npm run test:full

# Run with UI mode for debugging
npm run test:ui

# Run in headed mode (see browser)
npm run test:headed
```

## Test Organization

```
tests/
├── fixtures/           # Shared test fixtures and utilities
├── capabilities/       # Tests organized by capability
│   ├── core-journeys/       # Hero/feed browsing, modal flows
│   ├── accessibility/       # WCAG 2.2 AA compliance
│   ├── responsive/          # Mobile/tablet/desktop
│   ├── modal-experience/    # Summary modal interactions
│   └── microinteractions/   # Share, contact, tooltips
├── smoke/              # Fast smoke tests for PR gates
└── e2e.spec.ts         # Main test entry point
```

## Environment Variables

- `BASE_URL`: Target application URL (default: http://localhost:8000)
- `CI`: Set to true for CI-specific behavior

## Test Profiles

### Smoke Profile
- Runs on every PR
- Covers critical paths: hero loading, modal open/close, basic accessibility
- ~2-3 minutes execution time

### Full Profile
- Runs on main/nightly builds
- Complete capability coverage across all themes and breakpoints
- ~15-20 minutes execution time

## CI Integration

Tests are integrated into GitHub Actions workflow:
- PR Quality Gate: Smoke profile must pass
- Main/Nightly: Full profile with artifact retention
