# 1. Tier Structure & Direct Referrals — Test Cases

User Type: **Affiliate**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: tier_structure_direct_referrals.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 |
|---------|--------------------|----------|
| 1.1 | Tier structure shown (Tier 1, Tier 2) | TC-AF-5-01-001 |
| 1.1 | Commission rate per tier | TC-AF-5-01-002 |
| 1.1 | Qualification conditions per tier | TC-AF-5-01-003 |
| 1.1 | Tier structure explanation | TC-AF-5-01-004 |
| 1.1 | Tier structure available on web and mobile | TC-AF-5-01-005 |
| 1.1 | Tier structure event logging (viewed) | TC-AF-5-01-006 |
| 1.1 | Audit logging of the tier structure overview | TC-AF-5-01-007 |
| 1.1 | Rule: The tiers are Tier 1 (direct) and Tier 2 (sub-affiliates). | TC-AF-5-01-001 |
| 1.1 | Rule: The rate and conditions are shown per tier. | TC-AF-5-01-002 |
| 1.1 | Rule: Tier structure events (viewed) are logged with the account and the timestamp. | TC-AF-5-01-003 |
| 1.1 | Rule: The tier structure overview is audit-logged with the account and the timestamp. | TC-AF-5-01-004 |
| 1.2 | List of Tier 1 direct referrals | TC-AF-5-01-008 |
| 1.2 | Sale and Tier 1 commission per referral | TC-AF-5-01-009 |
| 1.2 | Tier 1 earnings total | TC-AF-5-01-010 |
| 1.2 | Tier 1 earnings by period | TC-AF-5-01-011 |
| 1.2 | View a Tier 1 referral's details | TC-AF-5-01-012 |
| 1.2 | Tier 1 available on web and mobile | TC-AF-5-01-013 |
| 1.2 | Tier 1 event logging (viewed) | TC-AF-5-01-014 |
| 1.2 | Audit logging of the Tier 1 direct referral earnings | TC-AF-5-01-015 |
| 1.2 | Rule: The Tier 1 earnings are from direct referrals. | TC-AF-5-01-008 |
| 1.2 | Rule: The earnings are shown by period. | TC-AF-5-01-009 |
| 1.2 | Rule: Tier 1 events (viewed) are logged with the account and the timestamp. | TC-AF-5-01-010 |
| 1.2 | Rule: The Tier 1 direct referral earnings is audit-logged with the account and the timestamp. | TC-AF-5-01-011 |
| 1.3 | List of sub-affiliates | TC-AF-5-01-016 |
| 1.3 | Sales per sub-affiliate | TC-AF-5-01-017 |
| 1.3 | Tier 2 commission per sub-affiliate | TC-AF-5-01-018 |
| 1.3 | Tier 2 earnings total | TC-AF-5-01-019 |
| 1.3 | Tier 2 earnings by period | TC-AF-5-01-020 |
| 1.3 | Tier 2 available on web and mobile | TC-AF-5-01-021 |
| 1.3 | Tier 2 event logging (viewed) | TC-AF-5-01-022 |
| 1.3 | Audit logging of the Tier 2 sub-affiliate earnings | TC-AF-5-01-023 |
| 1.3 | Rule: The Tier 2 earnings are from sub-affiliates' sales. | TC-AF-5-01-016 |
| 1.3 | Rule: The earnings are shown by period. | TC-AF-5-01-017 |
| 1.3 | Rule: Tier 2 events (viewed) are logged with the account and the timestamp. | TC-AF-5-01-018 |
| 1.3 | Rule: The Tier 2 sub-affiliate earnings is audit-logged with the account and the timestamp. | TC-AF-5-01-019 |

## 1.1 Tier Structure Overview

### TC-AF-5-01-001 — Tier structure shown (Tier 1, Tier 2)
**Type:** Positive
**Covers:** 1.1 → Tier structure shown (Tier 1, Tier 2); Rule: The tiers are Tier 1 (direct) and Tier 2 (sub-affiliates).
**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: Tier structure shown (Tier 1, Tier 2).
2. Observe the result and verify the full behavior: Tier structure shown (Tier 1, Tier 2).
**Expected Result:** Tier structure shown (Tier 1, Tier 2) — delivered exactly as documented.
**Priority:** Critical

### TC-AF-5-01-002 — Commission rate per tier
**Type:** Positive
**Covers:** 1.1 → Commission rate per tier; Rule: The rate and conditions are shown per tier.
**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: Commission rate per tier.
2. Observe the result and verify the full behavior: Commission rate per tier.
**Expected Result:** Commission rate per tier — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-003 — Qualification conditions per tier
**Type:** Positive
**Covers:** 1.1 → Qualification conditions per tier; Rule: Tier structure events (viewed) 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: Qualification conditions per tier.
2. Observe the result and verify the full behavior: Qualification conditions per tier.
**Expected Result:** Qualification conditions per tier — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-004 — Tier structure explanation
**Type:** Positive
**Covers:** 1.1 → Tier structure explanation; Rule: The tier structure overview 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: Tier structure explanation.
2. Observe the result and verify the full behavior: Tier structure explanation.
**Expected Result:** Tier structure explanation — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-005 — Tier structure available on web and mobile
**Type:** Positive
**Covers:** 1.1 → Tier structure 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: Tier structure available on web and mobile.
2. Observe the result and verify the full behavior: Tier structure available on web and mobile.
**Expected Result:** Tier structure available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-006 — Tier structure event logging (viewed)
**Type:** Positive
**Covers:** 1.1 → Tier structure event logging (viewed)
**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: Tier structure event logging (viewed).
2. Observe the result and verify the full behavior: Tier structure event logging (viewed).
**Expected Result:** Tier structure event logging (viewed) — delivered exactly as documented.
**Priority:** High

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


