# 4. Commission History & Payment Methods — Test Cases

User Type: **Affiliate**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: commission_history_payment_methods.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 |
|---------|--------------------|----------|
| 4.1 | Complete commission history | TC-AF-4-04-001 |
| 4.1 | Customer, course, amount, date, and status per entry | TC-AF-4-04-002 |
| 4.1 | Search commission entries | TC-AF-4-04-003 |
| 4.1 | Filter by status or period | TC-AF-4-04-004 |
| 4.1 | View a commission entry's details | TC-AF-4-04-005 |
| 4.1 | History available on web and mobile | TC-AF-4-04-006 |
| 4.1 | History event logging (viewed) | TC-AF-4-04-007 |
| 4.1 | Audit logging of the commission history | TC-AF-4-04-008 |
| 4.1 | Rule: The history is complete and itemized. | TC-AF-4-04-001 |
| 4.1 | Rule: The history can be searched and filtered. | TC-AF-4-04-002 |
| 4.1 | Rule: History events (viewed) are logged with the account and the timestamp. | TC-AF-4-04-003 |
| 4.1 | Rule: The commission history is audit-logged with the account and the timestamp. | TC-AF-4-04-004 |
| 4.2 | Add a payment method | TC-AF-4-04-009 |
| 4.2 | Edit a payment method | TC-AF-4-04-010 |
| 4.2 | Remove a payment method | TC-AF-4-04-011 |
| 4.2 | Set a default payment method | TC-AF-4-04-012 |
| 4.2 | Verify a new payment method | TC-AF-4-04-013 |
| 4.2 | Payment methods available on web and mobile | TC-AF-4-04-014 |
| 4.2 | Payment methods event logging (added, edited, removed) | TC-AF-4-04-015 |
| 4.2 | Audit logging of the payment method management | TC-AF-4-04-016 |
| 4.2 | Rule: The payment methods can be added, edited, and removed. | TC-AF-4-04-009 |
| 4.2 | Rule: A default method can be set. | TC-AF-4-04-010 |
| 4.2 | Rule: A new method is verified. | TC-AF-4-04-011 |
| 4.2 | Rule: Payment methods events (added, edited, removed) are logged with the account and the timestamp. | TC-AF-4-04-012 |
| 4.2 | Rule: The payment method management is audit-logged with the account and the timestamp. | TC-AF-4-04-013 |
| 4.3 | Raise a commission dispute | TC-AF-4-04-017 |
| 4.3 | Provide the dispute details | TC-AF-4-04-018 |
| 4.3 | Dispute status tracking (open, under review, resolved) | TC-AF-4-04-019 |
| 4.3 | Platform response to the dispute | TC-AF-4-04-020 |
| 4.3 | Dispute history | TC-AF-4-04-021 |
| 4.3 | Disputes available on web and mobile | TC-AF-4-04-022 |
| 4.3 | Disputes event logging (raised, resolved) | TC-AF-4-04-023 |
| 4.3 | Audit logging of the commission disputes | TC-AF-4-04-024 |
| 4.3 | Rule: The dispute requires details. | TC-AF-4-04-017 |
| 4.3 | Rule: The dispute status is tracked. | TC-AF-4-04-018 |
| 4.3 | Rule: Disputes events (raised, resolved) are logged with the account and the timestamp. | TC-AF-4-04-019 |
| 4.3 | Rule: The commission disputes is audit-logged with the account and the timestamp. | TC-AF-4-04-020 |

## 4.1 Commission History

### TC-AF-4-04-001 — Complete commission history
**Type:** Positive
**Covers:** 4.1 → Complete commission history; Rule: The history is complete and itemized.
**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: Complete commission history.
2. Observe the result and verify the full behavior: Complete commission history.
**Expected Result:** Complete commission history — delivered exactly as documented.
**Priority:** Critical

### TC-AF-4-04-002 — Customer, course, amount, date, and status per entry
**Type:** Positive
**Covers:** 4.1 → Customer, course, amount, date, and status per entry; Rule: The history can be searched and filtered.
**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: Customer, course, amount, date, and status per entry.
2. Observe the result and verify the full behavior: Customer, course, amount, date, and status per entry.
**Expected Result:** Customer, course, amount, date, and status per entry — delivered exactly as documented.
**Priority:** High

### TC-AF-4-04-003 — Search commission entries
**Type:** Positive
**Covers:** 4.1 → Search commission entries; Rule: History 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: Search commission entries.
2. Observe the result and verify the full behavior: Search commission entries.
**Expected Result:** Search commission entries — delivered exactly as documented.
**Priority:** High

### TC-AF-4-04-004 — Filter by status or period
**Type:** Positive
**Covers:** 4.1 → Filter by status or period; Rule: The commission history 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 or period.
2. Observe the result and verify the full behavior: Filter by status or period.
**Expected Result:** Filter by status or period — delivered exactly as documented.
**Priority:** High

