# 1. Referral Identity & Assets — Test Cases

User Type: **Affiliate**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: referral_identity_assets.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 | Unique referral link generated for the Affiliate | TC-AF-2-01-001 |
| 1.1 | Copy the referral link | TC-AF-2-01-002 |
| 1.1 | View the link's click and conversion counts | TC-AF-2-01-003 |
| 1.1 | Regenerate the referral link | TC-AF-2-01-004 |
| 1.1 | Attribution of sign-ups and purchases to the link | TC-AF-2-01-005 |
| 1.1 | Link available on web and mobile | TC-AF-2-01-006 |
| 1.1 | Link event logging (generated, copied, regenerated) | TC-AF-2-01-007 |
| 1.1 | Audit logging of the unique referral link | TC-AF-2-01-008 |
| 1.1 | Rule: The referral link is unique to the Affiliate. | TC-AF-2-01-001 |
| 1.1 | Rule: The link's click and conversion counts are tracked. | TC-AF-2-01-002 |
| 1.1 | Rule: The link can be regenerated. | TC-AF-2-01-003 |
| 1.1 | Rule: Link events (generated, copied, regenerated) are logged with the account and the timestamp. | TC-AF-2-01-004 |
| 1.1 | Rule: The unique referral link is audit-logged with the account and the timestamp. | TC-AF-2-01-005 |
| 1.2 | QR code generated from the referral link | TC-AF-2-01-009 |
| 1.2 | Download the QR code | TC-AF-2-01-010 |
| 1.2 | QR code reflects the current referral link | TC-AF-2-01-011 |
| 1.2 | Regenerate the QR code when the link changes | TC-AF-2-01-012 |
| 1.2 | Scan attribution to the Affiliate | TC-AF-2-01-013 |
| 1.2 | QR code available on web and mobile | TC-AF-2-01-014 |
| 1.2 | QR code event logging (generated, downloaded) | TC-AF-2-01-015 |
| 1.2 | Audit logging of the referral QR code | TC-AF-2-01-016 |
| 1.2 | Rule: The QR code encodes the referral link. | TC-AF-2-01-009 |
| 1.2 | Rule: The QR code reflects the current referral link. | TC-AF-2-01-010 |
| 1.2 | Rule: The QR code is regenerated when the link changes. | TC-AF-2-01-011 |
| 1.2 | Rule: QR code events (generated, downloaded) are logged with the account and the timestamp. | TC-AF-2-01-012 |
| 1.2 | Rule: The referral QR code is audit-logged with the account and the timestamp. | TC-AF-2-01-013 |
| 1.3 | Browse the marketing materials library | TC-AF-2-01-017 |
| 1.3 | Preview a material | TC-AF-2-01-018 |
| 1.3 | Download a material | TC-AF-2-01-019 |
| 1.3 | Materials categorized by type (banners, social posts, graphics) | TC-AF-2-01-020 |
| 1.3 | Materials are branded and up to date | TC-AF-2-01-021 |
| 1.3 | Materials available on web and mobile | TC-AF-2-01-022 |
| 1.3 | Materials event logging (viewed, downloaded) | TC-AF-2-01-023 |
| 1.3 | Audit logging of the marketing materials | TC-AF-2-01-024 |
| 1.3 | Rule: The materials are categorized by type. | TC-AF-2-01-017 |
| 1.3 | Rule: The materials are branded and up to date. | TC-AF-2-01-018 |
| 1.3 | Rule: Materials events (viewed, downloaded) are logged with the account and the timestamp. | TC-AF-2-01-019 |
| 1.3 | Rule: The marketing materials is audit-logged with the account and the timestamp. | TC-AF-2-01-020 |

## 1.1 Unique Referral Link

### TC-AF-2-01-001 — Unique referral link generated for the Affiliate
**Type:** Edge
**Covers:** 1.1 → Unique referral link generated for the Affiliate; Rule: The referral link is unique to the Affiliate.
**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: Unique referral link generated for the Affiliate.
2. Observe the result and verify the full behavior: Unique referral link generated for the Affiliate.
**Expected Result:** Unique referral link generated for the Affiliate — delivered exactly as documented.
**Priority:** Critical

### TC-AF-2-01-002 — Copy the referral link
**Type:** Positive
**Covers:** 1.1 → Copy the referral link; Rule: The link's click and conversion counts are tracked.
**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: Copy the referral link.
2. Observe the result and verify the full behavior: Copy the referral link.
**Expected Result:** Copy the referral link — delivered exactly as documented.
**Priority:** High

### TC-AF-2-01-003 — View the link's click and conversion counts
**Type:** Positive
**Covers:** 1.1 → View the link's click and conversion counts; Rule: The link can be regenerated.
**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 the link's click and conversion counts.
2. Observe the result and verify the full behavior: View the link's click and conversion counts.
**Expected Result:** View the link's click and conversion counts — delivered exactly as documented.
**Priority:** High

### TC-AF-2-01-004 — Regenerate the referral link
**Type:** Positive
**Covers:** 1.1 → Regenerate the referral link; Rule: Link events (generated, copied, regenerated) 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: Regenerate the referral link.
2. Observe the result and verify the full behavior: Regenerate the referral link.
**Expected Result:** Regenerate the referral link — delivered exactly as documented.
**Priority:** High

