# 4. Reward System — Test Cases

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

---

## Test Execution Policy
- Zero tolerance: any deviation from documented behavior = FAILED = bug
- Every bug is immediately logged/reported (Bug ID, feature, sub-feature, expected vs actual, severity) and fixed 100% before the group passes
- Feature group passes only at 100% test pass rate

## Coverage Matrix
| Feature | Sub-feature / Rule | Test IDs |
|---------|--------------------|----------|
| 4.1 Real-World Rewards | Define a real-world reward | TC-PT-9-04-001 |
| 4.1 Real-World Rewards | Link the reward to a goal or milestone | TC-PT-9-04-002 |
| 4.1 Real-World Rewards | Child earns the reward on achievement | TC-PT-9-04-003 |
| 4.1 Real-World Rewards | Reward earned notification | TC-PT-9-04-004 |
| 4.1 Real-World Rewards | Reward redemption tracking | TC-PT-9-04-005 |
| 4.1 Real-World Rewards | Reward history | TC-PT-9-04-006 |
| 4.1 Real-World Rewards | Rewards available on web and mobile | TC-PT-9-04-007 |
| 4.1 Real-World Rewards | Reward event logging (defined, earned, redeemed) | TC-PT-9-04-008 |
| 4.1 Real-World Rewards | Audit logging of the real-world rewards | TC-PT-9-04-009 |
| 4.1 Real-World Rewards | Rule: The reward is linked to a goal or milestone. | TC-PT-9-04-001 |
| 4.1 Real-World Rewards | Rule: The child earns the reward on achievement. | TC-PT-9-04-002 |
| 4.1 Real-World Rewards | Rule: The reward redemption is tracked. | TC-PT-9-04-003 |
| 4.1 Real-World Rewards | Rule: Reward events (defined, earned, redeemed) are logged with the account and the timestamp. | TC-PT-9-04-004 |
| 4.1 Real-World Rewards | Rule: The real-world rewards is audit-logged with the account and the timestamp. | TC-PT-9-04-005 |
| 4.2 Digital Tokens | Earn digital tokens for achievements | TC-PT-9-04-010 |
| 4.2 Digital Tokens | Token earning rules (lessons, quizzes, milestones) | TC-PT-9-04-011 |
| 4.2 Digital Tokens | Token balance for the child | TC-PT-9-04-012 |
| 4.2 Digital Tokens | Tokens usable for platform benefits | TC-PT-9-04-013 |
| 4.2 Digital Tokens | Token transaction history | TC-PT-9-04-014 |
| 4.2 Digital Tokens | Tokens visible to both Parent and child | TC-PT-9-04-015 |
| 4.2 Digital Tokens | Token event logging (earned, spent) | TC-PT-9-04-016 |
| 4.2 Digital Tokens | Audit logging of the digital tokens | TC-PT-9-04-017 |
| 4.2 Digital Tokens | Rule: The tokens are earned for learning achievements. | TC-PT-9-04-010 |
| 4.2 Digital Tokens | Rule: The tokens are usable for platform benefits. | TC-PT-9-04-011 |
| 4.2 Digital Tokens | Rule: The tokens are visible to both the Parent and the child. | TC-PT-9-04-012 |
| 4.2 Digital Tokens | Rule: Token events (earned, spent) are logged with the account and the timestamp. | TC-PT-9-04-013 |
| 4.2 Digital Tokens | Rule: The digital tokens is audit-logged with the account and the timestamp. | TC-PT-9-04-014 |
| 4.3 Unlock Privileges | Set a privilege to unlock | TC-PT-9-04-018 |
| 4.3 Unlock Privileges | Unlock criteria (learning-based) | TC-PT-9-04-019 |
| 4.3 Unlock Privileges | Locked privilege shown to the child | TC-PT-9-04-020 |
| 4.3 Unlock Privileges | Privilege unlocked on meeting criteria | TC-PT-9-04-021 |
| 4.3 Unlock Privileges | Unlock notification to the child | TC-PT-9-04-022 |
| 4.3 Unlock Privileges | Unlocked privileges list | TC-PT-9-04-023 |
| 4.3 Unlock Privileges | Privileges available on web and mobile | TC-PT-9-04-024 |
| 4.3 Unlock Privileges | Privilege event logging (set, unlocked) | TC-PT-9-04-025 |
| 4.3 Unlock Privileges | Audit logging of the unlock privileges | TC-PT-9-04-026 |
| 4.3 Unlock Privileges | Rule: The privilege is unlocked by meeting learning criteria. | TC-PT-9-04-018 |
| 4.3 Unlock Privileges | Rule: The locked privilege is shown to the child. | TC-PT-9-04-019 |
| 4.3 Unlock Privileges | Rule: An unlock notification is shown on meeting the criteria. | TC-PT-9-04-020 |
| 4.3 Unlock Privileges | Rule: Privilege events (set, unlocked) are logged with the account and the timestamp. | TC-PT-9-04-021 |
| 4.3 Unlock Privileges | Rule: The unlock privileges is audit-logged with the account and the timestamp. | TC-PT-9-04-022 |

