# 3. Leaderboards & Challenges — Test Cases

User Type: **Student**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: leaderboards_challenges.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 |
|---------|--------------------|----------|
| 3.1 Leaderboards | Leaderboard by class | TC-ST-09-03-001 |
| 3.1 Leaderboards | Leaderboard by subject | TC-ST-09-03-002 |
| 3.1 Leaderboards | Overall leaderboard | TC-ST-09-03-003 |
| 3.1 Leaderboards | Student's rank highlighted | TC-ST-09-03-004 |
| 3.1 Leaderboards | Top performers listed | TC-ST-09-03-005 |
| 3.1 Leaderboards | Filter by period (week, month, term) | TC-ST-09-03-006 |
| 3.1 Leaderboards | Leaderboard updated on a schedule | TC-ST-09-03-007 |
| 3.1 Leaderboards | Leaderboard available on web and mobile | TC-ST-09-03-008 |
| 3.1 Leaderboards | Leaderboard event logging (viewed) | TC-ST-09-03-009 |
| 3.1 Leaderboards | Audit logging of the leaderboards | TC-ST-09-03-010 |
| 3.1 Leaderboards | Rule: Leaderboards are by class, subject, or overall. | TC-ST-09-03-001 |
| 3.1 Leaderboards | Rule: The Student's rank is highlighted. | TC-ST-09-03-002 |
| 3.1 Leaderboards | Rule: The period filter changes the ranking window. | TC-ST-09-03-003 |
| 3.1 Leaderboards | Rule: Leaderboards are updated on a schedule, not in real time. | TC-ST-09-03-004 |
| 3.1 Leaderboards | Rule: Leaderboard events (viewed) are logged with the leaderboard and the timestamp. | TC-ST-09-03-005 |
| 3.1 Leaderboards | Rule: The leaderboards is audit-logged with the account, the leaderboard, and the timestamp. | TC-ST-09-03-006 |
| 3.2 Challenges | Daily challenges | TC-ST-09-03-011 |
| 3.2 Challenges | Weekly challenges | TC-ST-09-03-012 |
| 3.2 Challenges | Special event challenges | TC-ST-09-03-013 |
| 3.2 Challenges | Challenge progress tracking | TC-ST-09-03-014 |
| 3.2 Challenges | Reward for completing a challenge (points, badge) | TC-ST-09-03-015 |
| 3.2 Challenges | Active challenges list | TC-ST-09-03-016 |
| 3.2 Challenges | Challenge deadline shown | TC-ST-09-03-017 |
| 3.2 Challenges | Challenge event logging (started, completed) | TC-ST-09-03-018 |
| 3.2 Challenges | Audit logging of the challenges | TC-ST-09-03-019 |
| 3.2 Challenges | Rule: A challenge has a defined goal, a deadline, and a reward. | TC-ST-09-03-011 |
| 3.2 Challenges | Rule: Challenge progress is tracked toward the goal. | TC-ST-09-03-012 |
| 3.2 Challenges | Rule: A reward is awarded on completion. | TC-ST-09-03-013 |
| 3.2 Challenges | Rule: A challenge expires at its deadline. | TC-ST-09-03-014 |
| 3.2 Challenges | Rule: Challenge events (started, completed) are logged with the challenge and the timestamp. | TC-ST-09-03-015 |
| 3.2 Challenges | Rule: The challenges is audit-logged with the account, the challenge, and the timestamp. | TC-ST-09-03-016 |
| 3.3 Goals and Milestones | Set a personal study goal | TC-ST-09-03-020 |
| 3.3 Goals and Milestones | Goal progress tracking | TC-ST-09-03-021 |
| 3.3 Goals and Milestones | Milestones within a goal | TC-ST-09-03-022 |
| 3.3 Goals and Milestones | Milestone celebration | TC-ST-09-03-023 |
| 3.3 Goals and Milestones | Goal list (active and completed) | TC-ST-09-03-024 |
| 3.3 Goals and Milestones | Goal deadline | TC-ST-09-03-025 |
| 3.3 Goals and Milestones | Goal event logging (set, milestone reached, completed) | TC-ST-09-03-026 |
| 3.3 Goals and Milestones | Audit logging of the goals and milestones | TC-ST-09-03-027 |
| 3.3 Goals and Milestones | Rule: A goal has a defined target and a deadline. | TC-ST-09-03-020 |
| 3.3 Goals and Milestones | Rule: Goal progress is tracked toward the target. | TC-ST-09-03-021 |
| 3.3 Goals and Milestones | Rule: Milestones are celebrated at defined fractions of the goal. | TC-ST-09-03-022 |
| 3.3 Goals and Milestones | Rule: A goal is completed when the target is met by the deadline. | TC-ST-09-03-023 |
| 3.3 Goals and Milestones | Rule: Goal events (set, milestone reached, completed) are logged with the goal and the timestamp. | TC-ST-09-03-024 |
| 3.3 Goals and Milestones | Rule: The goals and milestones is audit-logged with the account, the goal, and the timestamp. | TC-ST-09-03-025 |