### TC-AF-4-04-005 — View a commission entry's details
**Type:** Positive
**Covers:** 4.1 → View a commission entry'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 commission entry's details.
2. Observe the result and verify the full behavior: View a commission entry's details.
**Expected Result:** View a commission entry's details — delivered exactly as documented.
**Priority:** High

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

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

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


## 4.2 Payment Method Management

### TC-AF-4-04-009 — Add a payment method
**Type:** Positive
**Covers:** 4.2 → Add a payment method; Rule: The payment methods can be added, edited, and removed.
**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: Add a payment method.
2. Observe the result and verify the full behavior: Add a payment method.
**Expected Result:** Add a payment method — delivered exactly as documented.
**Priority:** Critical

### TC-AF-4-04-010 — Edit a payment method
**Type:** Positive
**Covers:** 4.2 → Edit a payment method; Rule: A default method can be set.
**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: Edit a payment method.
2. Observe the result and verify the full behavior: Edit a payment method.
**Expected Result:** Edit a payment method — delivered exactly as documented.
**Priority:** High

### TC-AF-4-04-011 — Remove a payment method
**Type:** Positive
**Covers:** 4.2 → Remove a payment method; Rule: A new method is 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: Remove a payment method.
2. Observe the result and verify the full behavior: Remove a payment method.
**Expected Result:** Remove a payment method — delivered exactly as documented.
**Priority:** High

### TC-AF-4-04-012 — Set a default payment method
**Type:** Positive
**Covers:** 4.2 → Set a default payment method; Rule: Payment methods events (added, edited, removed) 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: Set a default payment method.
2. Observe the result and verify the full behavior: Set a default payment method.
**Expected Result:** Set a default payment method — delivered exactly as documented.
**Priority:** High

### TC-AF-4-04-013 — Verify a new payment method
**Type:** Positive
**Covers:** 4.2 → Verify a new payment method; Rule: The payment method management 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: Verify a new payment method.
2. Observe the result and verify the full behavior: Verify a new payment method.
**Expected Result:** Verify a new payment method — delivered exactly as documented.
**Priority:** High

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

### TC-AF-4-04-015 — Payment methods event logging (added, edited, removed)
**Type:** Positive
**Covers:** 4.2 → Payment methods event logging (added, edited, removed)
**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: Payment methods event logging (added, edited, removed).
2. Observe the result and verify the full behavior: Payment methods event logging (added, edited, removed).
**Expected Result:** Payment methods event logging (added, edited, removed) — delivered exactly as documented.
**Priority:** High

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


## 4.3 Commission Disputes

### TC-AF-4-04-017 — Raise a commission dispute
**Type:** Positive
**Covers:** 4.3 → Raise a commission dispute; Rule: The dispute requires 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: Raise a commission dispute.
2. Observe the result and verify the full behavior: Raise a commission dispute.
**Expected Result:** Raise a commission dispute — delivered exactly as documented.
**Priority:** Critical

### TC-AF-4-04-018 — Provide the dispute details
**Type:** Positive
**Covers:** 4.3 → Provide the dispute details; Rule: The dispute status is 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: Provide the dispute details.
2. Observe the result and verify the full behavior: Provide the dispute details.
**Expected Result:** Provide the dispute details — delivered exactly as documented.
**Priority:** High

### TC-AF-4-04-019 — Dispute status tracking (open, under review, resolved)
**Type:** Positive
**Covers:** 4.3 → Dispute status tracking (open, under review, resolved); Rule: Disputes events (raised, resolved) 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: Dispute status tracking (open, under review, resolved).
2. Observe the result and verify the full behavior: Dispute status tracking (open, under review, resolved).
**Expected Result:** Dispute status tracking (open, under review, resolved) — delivered exactly as documented.
**Priority:** High

### TC-AF-4-04-020 — Platform response to the dispute
**Type:** Positive
**Covers:** 4.3 → Platform response to the dispute; Rule: The commission disputes 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: Platform response to the dispute.
2. Observe the result and verify the full behavior: Platform response to the dispute.
**Expected Result:** Platform response to the dispute — delivered exactly as documented.
**Priority:** High

### TC-AF-4-04-021 — Dispute history
**Type:** Positive
**Covers:** 4.3 → Dispute history
**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: Dispute history.
2. Observe the result and verify the full behavior: Dispute history.
**Expected Result:** Dispute history — delivered exactly as documented.
**Priority:** High

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

### TC-AF-4-04-023 — Disputes event logging (raised, resolved)
**Type:** Positive
**Covers:** 4.3 → Disputes event logging (raised, resolved)
**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: Disputes event logging (raised, resolved).
2. Observe the result and verify the full behavior: Disputes event logging (raised, resolved).
**Expected Result:** Disputes event logging (raised, resolved) — delivered exactly as documented.
**Priority:** High

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