# Tests: [Feature Name]

**Session:** `.claude/sessions/YYYY-MM-DD-feature-name-v1/`
**Created:** YYYY-MM-DD
**Last Updated:** YYYY-MM-DD HH:MM
**Workflow Version:** v4.1

---

## Test Planning (qa-automation writes before implementation - NEW v4.1)

**Planned by:** [Not yet planned]
**Date:** [Date]

### Tests to Create

| Test ID | Type | File | Description | AC Mapping | Priority |
|---------|------|------|-------------|------------|----------|
| - | - | - | - | - | - |

### Batch Execution Plan

| Batch | Tests | Status |
|-------|-------|--------|
| - | - | Pending |

### Execution Strategy

- **Batch Size:** 5 tests per batch
- **Success Threshold:** 90% (100% preferred)
- **Max Retries per Batch:** 3

---

## Selector Validation (frontend-validator writes here - NEW v4.1)

**Validated by:** [Not yet validated]
**Date:** [Date]
**Status:** [Pending / PASSED / Failed / Skipped]
**Skip Reason:** [If skipped, why - e.g., "requiresNewSelectors = no"]

### Selectors Validated

| Selector | Exists in DOM | Component | Notes |
|----------|---------------|-----------|-------|
| - | - | - | - |

### @ui-selectors Gate Result

- **Tests Created:** [Yes/No]
- **Tests Location:** `e2e/selectors/{feature}-selectors.cy.ts`
- **Execution Result:** [PASSED / FAILED / SKIPPED]
- **Retries Needed:** [0-3]

---

## Test Results (qa-automation writes here)

### Latest Test Run
**Date:** [Not yet executed]
**Status:** [Pending / Passed / Failed]
**Total Tests:** 0
**Passed:** 0
**Failed:** 0
**Skipped:** 0

### Test Summary

#### API Tests
| Test ID | Description | Status | Notes |
|---------|-------------|--------|-------|
| [No tests executed yet] | | | |

#### UAT Tests
| Test ID | Description | Status | Notes |
|---------|-------------|--------|-------|
| [No tests executed yet] | | | |

### Test Execution History
| Date | Total | Passed | Failed | Agent |
|------|-------|--------|--------|-------|
| [No history yet] | | | | |

### Failed Test Details
[No failures recorded]

---

## Selectores data-cy (frontend-validator writes here)

**Documented by:** frontend-validator
**Date:** [Not yet documented]
**Status:** [Pending / Complete]

### Components Inventory

| Component | File Path | Selector Pattern | Description |
|-----------|-----------|------------------|-------------|
| [Example] | `app/components/Example.tsx` | `example-{action}` | Example component |

### Detailed Selectors

#### [Entity/Feature Name] Components

| Element | Selector data-cy | Usage | Notes |
|---------|------------------|-------|-------|
| List Container | `{entity}-list` | Main list wrapper | Required for list tests |
| Create Button | `{entity}-list-create-btn` | Button to open create form | |
| Table Row | `{entity}-list-row-{id}` | Individual row | Dynamic ID |
| Edit Button | `{entity}-row-{id}-edit-btn` | Edit action per row | |
| Delete Button | `{entity}-row-{id}-delete-btn` | Delete action per row | |
| Form | `{entity}-form` | Create/Edit form | |
| Submit Button | `{entity}-form-submit-btn` | Form submission | |
| Cancel Button | `{entity}-form-cancel-btn` | Cancel action | |

#### Form Fields

| Field | Selector data-cy | Type | Validation |
|-------|------------------|------|------------|
| [Field Name] | `{entity}-form-{field}` | text/select/etc | Required/Optional |

### Selector Naming Convention

**Pattern:** `{entity}-{component}-{element}-{action}`

**Examples:**
- `product-list` - Products list container
- `product-list-create-btn` - Create button in products list
- `product-form-name` - Name field in product form
- `product-row-123-edit-btn` - Edit button for product ID 123

### Missing Selectors (Issues Found)

| Component | Issue | Recommendation | Fixed |
|-----------|-------|----------------|-------|
| [None found] | | | |

---

## Translation Keys Validation (frontend-validator writes here)

### Translation Files Checked
- [ ] `contents/themes/{theme}/messages/en.json`
- [ ] `contents/themes/{theme}/messages/es.json`

### Namespace Used
**Namespace:** `[feature-namespace]`
**Location:** `contents/themes/{theme}/messages/`

### Keys Inventory

| Key | EN Value | ES Value | Used In |
|-----|----------|----------|---------|
| [namespace.title] | [English] | [Spanish] | [Component] |

### Issues Found

| Issue Type | Location | Description | Fixed |
|------------|----------|-------------|-------|
| [None found] | | | |

---

## AC Coverage Report (qa-automation writes here)

**Generated by:** qa-automation
**Date:** [Not yet generated]
**Status:** [Pending / Complete]

### Coverage Summary

| Category | Total | Covered | Coverage |
|----------|-------|---------|----------|
| [AUTO] criteria | 0 | 0 | 0% |
| [MANUAL] criteria | 0 | 0 | verified by qa-manual |
| [REVIEW] criteria | 0 | 0 | verified by code-reviewer |

### Detailed AC Coverage

| AC ID | Classification | Description | Test Coverage | Status |
|-------|----------------|-------------|---------------|--------|
| [No ACs mapped yet] | | | | |

### Coverage Notes

- **[AUTO]** criteria MUST have automated tests (API or UAT)
- **[MANUAL]** criteria verified by qa-manual during Phase 14
- **[REVIEW]** criteria verified by code-reviewer during Phase 16
- Coverage < 100% for [AUTO] does NOT block workflow (informative only)

---

## Test Coverage Requirements

### API Tests Required
- [ ] CRUD operations (Create, Read, Update, Delete)
- [ ] Validation errors (required fields, format validation)
- [ ] Authentication (401 for unauthenticated)
- [ ] Authorization (403 for unauthorized)
- [ ] Pagination (if applicable)
- [ ] Filtering/Search (if applicable)

### UAT Tests Required
- [ ] Happy path flows
- [ ] Form validation (client-side)
- [ ] Error states
- [ ] Loading states
- [ ] Responsive behavior (desktop/mobile)
- [ ] Accessibility basics

---

## Notes

[Additional notes about testing this feature]

---

**Updated by:** [agent-name]
**Last Update:** YYYY-MM-DD HH:MM
