# 2. Registration & Program Enrollment — Test Cases

User Type: **Affiliate**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: registration_program_enrollment.md — every feature, sub-feature, and rule covered

## Test Execution Policy

- Zero tolerance: any deviation from the documented behavior is a defect.
- Every failed test is logged with a Bug ID, the feature, the sub-feature, the expected vs actual result, and the severity; 100% of bugs are fixed before the group passes.
- 100% pass rate is required for the group to be marked complete.

## Coverage Matrix

| Feature | Sub-feature / Rule | Test IDs |
|---------|--------------------|----------|
| 2.1 | Register with name, email, phone, and password | TC-AF-1-02-001 |
| 2.1 | Input validation on all fields | TC-AF-1-02-002 |
| 2.1 | Duplicate account prevention | TC-AF-1-02-003 |
| 2.1 | Account creation on successful registration | TC-AF-1-02-004 |
| 2.1 | Registration confirmation | TC-AF-1-02-005 |
| 2.1 | Registration available on web and mobile | TC-AF-1-02-006 |
| 2.1 | Registration event logging (submitted, created) | TC-AF-1-02-007 |
| 2.1 | Audit logging of the affiliate registration | TC-AF-1-02-008 |
| 2.1 | Rule: The registration requires name, email, phone, and password. | TC-AF-1-02-001 |
| 2.1 | Rule: The inputs are validated. | TC-AF-1-02-002 |
| 2.1 | Rule: A duplicate account is prevented. | TC-AF-1-02-003 |
| 2.1 | Rule: Registration events (submitted, created) are logged with the account and the timestamp. | TC-AF-1-02-004 |
| 2.1 | Rule: The affiliate registration is audit-logged with the account and the timestamp. | TC-AF-1-02-005 |
| 2.2 | Verification link sent to the registered email | TC-AF-1-02-009 |
| 2.2 | Click the link to verify the email | TC-AF-1-02-010 |
| 2.2 | Account limited until verified | TC-AF-1-02-011 |
| 2.2 | Verification link is single-use | TC-AF-1-02-012 |
| 2.2 | Verification link expires | TC-AF-1-02-013 |
| 2.2 | Resend verification with a cooldown | TC-AF-1-02-014 |
| 2.2 | Verification available on web and mobile | TC-AF-1-02-015 |
| 2.2 | Verification event logging (sent, verified) | TC-AF-1-02-016 |
| 2.2 | Audit logging of the email verification | TC-AF-1-02-017 |
| 2.2 | Rule: The verification link is sent to the registered email. | TC-AF-1-02-009 |
| 2.2 | Rule: The account is limited until verified. | TC-AF-1-02-010 |
| 2.2 | Rule: The verification link is single-use and expires. | TC-AF-1-02-011 |
| 2.2 | Rule: A resend has a cooldown. | TC-AF-1-02-012 |
| 2.2 | Rule: Verification events (sent, verified) are logged with the account and the timestamp. | TC-AF-1-02-013 |
| 2.2 | Rule: The email verification is audit-logged with the account and the timestamp. | TC-AF-1-02-014 |
| 2.3 | Review the affiliate program terms | TC-AF-1-02-018 |
| 2.3 | Provide required details (payment, tax) | TC-AF-1-02-019 |
| 2.3 | Submit the enrollment | TC-AF-1-02-020 |
| 2.3 | Enrollment review and approval | TC-AF-1-02-021 |
| 2.3 | Referral tools unlocked on approval | TC-AF-1-02-022 |
| 2.3 | Enrollment status (pending, approved, rejected) | TC-AF-1-02-023 |
| 2.3 | Enrollment available on web and mobile | TC-AF-1-02-024 |
| 2.3 | Enrollment event logging (submitted, approved) | TC-AF-1-02-025 |
| 2.3 | Audit logging of the affiliate program enrollment | TC-AF-1-02-026 |
| 2.3 | Rule: The enrollment requires the required details. | TC-AF-1-02-018 |
| 2.3 | Rule: The enrollment is reviewed and approved. | TC-AF-1-02-019 |
| 2.3 | Rule: The referral tools are unlocked on approval. | TC-AF-1-02-020 |
| 2.3 | Rule: Enrollment events (submitted, approved) are logged with the account and the timestamp. | TC-AF-1-02-021 |
| 2.3 | Rule: The affiliate program enrollment is audit-logged with the account and the timestamp. | TC-AF-1-02-022 |

