# Test Plan

> Track what needs testing and test results. Reference `skills/testing/SKILL.md` for testing guidance.

---

## 📊 Test Coverage Overview

| Type | Total | Passing | Failing | Pending |
|------|-------|---------|---------|---------|
| Unit Tests | 0 | 0 | 0 | 0 |
| Integration Tests | 0 | 0 | 0 | 0 |
| E2E Tests | 0 | 0 | 0 | 0 |
| Manual Tests | 0 | 0 | 0 | 0 |

**Coverage Target:** [e.g., 80% for critical paths]

---

## 🎯 Critical User Flows (Must Test)

These are the most important flows that MUST work:

### Flow 1: [e.g., User Authentication]

| Step | Expected Result | Status | Notes |
|------|-----------------|--------|-------|
| User visits login page | Login form displayed | ⏳ | |
| User enters valid credentials | Redirected to dashboard | ⏳ | |
| User enters invalid credentials | Error message shown | ⏳ | |
| User clicks logout | Redirected to login | ⏳ | |

**Automated Tests:**
- [ ] `auth.test.ts` - Login flow
- [ ] `auth.test.ts` - Logout flow
- [ ] `auth.test.ts` - Invalid credentials

---

### Flow 2: [e.g., Core Feature]

| Step | Expected Result | Status | Notes |
|------|-----------------|--------|-------|
| [Step 1] | [Expected] | ⏳ | |
| [Step 2] | [Expected] | ⏳ | |
| [Step 3] | [Expected] | ⏳ | |

**Automated Tests:**
- [ ] `feature.test.ts` - [Test name]

---

### Flow 3: [e.g., Payment Flow]

| Step | Expected Result | Status | Notes |
|------|-----------------|--------|-------|
| [Step 1] | [Expected] | ⏳ | |
| [Step 2] | [Expected] | ⏳ | |

**Automated Tests:**
- [ ] `payment.test.ts` - [Test name]

---

## 🧪 Unit Tests

### Components

| Component | Test File | Tests | Status |
|-----------|-----------|-------|--------|
| Button | `Button.test.tsx` | 3 | ⏳ |
| UserProfile | `UserProfile.test.tsx` | 5 | ⏳ |
| [Component] | [File] | [#] | ⏳ |

### Utils/Helpers

| Function | Test File | Tests | Status |
|----------|-----------|-------|--------|
| formatDate | `utils.test.ts` | 4 | ⏳ |
| validateEmail | `validation.test.ts` | 6 | ⏳ |
| [Function] | [File] | [#] | ⏳ |

### API/Services

| Service | Test File | Tests | Status |
|---------|-----------|-------|--------|
| AuthService | `auth.service.test.ts` | 8 | ⏳ |
| [Service] | [File] | [#] | ⏳ |

---

## 🔗 Integration Tests

| Feature | Test File | Description | Status |
|---------|-----------|-------------|--------|
| Auth + Database | `auth-integration.test.ts` | Login stores session | ⏳ |
| API + Database | `api-integration.test.ts` | CRUD operations | ⏳ |
| [Feature] | [File] | [Description] | ⏳ |

---

## 🌐 E2E Tests

| User Flow | Test File | Description | Status |
|-----------|-----------|-------------|--------|
| Full signup flow | `signup.spec.ts` | Email → Verify → Dashboard | ⏳ |
| Purchase flow | `purchase.spec.ts` | Cart → Checkout → Confirmation | ⏳ |
| [Flow] | [File] | [Description] | ⏳ |

---

## 📱 Device/Browser Testing

### Browsers

| Browser | Version | Status | Notes |
|---------|---------|--------|-------|
| Chrome | Latest | ⏳ | |
| Safari | Latest | ⏳ | |
| Firefox | Latest | ⏳ | |
| Edge | Latest | ⏳ | |

### Devices (Mobile)

| Device | OS | Status | Notes |
|--------|-----|--------|-------|
| iPhone 15 | iOS 17 | ⏳ | |
| iPhone SE | iOS 17 | ⏳ | Small screen |
| Pixel 7 | Android 14 | ⏳ | |
| Samsung Galaxy | Android 13 | ⏳ | |

### Screen Sizes

| Size | Resolution | Status | Notes |
|------|------------|--------|-------|
| Mobile | 375x667 | ⏳ | |
| Tablet | 768x1024 | ⏳ | |
| Desktop | 1440x900 | ⏳ | |
| Large | 1920x1080 | ⏳ | |

---

## ✋ Manual Testing Checklist

### Before Every Deploy

- [ ] Login/signup works
- [ ] Core feature works
- [ ] Mobile responsive
- [ ] No console errors
- [ ] Forms validate correctly
- [ ] Error messages display properly

### Before Major Release

- [ ] All critical flows tested
- [ ] Cross-browser tested
- [ ] Mobile devices tested
- [ ] Performance acceptable (< 3s load)
- [ ] Accessibility basics (keyboard nav, contrast)

---

## 🐛 Known Issues / Skipped Tests

| Issue | Reason Skipped | Ticket | Priority |
|-------|----------------|--------|----------|
| [Issue description] | [Reason] | [Link] | P2 |

---

## 📈 Test Run History

| Date | Unit | Integration | E2E | Manual | Notes |
|------|------|-------------|-----|--------|-------|
| [Date] | 45/50 ✅ | 10/12 ✅ | 5/5 ✅ | ✅ | Pre-launch |

---

## 🔧 Running Tests

```bash
# All tests
npm test

# Unit tests only
npm run test:unit

# Integration tests
npm run test:integration

# E2E tests
npm run test:e2e

# With coverage
npm run test:coverage
```

---

## Status Legend

| Symbol | Meaning |
|--------|---------|
| ✅ | Passing |
| ❌ | Failing |
| ⏳ | Pending / Not run |
| 🔄 | In progress |
| ⚠️ | Flaky / Intermittent |

---

*Template from Thinking in Systems framework*