## 4.1 Real-World Rewards

### TC-PT-9-04-001 — Define a real-world reward
**Type:** Positive
**Covers:** 4.1 → Define a real-world reward; Rule: The reward is linked to a goal or milestone.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Define a real-world reward.
2. Observe the result and verify the full behavior: Define a real-world reward.
**Expected Result:** Define a real-world reward — delivered exactly as documented.
**Priority:** Critical

### TC-PT-9-04-002 — Link the reward to a goal or milestone
**Type:** Positive
**Covers:** 4.1 → Link the reward to a goal or milestone; Rule: The child earns the reward on achievement.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Link the reward to a goal or milestone.
2. Observe the result and verify the full behavior: Link the reward to a goal or milestone.
**Expected Result:** Link the reward to a goal or milestone — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-003 — Child earns the reward on achievement
**Type:** Positive
**Covers:** 4.1 → Child earns the reward on achievement; Rule: The reward redemption is tracked.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Child earns the reward on achievement.
2. Observe the result and verify the full behavior: Child earns the reward on achievement.
**Expected Result:** Child earns the reward on achievement — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-004 — Reward earned notification
**Type:** Positive
**Covers:** 4.1 → Reward earned notification; Rule: Reward events (defined, earned, redeemed) are logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Reward earned notification.
2. Observe the result and verify the full behavior: Reward earned notification.
**Expected Result:** Reward earned notification — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-005 — Reward redemption tracking
**Type:** Positive
**Covers:** 4.1 → Reward redemption tracking; Rule: The real-world rewards is audit-logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Reward redemption tracking.
2. Observe the result and verify the full behavior: Reward redemption tracking.
**Expected Result:** Reward redemption tracking — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-006 — Reward history
**Type:** Positive
**Covers:** 4.1 → Reward history
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Reward history.
2. Observe the result and verify the full behavior: Reward history.
**Expected Result:** Reward history — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-007 — Rewards available on web and mobile
**Type:** Positive
**Covers:** 4.1 → Rewards available on web and mobile
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Rewards available on web and mobile.
2. Observe the result and verify the full behavior: Rewards available on web and mobile.
**Expected Result:** Rewards available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-008 — Reward event logging (defined, earned, redeemed)
**Type:** Positive
**Covers:** 4.1 → Reward event logging (defined, earned, redeemed)
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Reward event logging (defined.
2. Observe the result and verify the full behavior: Reward event logging (defined, earned, redeemed).
**Expected Result:** Reward event logging (defined, earned, redeemed) — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-009 — Audit logging of the real-world rewards
**Type:** Positive
**Covers:** 4.1 → Audit logging of the real-world rewards
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, perform the action associated with: Audit logging of the real-world rewards.
2. Open the relevant activity / audit log and verify the event is recorded with the account, the action, and the timestamp.
**Expected Result:** The action is audit-logged — the account, the action, and the timestamp are recorded.
**Priority:** Critical

## 4.2 Digital Tokens

### TC-PT-9-04-010 — Earn digital tokens for achievements
**Type:** Positive
**Covers:** 4.2 → Earn digital tokens for achievements; Rule: The tokens are earned for learning achievements.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Earn digital tokens for achievements.
2. Observe the result and verify the full behavior: Earn digital tokens for achievements.
**Expected Result:** Earn digital tokens for achievements — delivered exactly as documented.
**Priority:** Critical

### TC-PT-9-04-011 — Token earning rules (lessons, quizzes, milestones)
**Type:** Positive
**Covers:** 4.2 → Token earning rules (lessons, quizzes, milestones); Rule: The tokens are usable for platform benefits.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Token earning rules (lessons.
2. Observe the result and verify the full behavior: Token earning rules (lessons, quizzes, milestones).
**Expected Result:** Token earning rules (lessons, quizzes, milestones) — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-012 — Token balance for the child
**Type:** Positive
**Covers:** 4.2 → Token balance for the child; Rule: The tokens are visible to both the Parent and the child.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Token balance for the child.
2. Observe the result and verify the full behavior: Token balance for the child.
**Expected Result:** Token balance for the child — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-013 — Tokens usable for platform benefits
**Type:** Positive
**Covers:** 4.2 → Tokens usable for platform benefits; Rule: Token events (earned, spent) are logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Tokens usable for platform benefits.
2. Observe the result and verify the full behavior: Tokens usable for platform benefits.
**Expected Result:** Tokens usable for platform benefits — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-014 — Token transaction history
**Type:** Positive
**Covers:** 4.2 → Token transaction history; Rule: The digital tokens is audit-logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Token transaction history.
2. Observe the result and verify the full behavior: Token transaction history.
**Expected Result:** Token transaction history — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-015 — Tokens visible to both Parent and child
**Type:** Positive
**Covers:** 4.2 → Tokens visible to both Parent and child
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Tokens visible to both Parent and child.
2. Observe the result and verify the full behavior: Tokens visible to both Parent and child.
**Expected Result:** Tokens visible to both Parent and child — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-016 — Token event logging (earned, spent)
**Type:** Positive
**Covers:** 4.2 → Token event logging (earned, spent)
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Token event logging (earned.
2. Observe the result and verify the full behavior: Token event logging (earned, spent).
**Expected Result:** Token event logging (earned, spent) — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-017 — Audit logging of the digital tokens
**Type:** Positive
**Covers:** 4.2 → Audit logging of the digital tokens
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, perform the action associated with: Audit logging of the digital tokens.
2. Open the relevant activity / audit log and verify the event is recorded with the account, the action, and the timestamp.
**Expected Result:** The action is audit-logged — the account, the action, and the timestamp are recorded.
**Priority:** Critical

## 4.3 Unlock Privileges

### TC-PT-9-04-018 — Set a privilege to unlock
**Type:** Positive
**Covers:** 4.3 → Set a privilege to unlock; Rule: The privilege is unlocked by meeting learning criteria.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Set a privilege to unlock.
2. Observe the result and verify the full behavior: Set a privilege to unlock.
**Expected Result:** Set a privilege to unlock — delivered exactly as documented.
**Priority:** Critical

### TC-PT-9-04-019 — Unlock criteria (learning-based)
**Type:** Positive
**Covers:** 4.3 → Unlock criteria (learning-based); Rule: The locked privilege is shown to the child.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Unlock criteria (learning-based).
2. Observe the result and verify the full behavior: Unlock criteria (learning-based).
**Expected Result:** Unlock criteria (learning-based) — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-020 — Locked privilege shown to the child
**Type:** Positive
**Covers:** 4.3 → Locked privilege shown to the child; Rule: An unlock notification is shown on meeting the criteria.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Locked privilege shown to the child.
2. Observe the result and verify the full behavior: Locked privilege shown to the child.
**Expected Result:** Locked privilege shown to the child — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-021 — Privilege unlocked on meeting criteria
**Type:** Positive
**Covers:** 4.3 → Privilege unlocked on meeting criteria; Rule: Privilege events (set, unlocked) are logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Privilege unlocked on meeting criteria.
2. Observe the result and verify the full behavior: Privilege unlocked on meeting criteria.
**Expected Result:** Privilege unlocked on meeting criteria — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-022 — Unlock notification to the child
**Type:** Positive
**Covers:** 4.3 → Unlock notification to the child; Rule: The unlock privileges is audit-logged with the account and the timestamp.
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Unlock notification to the child.
2. Observe the result and verify the full behavior: Unlock notification to the child.
**Expected Result:** Unlock notification to the child — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-023 — Unlocked privileges list
**Type:** Positive
**Covers:** 4.3 → Unlocked privileges list
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Unlocked privileges list.
2. Observe the result and verify the full behavior: Unlocked privileges list.
**Expected Result:** Unlocked privileges list — delivered exactly as documented.
**Priority:** High

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

### TC-PT-9-04-025 — Privilege event logging (set, unlocked)
**Type:** Positive
**Covers:** 4.3 → Privilege event logging (set, unlocked)
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, set up the precondition and perform: Privilege event logging (set.
2. Observe the result and verify the full behavior: Privilege event logging (set, unlocked).
**Expected Result:** Privilege event logging (set, unlocked) — delivered exactly as documented.
**Priority:** High

### TC-PT-9-04-026 — Audit logging of the unlock privileges
**Type:** Positive
**Covers:** 4.3 → Audit logging of the unlock privileges
**Preconditions:** A Parent account is active and the Parent is in the state required for this behavior.
**Steps:**
1. As a Parent, perform the action associated with: Audit logging of the unlock privileges.
2. Open the relevant activity / audit log and verify the event is recorded with the account, the action, and the timestamp.
**Expected Result:** The action is audit-logged — the account, the action, and the timestamp are recorded.
**Priority:** Critical
