---
created_date:
executor:
status: Draft            # Draft | Ready | Implemented | Verified — execution lifecycle
artifact-status: draft   # draft | approved
feature_ids: # comma-separated Feature IDs chained in this scenario
scenario_id:
---

# E2E Mobile Test Specification

**Scenario**: [{Scenario_ID}]({SCENARIO_LINK})
**Features**: {feature_ids}
**Author**: @[executor]
**Created**: [created_date]
**Status**: [status]

---

## 📋 Test Objective
> Brief description of what this e2e test suite validates

**Scope**: Mobile only (Detox)  
**Target Audience**: [Clinical / Organic / Both]

---

## 🧪 Test Cases

Use table format for QA verification:

| ID | Test Type | Test Scenario | Preconditions | Test Data | Test Steps | Expected Result | Priority |
|---|---|---|---|---|---|---|---|
| TC_[FEATURE]_001 | Functional | [Scenario Title] | - Precondition 1<br>- Precondition 2 | Key data values | 1. Action 1<br>2. Action 2<br>3. Action 3 | - Expected result 1<br>- Expected result 2 | P0 |
| TC_[FEATURE]_002 | Validation | [Validation Scenario] | - Precondition | Test data | 1. Action<br>2. Submit | - Validation error<br>- Stay on screen | P0 |
| TC_[FEATURE]_003 | Error Handling | [Error Scenario] | - Error condition | N/A | 1. Trigger error<br>2. Observe handling | - Error message shown<br>- Recovery option provided | P1 |

**Format Notes**:
- **ID**: TC_[FEATURE]_###
- **Test Type**: Functional / Validation / Navigation / Error Handling / Edge Case
- **Test Scenario**: Brief description (use gerund/action verb)
- **Preconditions**: Use bullet list with <br> for line breaks
- **Test Data**: Concrete values or N/A
- **Test Steps**: Numbered list with <br> separators
- **Expected Result**: Bullet list with <br> separators
- **Priority**: P0 (Critical) / P1 (Important) / P2 (Nice-to-have)

---

## 🎯 Test Coverage

| Feature/Screen | Functional | Validation | Error Handling | Edge Cases | Total |
|---|---|---|---|---|---|
| [Feature 1] | 2 | 2 | 1 | 1 | 6 |
| [Feature 2] | 3 | 3 | 2 | 0 | 8 |
| **TOTAL** | **#** | **#** | **#** | **#** | **##** |

---

## 🔄 Test Environment & Prerequisites

**Device Setup**:
- [ ] iOS Simulator / Physical Device
- [ ] Android Emulator / Physical Device
- [ ] Min OS versions: iOS 14+, Android 9+

**Test Data**:
- [ ] Mock data fixtures prepared
- [ ] User accounts ready
- [ ] External service stubs configured

**Tools**:
- Detox (v[version])
- Node/Yarn
- [Other tools]

---

## ⚠️ Edge Cases & Error Scenarios

| Scenario | Expected Behavior |
|---|---|
| Network failure during test | Graceful error handling |
| [Other edge case] | [Expected behavior] |

---

## 📊 Success Criteria

- [ ] All test cases pass on iOS
- [ ] All test cases pass on Android
- [ ] Test execution time < [X] seconds
- [ ] Zero flaky tests (100% pass rate on 3 consecutive runs)
- [ ] Code coverage meets [X]%

---

## Implementation Notes

> Any special setup, mocking, or gotchas for implementing these tests

---

## ✅ QA Verification Checklist

- [ ] TC_[FEATURE]_001: [Test scenario] verified on iOS
- [ ] TC_[FEATURE]_001: [Test scenario] verified on Android
- [ ] TC_[FEATURE]_002: [Test scenario] verified
- [ ] All preconditions met before testing
- [ ] All test data available and valid
- [ ] All navigation flows working
- [ ] All error messages displaying
- [ ] No crashes or unhandled exceptions
- [ ] Performance acceptable (< X seconds)
- [ ] Device orientation changes handled
- [ ] Network conditions tested (if applicable)

**QA Sign-off**:
- [ ] QA Tester: [Name] - Date: ____
- [ ] QA Lead: [Name] - Date: ____
- [ ] Ready for Production: [ ] Yes [ ] No

---

## Review & Approval

- [ ] QA: [Name/ADO_ID]
- [ ] Tech Lead: [Name/ADO_ID]
- [ ] Product: [Name/ADO_ID]