## 2.1 Affiliate Registration

### TC-AF-1-02-001 — Register with name, email, phone, and password
**Type:** Positive
**Covers:** 2.1 → Register with name, email, phone, and password; Rule: The registration requires name, email, phone, and password.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Register with name, email, phone, and password.
2. Observe the result and verify the full behavior: Register with name, email, phone, and password.
**Expected Result:** Register with name, email, phone, and password — delivered exactly as documented.
**Priority:** Critical

### TC-AF-1-02-002 — Input validation on all fields
**Type:** Edge
**Covers:** 2.1 → Input validation on all fields; Rule: The inputs are validated.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Input validation on all fields.
2. Observe the result and verify the full behavior: Input validation on all fields.
**Expected Result:** Input validation on all fields — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-003 — Duplicate account prevention
**Type:** Edge
**Covers:** 2.1 → Duplicate account prevention; Rule: A duplicate account is prevented.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Duplicate account prevention.
2. Observe the result and verify the full behavior: Duplicate account prevention.
**Expected Result:** Duplicate account prevention — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-004 — Account creation on successful registration
**Type:** Positive
**Covers:** 2.1 → Account creation on successful registration; Rule: Registration events (submitted, created) are logged with the account and the timestamp.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Account creation on successful registration.
2. Observe the result and verify the full behavior: Account creation on successful registration.
**Expected Result:** Account creation on successful registration — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-005 — Registration confirmation
**Type:** Positive
**Covers:** 2.1 → Registration confirmation; Rule: The affiliate registration is audit-logged with the account and the timestamp.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Registration confirmation.
2. Observe the result and verify the full behavior: Registration confirmation.
**Expected Result:** Registration confirmation — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-006 — Registration available on web and mobile
**Type:** Positive
**Covers:** 2.1 → Registration available on web and mobile
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Registration available on web and mobile.
2. Observe the result and verify the full behavior: Registration available on web and mobile.
**Expected Result:** Registration available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-007 — Registration event logging (submitted, created)
**Type:** Positive
**Covers:** 2.1 → Registration event logging (submitted, created)
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Registration event logging (submitted, created).
2. Observe the result and verify the full behavior: Registration event logging (submitted, created).
**Expected Result:** Registration event logging (submitted, created) — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-008 — Audit logging of the affiliate registration
**Type:** Positive
**Covers:** 2.1 → Audit logging of the affiliate registration
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, perform the affiliate registration action.
2. Open the audit log and verify the entry for the action.
**Expected Result:** The affiliate registration action is recorded in the audit log with the account and the timestamp.
**Priority:** Critical


## 2.2 Email Verification

### TC-AF-1-02-009 — Verification link sent to the registered email
**Type:** Positive
**Covers:** 2.2 → Verification link sent to the registered email; Rule: The verification link is sent to the registered email.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Verification link sent to the registered email.
2. Observe the result and verify the full behavior: Verification link sent to the registered email.
**Expected Result:** Verification link sent to the registered email — delivered exactly as documented.
**Priority:** Critical

### TC-AF-1-02-010 — Click the link to verify the email
**Type:** Positive
**Covers:** 2.2 → Click the link to verify the email; Rule: The account is limited until verified.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Click the link to verify the email.
2. Observe the result and verify the full behavior: Click the link to verify the email.
**Expected Result:** Click the link to verify the email — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-011 — Account limited until verified
**Type:** Edge
**Covers:** 2.2 → Account limited until verified; Rule: The verification link is single-use and expires.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Account limited until verified.
2. Observe the result and verify the full behavior: Account limited until verified.
**Expected Result:** Account limited until verified — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-012 — Verification link is single-use
**Type:** Edge
**Covers:** 2.2 → Verification link is single-use; Rule: A resend has a cooldown.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Verification link is single-use.
2. Observe the result and verify the full behavior: Verification link is single-use.
**Expected Result:** Verification link is single-use — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-013 — Verification link expires
**Type:** Edge
**Covers:** 2.2 → Verification link expires; Rule: Verification events (sent, verified) are logged with the account and the timestamp.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Verification link expires.
2. Observe the result and verify the full behavior: Verification link expires.
**Expected Result:** Verification link expires — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-014 — Resend verification with a cooldown
**Type:** Edge
**Covers:** 2.2 → Resend verification with a cooldown; Rule: The email verification is audit-logged with the account and the timestamp.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Resend verification with a cooldown.
2. Observe the result and verify the full behavior: Resend verification with a cooldown.
**Expected Result:** Resend verification with a cooldown — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-015 — Verification available on web and mobile
**Type:** Positive
**Covers:** 2.2 → Verification available on web and mobile
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Verification available on web and mobile.
2. Observe the result and verify the full behavior: Verification available on web and mobile.
**Expected Result:** Verification available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-016 — Verification event logging (sent, verified)
**Type:** Positive
**Covers:** 2.2 → Verification event logging (sent, verified)
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Verification event logging (sent, verified).
2. Observe the result and verify the full behavior: Verification event logging (sent, verified).
**Expected Result:** Verification event logging (sent, verified) — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-017 — Audit logging of the email verification
**Type:** Positive
**Covers:** 2.2 → Audit logging of the email verification
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, perform the email verification action.
2. Open the audit log and verify the entry for the action.
**Expected Result:** The email verification action is recorded in the audit log with the account and the timestamp.
**Priority:** Critical