### TC-AF-2-01-005 — Attribution of sign-ups and purchases to the link
**Type:** Positive
**Covers:** 1.1 → Attribution of sign-ups and purchases to the link; Rule: The unique referral link 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: Attribution of sign-ups and purchases to the link.
2. Observe the result and verify the full behavior: Attribution of sign-ups and purchases to the link.
**Expected Result:** Attribution of sign-ups and purchases to the link — delivered exactly as documented.
**Priority:** High

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

### TC-AF-2-01-007 — Link event logging (generated, copied, regenerated)
**Type:** Positive
**Covers:** 1.1 → Link event logging (generated, copied, regenerated)
**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: Link event logging (generated, copied, regenerated).
2. Observe the result and verify the full behavior: Link event logging (generated, copied, regenerated).
**Expected Result:** Link event logging (generated, copied, regenerated) — delivered exactly as documented.
**Priority:** High

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


## 1.2 Referral QR Code

### TC-AF-2-01-009 — QR code generated from the referral link
**Type:** Positive
**Covers:** 1.2 → QR code generated from the referral link; Rule: The QR code encodes the referral link.
**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: QR code generated from the referral link.
2. Observe the result and verify the full behavior: QR code generated from the referral link.
**Expected Result:** QR code generated from the referral link — delivered exactly as documented.
**Priority:** Critical

### TC-AF-2-01-010 — Download the QR code
**Type:** Positive
**Covers:** 1.2 → Download the QR code; Rule: The QR code reflects the current referral link.
**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: Download the QR code.
2. Observe the result and verify the full behavior: Download the QR code.
**Expected Result:** Download the QR code — delivered exactly as documented.
**Priority:** High

### TC-AF-2-01-011 — QR code reflects the current referral link
**Type:** Positive
**Covers:** 1.2 → QR code reflects the current referral link; Rule: The QR code is regenerated when the link changes.
**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: QR code reflects the current referral link.
2. Observe the result and verify the full behavior: QR code reflects the current referral link.
**Expected Result:** QR code reflects the current referral link — delivered exactly as documented.
**Priority:** High

### TC-AF-2-01-012 — Regenerate the QR code when the link changes
**Type:** Positive
**Covers:** 1.2 → Regenerate the QR code when the link changes; Rule: QR code events (generated, downloaded) 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: Regenerate the QR code when the link changes.
2. Observe the result and verify the full behavior: Regenerate the QR code when the link changes.
**Expected Result:** Regenerate the QR code when the link changes — delivered exactly as documented.
**Priority:** High

### TC-AF-2-01-013 — Scan attribution to the Affiliate
**Type:** Positive
**Covers:** 1.2 → Scan attribution to the Affiliate; Rule: The referral QR code 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: Scan attribution to the Affiliate.
2. Observe the result and verify the full behavior: Scan attribution to the Affiliate.
**Expected Result:** Scan attribution to the Affiliate — delivered exactly as documented.
**Priority:** High

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

### TC-AF-2-01-015 — QR code event logging (generated, downloaded)
**Type:** Positive
**Covers:** 1.2 → QR code event logging (generated, downloaded)
**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: QR code event logging (generated, downloaded).
2. Observe the result and verify the full behavior: QR code event logging (generated, downloaded).
**Expected Result:** QR code event logging (generated, downloaded) — delivered exactly as documented.
**Priority:** High

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


## 1.3 Marketing Materials

### TC-AF-2-01-017 — Browse the marketing materials library
**Type:** Positive
**Covers:** 1.3 → Browse the marketing materials library; Rule: The materials are categorized by type.
**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: Browse the marketing materials library.
2. Observe the result and verify the full behavior: Browse the marketing materials library.
**Expected Result:** Browse the marketing materials library — delivered exactly as documented.
**Priority:** Critical

### TC-AF-2-01-018 — Preview a material
**Type:** Positive
**Covers:** 1.3 → Preview a material; Rule: The materials are branded and up to date.
**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: Preview a material.
2. Observe the result and verify the full behavior: Preview a material.
**Expected Result:** Preview a material — delivered exactly as documented.
**Priority:** High

### TC-AF-2-01-019 — Download a material
**Type:** Positive
**Covers:** 1.3 → Download a material; Rule: Materials events (viewed, downloaded) 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: Download a material.
2. Observe the result and verify the full behavior: Download a material.
**Expected Result:** Download a material — delivered exactly as documented.
**Priority:** High

### TC-AF-2-01-020 — Materials categorized by type (banners, social posts, graphics)
**Type:** Positive
**Covers:** 1.3 → Materials categorized by type (banners, social posts, graphics); Rule: The marketing materials 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: Materials categorized by type (banners, social posts, graphics).
2. Observe the result and verify the full behavior: Materials categorized by type (banners, social posts, graphics).
**Expected Result:** Materials categorized by type (banners, social posts, graphics) — delivered exactly as documented.
**Priority:** High

### TC-AF-2-01-021 — Materials are branded and up to date
**Type:** Positive
**Covers:** 1.3 → Materials are branded and up to date
**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: Materials are branded and up to date.
2. Observe the result and verify the full behavior: Materials are branded and up to date.
**Expected Result:** Materials are branded and up to date — delivered exactly as documented.
**Priority:** High

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

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

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