# 2. Real-Time Sales Tracking — Test Cases

User Type: **Affiliate**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: real_time_sales_tracking.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 | Live feed of referral events | TC-AF-2-02-001 |
| 2.1 | New clicks shown in real time | TC-AF-2-02-002 |
| 2.1 | New sign-ups shown in real time | TC-AF-2-02-003 |
| 2.1 | New purchases shown in real time | TC-AF-2-02-004 |
| 2.1 | Timestamp per event | TC-AF-2-02-005 |
| 2.1 | Live activity available on web and mobile | TC-AF-2-02-006 |
| 2.1 | Activity event logging (viewed) | TC-AF-2-02-007 |
| 2.1 | Audit logging of the live referral activity | TC-AF-2-02-008 |
| 2.1 | Rule: The referral events are shown in real time. | TC-AF-2-02-001 |
| 2.1 | Rule: Each event has a timestamp. | TC-AF-2-02-002 |
| 2.1 | Rule: Activity events (viewed) are logged with the account and the timestamp. | TC-AF-2-02-003 |
| 2.1 | Rule: The live referral activity is audit-logged with the account and the timestamp. | TC-AF-2-02-004 |
| 2.2 | Click count in the funnel | TC-AF-2-02-009 |
| 2.2 | Sign-up count in the funnel | TC-AF-2-02-010 |
| 2.2 | Purchase count in the funnel | TC-AF-2-02-011 |
| 2.2 | Conversion rate between stages | TC-AF-2-02-012 |
| 2.2 | Funnel visualization | TC-AF-2-02-013 |
| 2.2 | Funnel available on web and mobile | TC-AF-2-02-014 |
| 2.2 | Funnel event logging (viewed) | TC-AF-2-02-015 |
| 2.2 | Audit logging of the sales funnel overview | TC-AF-2-02-016 |
| 2.2 | Rule: The funnel shows clicks, sign-ups, and purchases. | TC-AF-2-02-009 |
| 2.2 | Rule: The conversion rate is shown between stages. | TC-AF-2-02-010 |
| 2.2 | Rule: Funnel events (viewed) are logged with the account and the timestamp. | TC-AF-2-02-011 |
| 2.2 | Rule: The sales funnel overview is audit-logged with the account and the timestamp. | TC-AF-2-02-012 |
| 2.3 | List of recent referrals | TC-AF-2-02-017 |
| 2.3 | Referred customer, course, date, and status per referral | TC-AF-2-02-018 |
| 2.3 | View a referral's details | TC-AF-2-02-019 |
| 2.3 | Sort by date | TC-AF-2-02-020 |
| 2.3 | Filter by status | TC-AF-2-02-021 |
| 2.3 | Recent referrals available on web and mobile | TC-AF-2-02-022 |
| 2.3 | Referrals event logging (viewed) | TC-AF-2-02-023 |
| 2.3 | Audit logging of the recent referrals list | TC-AF-2-02-024 |
| 2.3 | Rule: The referrals show customer, course, date, and status. | TC-AF-2-02-017 |
| 2.3 | Rule: The list can be sorted by date. | TC-AF-2-02-018 |
| 2.3 | Rule: The list can be filtered by status. | TC-AF-2-02-019 |
| 2.3 | Rule: Referrals events (viewed) are logged with the account and the timestamp. | TC-AF-2-02-020 |
| 2.3 | Rule: The recent referrals list is audit-logged with the account and the timestamp. | TC-AF-2-02-021 |

## 2.1 Live Referral Activity

### TC-AF-2-02-001 — Live feed of referral events
**Type:** Positive
**Covers:** 2.1 → Live feed of referral events; Rule: The referral events are shown in real time.
**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: Live feed of referral events.
2. Observe the result and verify the full behavior: Live feed of referral events.
**Expected Result:** Live feed of referral events — delivered exactly as documented.
**Priority:** Critical

### TC-AF-2-02-002 — New clicks shown in real time
**Type:** Positive
**Covers:** 2.1 → New clicks shown in real time; Rule: Each event has a 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: New clicks shown in real time.
2. Observe the result and verify the full behavior: New clicks shown in real time.
**Expected Result:** New clicks shown in real time — delivered exactly as documented.
**Priority:** High

### TC-AF-2-02-003 — New sign-ups shown in real time
**Type:** Positive
**Covers:** 2.1 → New sign-ups shown in real time; Rule: Activity 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: New sign-ups shown in real time.
2. Observe the result and verify the full behavior: New sign-ups shown in real time.
**Expected Result:** New sign-ups shown in real time — delivered exactly as documented.
**Priority:** High