## 2.3 Affiliate Program Enrollment

### TC-AF-1-02-018 — Review the affiliate program terms
**Type:** Positive
**Covers:** 2.3 → Review the affiliate program terms; Rule: The enrollment requires the required details.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Review the affiliate program terms.
2. Observe the result and verify the full behavior: Review the affiliate program terms.
**Expected Result:** Review the affiliate program terms — delivered exactly as documented.
**Priority:** Critical

### TC-AF-1-02-019 — Provide required details (payment, tax)
**Type:** Edge
**Covers:** 2.3 → Provide required details (payment, tax); Rule: The enrollment is reviewed and approved.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Provide required details (payment, tax).
2. Observe the result and verify the full behavior: Provide required details (payment, tax).
**Expected Result:** Provide required details (payment, tax) — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-020 — Submit the enrollment
**Type:** Positive
**Covers:** 2.3 → Submit the enrollment; Rule: The referral tools are unlocked on approval.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Submit the enrollment.
2. Observe the result and verify the full behavior: Submit the enrollment.
**Expected Result:** Submit the enrollment — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-021 — Enrollment review and approval
**Type:** Positive
**Covers:** 2.3 → Enrollment review and approval; Rule: Enrollment events (submitted, approved) are logged with the account and the timestamp.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Enrollment review and approval.
2. Observe the result and verify the full behavior: Enrollment review and approval.
**Expected Result:** Enrollment review and approval — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-022 — Referral tools unlocked on approval
**Type:** Positive
**Covers:** 2.3 → Referral tools unlocked on approval; Rule: The affiliate program enrollment is audit-logged with the account and the timestamp.
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Referral tools unlocked on approval.
2. Observe the result and verify the full behavior: Referral tools unlocked on approval.
**Expected Result:** Referral tools unlocked on approval — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-023 — Enrollment status (pending, approved, rejected)
**Type:** Edge
**Covers:** 2.3 → Enrollment status (pending, approved, rejected)
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Enrollment status (pending, approved, rejected).
2. Observe the result and verify the full behavior: Enrollment status (pending, approved, rejected).
**Expected Result:** Enrollment status (pending, approved, rejected) — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-024 — Enrollment available on web and mobile
**Type:** Positive
**Covers:** 2.3 → Enrollment available on web and mobile
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Enrollment available on web and mobile.
2. Observe the result and verify the full behavior: Enrollment available on web and mobile.
**Expected Result:** Enrollment available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-025 — Enrollment event logging (submitted, approved)
**Type:** Positive
**Covers:** 2.3 → Enrollment event logging (submitted, approved)
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, set up the precondition and perform: Enrollment event logging (submitted, approved).
2. Observe the result and verify the full behavior: Enrollment event logging (submitted, approved).
**Expected Result:** Enrollment event logging (submitted, approved) — delivered exactly as documented.
**Priority:** High

### TC-AF-1-02-026 — Audit logging of the affiliate program enrollment
**Type:** Positive
**Covers:** 2.3 → Audit logging of the affiliate program enrollment
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, perform the affiliate program enrollment action.
2. Open the audit log and verify the entry for the action.
**Expected Result:** The affiliate program enrollment action is recorded in the audit log with the account and the timestamp.
**Priority:** Critical
