# E2E Test Plan

## User Flow: {flow_name}

### Description
{What user journey this flow tests. One sentence.}

### Preconditions
- {User is logged in as: role}
- {Database contains: specific test data}
- {Feature flag: enabled/disabled}
- {Browser: chromium / firefox / webkit}

### Steps

| # | Action | Expected Result | Assertion |
|---|--------|----------------|-----------|
| 1 | Navigate to {URL} | Page loads with {element} visible | `expect(page.locator('{selector}')).toBeVisible()` |
| 2 | Fill {field} with "{value}" | Field accepts input | `expect(input).toHaveValue('{value}')` |
| 3 | Click "{button text}" | {Loading state appears, then result} | `expect(page.locator('{selector}')).toContainText('{text}')` |
| 4 | Wait for {condition} | {Expected state after async operation} | `expect(response.status()).toBe(200)` |
| 5 | Verify {final state} | {Page shows expected content} | `expect(page.locator('{selector}')).toBeVisible()` |

### Screenshots/Visual Assertions
- Capture screenshot after step {N}: {what it should look like}
- Capture screenshot on failure: {automatic}

### Error Flow Variant: {variant_name}
| # | Action | Expected Result | Assertion |
|---|--------|----------------|-----------|
| 1 | {Same setup as happy path} | | |
| 2 | Fill {field} with "{invalid value}" | | |
| 3 | Click "{button text}" | Error message: "{expected error}" | `expect(page.locator('.error')).toContainText('{message}')` |

### Cleanup
- {Delete test user/data created during the flow}
- {Reset application state}

---

## User Flow: {next_flow_name}

### Description
{What this flow tests.}

### Preconditions
- {list}

### Steps

| # | Action | Expected Result | Assertion |
|---|--------|----------------|-----------|
| 1 | {action} | {result} | {assertion} |

### Cleanup
- {cleanup steps}

---

## Flow Summary

| Flow | Steps | Variants | Priority | Requirement |
|------|-------|----------|----------|-------------|
| {flow name} | {count} | {count} | Critical / High / Medium | {FR-XXX} |
| {flow name} | {count} | {count} | Critical / High / Medium | {FR-XXX} |

## Browser Matrix

| Flow | Chromium | Firefox | WebKit |
|------|---------|---------|--------|
| {flow} | Required | Required | Optional |
| {flow} | Required | Optional | Optional |