### TC-AF-2-02-004 — New purchases shown in real time
**Type:** Positive
**Covers:** 2.1 → New purchases shown in real time; Rule: The live referral activity 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: New purchases shown in real time.
2. Observe the result and verify the full behavior: New purchases shown in real time.
**Expected Result:** New purchases shown in real time — delivered exactly as documented.
**Priority:** High

### TC-AF-2-02-005 — Timestamp per event
**Type:** Positive
**Covers:** 2.1 → Timestamp per event
**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: Timestamp per event.
2. Observe the result and verify the full behavior: Timestamp per event.
**Expected Result:** Timestamp per event — delivered exactly as documented.
**Priority:** High

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

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

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


## 2.2 Sales Funnel Overview

### TC-AF-2-02-009 — Click count in the funnel
**Type:** Positive
**Covers:** 2.2 → Click count in the funnel; Rule: The funnel shows clicks, sign-ups, and purchases.
**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 count in the funnel.
2. Observe the result and verify the full behavior: Click count in the funnel.
**Expected Result:** Click count in the funnel — delivered exactly as documented.
**Priority:** Critical

### TC-AF-2-02-010 — Sign-up count in the funnel
**Type:** Positive
**Covers:** 2.2 → Sign-up count in the funnel; Rule: The conversion rate is shown between stages.
**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: Sign-up count in the funnel.
2. Observe the result and verify the full behavior: Sign-up count in the funnel.
**Expected Result:** Sign-up count in the funnel — delivered exactly as documented.
**Priority:** High

### TC-AF-2-02-011 — Purchase count in the funnel
**Type:** Positive
**Covers:** 2.2 → Purchase count in the funnel; Rule: Funnel 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: Purchase count in the funnel.
2. Observe the result and verify the full behavior: Purchase count in the funnel.
**Expected Result:** Purchase count in the funnel — delivered exactly as documented.
**Priority:** High

### TC-AF-2-02-012 — Conversion rate between stages
**Type:** Positive
**Covers:** 2.2 → Conversion rate between stages; Rule: The sales funnel 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: Conversion rate between stages.
2. Observe the result and verify the full behavior: Conversion rate between stages.
**Expected Result:** Conversion rate between stages — delivered exactly as documented.
**Priority:** High

### TC-AF-2-02-013 — Funnel visualization
**Type:** Positive
**Covers:** 2.2 → Funnel visualization
**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: Funnel visualization.
2. Observe the result and verify the full behavior: Funnel visualization.
**Expected Result:** Funnel visualization — delivered exactly as documented.
**Priority:** High

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

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

### TC-AF-2-02-016 — Audit logging of the sales funnel overview
**Type:** Positive
**Covers:** 2.2 → Audit logging of the sales funnel 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 sales funnel overview action.
2. Open the audit log and verify the entry for the action.
**Expected Result:** The sales funnel overview action is recorded in the audit log with the account and the timestamp.
**Priority:** Critical


## 2.3 Recent Referrals List

### TC-AF-2-02-017 — List of recent referrals
**Type:** Positive
**Covers:** 2.3 → List of recent referrals; Rule: The referrals show customer, course, date, and status.
**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 recent referrals.
2. Observe the result and verify the full behavior: List of recent referrals.
**Expected Result:** List of recent referrals — delivered exactly as documented.
**Priority:** Critical

### TC-AF-2-02-018 — Referred customer, course, date, and status per referral
**Type:** Positive
**Covers:** 2.3 → Referred customer, course, date, and status per referral; Rule: The list can be sorted by 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: Referred customer, course, date, and status per referral.
2. Observe the result and verify the full behavior: Referred customer, course, date, and status per referral.
**Expected Result:** Referred customer, course, date, and status per referral — delivered exactly as documented.
**Priority:** High

### TC-AF-2-02-019 — View a referral's details
**Type:** Positive
**Covers:** 2.3 → View a referral's details; Rule: The list can be filtered by status.
**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 referral's details.
2. Observe the result and verify the full behavior: View a referral's details.
**Expected Result:** View a referral's details — delivered exactly as documented.
**Priority:** High

### TC-AF-2-02-020 — Sort by date
**Type:** Positive
**Covers:** 2.3 → Sort by date; Rule: Referrals 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: Sort by date.
2. Observe the result and verify the full behavior: Sort by date.
**Expected Result:** Sort by date — delivered exactly as documented.
**Priority:** High

### TC-AF-2-02-021 — Filter by status
**Type:** Positive
**Covers:** 2.3 → Filter by status; Rule: The recent referrals list 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: Filter by status.
2. Observe the result and verify the full behavior: Filter by status.
**Expected Result:** Filter by status — delivered exactly as documented.
**Priority:** High

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

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

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