## 3.1 Leaderboards

### TC-ST-09-03-001 — Leaderboard by class
**Type:** Positive
**Covers:** 3.1 → Leaderboard by class; Rule: Leaderboards are by class, subject, or overall.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Leaderboard by class.
2. Observe the result and verify the full behavior: Leaderboard by class.
**Expected Result:** Leaderboard by class — delivered exactly as documented.
**Priority:** Critical

### TC-ST-09-03-002 — Leaderboard by subject
**Type:** Positive
**Covers:** 3.1 → Leaderboard by subject; Rule: The Student's rank is highlighted.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Leaderboard by subject.
2. Observe the result and verify the full behavior: Leaderboard by subject.
**Expected Result:** Leaderboard by subject — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-003 — Overall leaderboard
**Type:** Positive
**Covers:** 3.1 → Overall leaderboard; Rule: The period filter changes the ranking window.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Overall leaderboard.
2. Observe the result and verify the full behavior: Overall leaderboard.
**Expected Result:** Overall leaderboard — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-004 — Student's rank highlighted
**Type:** Positive
**Covers:** 3.1 → Student's rank highlighted; Rule: Leaderboards are updated on a schedule, not in real time.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Student's rank highlighted.
2. Observe the result and verify the full behavior: Student's rank highlighted.
**Expected Result:** Student's rank highlighted — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-005 — Top performers listed
**Type:** Positive
**Covers:** 3.1 → Top performers listed; Rule: Leaderboard events (viewed) are logged with the leaderboard and the timestamp.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Top performers listed.
2. Observe the result and verify the full behavior: Top performers listed.
**Expected Result:** Top performers listed — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-006 — Filter by period (week, month, term)
**Type:** Positive
**Covers:** 3.1 → Filter by period (week, month, term); Rule: The leaderboards is audit-logged with the account, the leaderboard, and the timestamp.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Filter by period (week.
2. Observe the result and verify the full behavior: Filter by period (week, month, term).
**Expected Result:** Filter by period (week, month, term) — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-007 — Leaderboard updated on a schedule
**Type:** Positive
**Covers:** 3.1 → Leaderboard updated on a schedule
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Leaderboard updated on a schedule.
2. Observe the result and verify the full behavior: Leaderboard updated on a schedule.
**Expected Result:** Leaderboard updated on a schedule — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-008 — Leaderboard available on web and mobile
**Type:** Positive
**Covers:** 3.1 → Leaderboard available on web and mobile
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Leaderboard available on web and mobile.
2. Observe the result and verify the full behavior: Leaderboard available on web and mobile.
**Expected Result:** Leaderboard available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-009 — Leaderboard event logging (viewed)
**Type:** Positive
**Covers:** 3.1 → Leaderboard event logging (viewed)
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Leaderboard event logging (viewed).
2. Observe the result and verify the full behavior: Leaderboard event logging (viewed).
**Expected Result:** Leaderboard event logging (viewed) — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-010 — Audit logging of the leaderboards
**Type:** Positive
**Covers:** 3.1 → Audit logging of the leaderboards
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, perform the action associated with: Audit logging of the leaderboards.
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

## 3.2 Challenges

### TC-ST-09-03-011 — Daily challenges
**Type:** Positive
**Covers:** 3.2 → Daily challenges; Rule: A challenge has a defined goal, a deadline, and a reward.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Daily challenges.
2. Observe the result and verify the full behavior: Daily challenges.
**Expected Result:** Daily challenges — delivered exactly as documented.
**Priority:** Critical

### TC-ST-09-03-012 — Weekly challenges
**Type:** Positive
**Covers:** 3.2 → Weekly challenges; Rule: Challenge progress is tracked toward the goal.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Weekly challenges.
2. Observe the result and verify the full behavior: Weekly challenges.
**Expected Result:** Weekly challenges — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-013 — Special event challenges
**Type:** Positive
**Covers:** 3.2 → Special event challenges; Rule: A reward is awarded on completion.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Special event challenges.
2. Observe the result and verify the full behavior: Special event challenges.
**Expected Result:** Special event challenges — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-014 — Challenge progress tracking
**Type:** Positive
**Covers:** 3.2 → Challenge progress tracking; Rule: A challenge expires at its deadline.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Challenge progress tracking.
2. Observe the result and verify the full behavior: Challenge progress tracking.
**Expected Result:** Challenge progress tracking — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-015 — Reward for completing a challenge (points, badge)
**Type:** Positive
**Covers:** 3.2 → Reward for completing a challenge (points, badge); Rule: Challenge events (started, completed) are logged with the challenge and the timestamp.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Reward for completing a challenge (points.
2. Observe the result and verify the full behavior: Reward for completing a challenge (points, badge).
**Expected Result:** Reward for completing a challenge (points, badge) — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-016 — Active challenges list
**Type:** Positive
**Covers:** 3.2 → Active challenges list; Rule: The challenges is audit-logged with the account, the challenge, and the timestamp.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Active challenges list.
2. Observe the result and verify the full behavior: Active challenges list.
**Expected Result:** Active challenges list — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-017 — Challenge deadline shown
**Type:** Positive
**Covers:** 3.2 → Challenge deadline shown
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Challenge deadline shown.
2. Observe the result and verify the full behavior: Challenge deadline shown.
**Expected Result:** Challenge deadline shown — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-018 — Challenge event logging (started, completed)
**Type:** Positive
**Covers:** 3.2 → Challenge event logging (started, completed)
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Challenge event logging (started.
2. Observe the result and verify the full behavior: Challenge event logging (started, completed).
**Expected Result:** Challenge event logging (started, completed) — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-019 — Audit logging of the challenges
**Type:** Positive
**Covers:** 3.2 → Audit logging of the challenges
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, perform the action associated with: Audit logging of the challenges.
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

## 3.3 Goals and Milestones

### TC-ST-09-03-020 — Set a personal study goal
**Type:** Positive
**Covers:** 3.3 → Set a personal study goal; Rule: A goal has a defined target and a deadline.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Set a personal study goal.
2. Observe the result and verify the full behavior: Set a personal study goal.
**Expected Result:** Set a personal study goal — delivered exactly as documented.
**Priority:** Critical

### TC-ST-09-03-021 — Goal progress tracking
**Type:** Positive
**Covers:** 3.3 → Goal progress tracking; Rule: Goal progress is tracked toward the target.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Goal progress tracking.
2. Observe the result and verify the full behavior: Goal progress tracking.
**Expected Result:** Goal progress tracking — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-022 — Milestones within a goal
**Type:** Positive
**Covers:** 3.3 → Milestones within a goal; Rule: Milestones are celebrated at defined fractions of the goal.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Milestones within a goal.
2. Observe the result and verify the full behavior: Milestones within a goal.
**Expected Result:** Milestones within a goal — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-023 — Milestone celebration
**Type:** Positive
**Covers:** 3.3 → Milestone celebration; Rule: A goal is completed when the target is met by the deadline.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Milestone celebration.
2. Observe the result and verify the full behavior: Milestone celebration.
**Expected Result:** Milestone celebration — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-024 — Goal list (active and completed)
**Type:** Positive
**Covers:** 3.3 → Goal list (active and completed); Rule: Goal events (set, milestone reached, completed) are logged with the goal and the timestamp.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Goal list (active and completed).
2. Observe the result and verify the full behavior: Goal list (active and completed).
**Expected Result:** Goal list (active and completed) — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-025 — Goal deadline
**Type:** Positive
**Covers:** 3.3 → Goal deadline; Rule: The goals and milestones is audit-logged with the account, the goal, and the timestamp.
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Goal deadline.
2. Observe the result and verify the full behavior: Goal deadline.
**Expected Result:** Goal deadline — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-026 — Goal event logging (set, milestone reached, completed)
**Type:** Positive
**Covers:** 3.3 → Goal event logging (set, milestone reached, completed)
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, set up the precondition and perform: Goal event logging (set.
2. Observe the result and verify the full behavior: Goal event logging (set, milestone reached, completed).
**Expected Result:** Goal event logging (set, milestone reached, completed) — delivered exactly as documented.
**Priority:** High

### TC-ST-09-03-027 — Audit logging of the goals and milestones
**Type:** Positive
**Covers:** 3.3 → Audit logging of the goals and milestones
**Preconditions:** A Student account is active and the Student is in the state required for this behavior.
**Steps:**
1. As a Student, perform the action associated with: Audit logging of the goals and milestones.
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