## 1.2 Tier 1 Direct Referral Earnings

### TC-AF-5-01-008 — List of Tier 1 direct referrals
**Type:** Positive
**Covers:** 1.2 → List of Tier 1 direct referrals; Rule: The Tier 1 earnings are from direct referrals.
**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: List of Tier 1 direct referrals.
2. Observe the result and verify the full behavior: List of Tier 1 direct referrals.
**Expected Result:** List of Tier 1 direct referrals — delivered exactly as documented.
**Priority:** Critical

### TC-AF-5-01-009 — Sale and Tier 1 commission per referral
**Type:** Positive
**Covers:** 1.2 → Sale and Tier 1 commission per referral; Rule: The earnings are shown by period.
**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: Sale and Tier 1 commission per referral.
2. Observe the result and verify the full behavior: Sale and Tier 1 commission per referral.
**Expected Result:** Sale and Tier 1 commission per referral — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-010 — Tier 1 earnings total
**Type:** Positive
**Covers:** 1.2 → Tier 1 earnings total; Rule: Tier 1 events (viewed) 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: Tier 1 earnings total.
2. Observe the result and verify the full behavior: Tier 1 earnings total.
**Expected Result:** Tier 1 earnings total — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-011 — Tier 1 earnings by period
**Type:** Positive
**Covers:** 1.2 → Tier 1 earnings by period; Rule: The Tier 1 direct referral earnings 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: Tier 1 earnings by period.
2. Observe the result and verify the full behavior: Tier 1 earnings by period.
**Expected Result:** Tier 1 earnings by period — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-012 — View a Tier 1 referral's details
**Type:** Positive
**Covers:** 1.2 → View a Tier 1 referral's 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: View a Tier 1 referral's details.
2. Observe the result and verify the full behavior: View a Tier 1 referral's details.
**Expected Result:** View a Tier 1 referral's details — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-013 — Tier 1 available on web and mobile
**Type:** Positive
**Covers:** 1.2 → Tier 1 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: Tier 1 available on web and mobile.
2. Observe the result and verify the full behavior: Tier 1 available on web and mobile.
**Expected Result:** Tier 1 available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-014 — Tier 1 event logging (viewed)
**Type:** Positive
**Covers:** 1.2 → Tier 1 event logging (viewed)
**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: Tier 1 event logging (viewed).
2. Observe the result and verify the full behavior: Tier 1 event logging (viewed).
**Expected Result:** Tier 1 event logging (viewed) — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-015 — Audit logging of the Tier 1 direct referral earnings
**Type:** Positive
**Covers:** 1.2 → Audit logging of the Tier 1 direct referral earnings
**Preconditions:** A Affiliate account is active and the Affiliate is in the state required for this behavior.
**Steps:**
1. As a Affiliate, perform the Tier 1 direct referral earnings action.
2. Open the audit log and verify the entry for the action.
**Expected Result:** The Tier 1 direct referral earnings action is recorded in the audit log with the account and the timestamp.
**Priority:** Critical


## 1.3 Tier 2 Sub-Affiliate Earnings

### TC-AF-5-01-016 — List of sub-affiliates
**Type:** Positive
**Covers:** 1.3 → List of sub-affiliates; Rule: The Tier 2 earnings are from sub-affiliates' sales.
**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: List of sub-affiliates.
2. Observe the result and verify the full behavior: List of sub-affiliates.
**Expected Result:** List of sub-affiliates — delivered exactly as documented.
**Priority:** Critical

### TC-AF-5-01-017 — Sales per sub-affiliate
**Type:** Positive
**Covers:** 1.3 → Sales per sub-affiliate; Rule: The earnings are shown by period.
**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: Sales per sub-affiliate.
2. Observe the result and verify the full behavior: Sales per sub-affiliate.
**Expected Result:** Sales per sub-affiliate — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-018 — Tier 2 commission per sub-affiliate
**Type:** Positive
**Covers:** 1.3 → Tier 2 commission per sub-affiliate; Rule: Tier 2 events (viewed) 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: Tier 2 commission per sub-affiliate.
2. Observe the result and verify the full behavior: Tier 2 commission per sub-affiliate.
**Expected Result:** Tier 2 commission per sub-affiliate — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-019 — Tier 2 earnings total
**Type:** Positive
**Covers:** 1.3 → Tier 2 earnings total; Rule: The Tier 2 sub-affiliate earnings 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: Tier 2 earnings total.
2. Observe the result and verify the full behavior: Tier 2 earnings total.
**Expected Result:** Tier 2 earnings total — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-020 — Tier 2 earnings by period
**Type:** Positive
**Covers:** 1.3 → Tier 2 earnings by period
**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: Tier 2 earnings by period.
2. Observe the result and verify the full behavior: Tier 2 earnings by period.
**Expected Result:** Tier 2 earnings by period — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-021 — Tier 2 available on web and mobile
**Type:** Positive
**Covers:** 1.3 → Tier 2 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: Tier 2 available on web and mobile.
2. Observe the result and verify the full behavior: Tier 2 available on web and mobile.
**Expected Result:** Tier 2 available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-AF-5-01-022 — Tier 2 event logging (viewed)
**Type:** Positive
**Covers:** 1.3 → Tier 2 event logging (viewed)
**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: Tier 2 event logging (viewed).
2. Observe the result and verify the full behavior: Tier 2 event logging (viewed).
**Expected Result:** Tier 2 event logging (viewed) — delivered exactly as documented.
**Priority:** High

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