# 4. Alert Preferences & History — Test Cases

User Type: **Parent**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: alert_preferences_history.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 Alert Type Preferences | Enable or disable alert types | TC-PT-7-04-001 |
| 4.1 Alert Type Preferences | Performance, missed session, engagement, account, billing alerts | TC-PT-7-04-002 |
| 4.1 Alert Type Preferences | Per-alert-type toggle | TC-PT-7-04-003 |
| 4.1 Alert Type Preferences | Default alert type set | TC-PT-7-04-004 |
| 4.1 Alert Type Preferences | Preference change confirmation | TC-PT-7-04-005 |
| 4.1 Alert Type Preferences | Preferences available on web and mobile | TC-PT-7-04-006 |
| 4.1 Alert Type Preferences | Preference event logging (set, changed) | TC-PT-7-04-007 |
| 4.1 Alert Type Preferences | Audit logging of the alert type preferences | TC-PT-7-04-008 |
| 4.1 Alert Type Preferences | Rule: The alert types are independently toggleable. | TC-PT-7-04-001 |
| 4.1 Alert Type Preferences | Rule: A default alert type set is applied. | TC-PT-7-04-002 |
| 4.1 Alert Type Preferences | Rule: A preference change confirmation is shown. | TC-PT-7-04-003 |
| 4.1 Alert Type Preferences | Rule: Preference events (set, changed) are logged with the account and the timestamp. | TC-PT-7-04-004 |
| 4.1 Alert Type Preferences | Rule: The alert type preferences is audit-logged with the account and the timestamp. | TC-PT-7-04-005 |
| 4.2 Alert Channel and Timing Preferences | Alert channels (in-app, email, push, SMS) | TC-PT-7-04-009 |
| 4.2 Alert Channel and Timing Preferences | Quiet hours for non-critical alerts | TC-PT-7-04-010 |
| 4.2 Alert Channel and Timing Preferences | Critical alerts always delivered | TC-PT-7-04-011 |
| 4.2 Alert Channel and Timing Preferences | Per-channel toggle | TC-PT-7-04-012 |
| 4.2 Alert Channel and Timing Preferences | Timing preference confirmation | TC-PT-7-04-013 |
| 4.2 Alert Channel and Timing Preferences | Preferences available on web and mobile | TC-PT-7-04-014 |
| 4.2 Alert Channel and Timing Preferences | Preference event logging (set, changed) | TC-PT-7-04-015 |
| 4.2 Alert Channel and Timing Preferences | Audit logging of the alert channel and timing preferences | TC-PT-7-04-016 |
| 4.2 Alert Channel and Timing Preferences | Rule: The alert channels are in-app, email, push, and SMS. | TC-PT-7-04-009 |
| 4.2 Alert Channel and Timing Preferences | Rule: Quiet hours suppress non-critical alerts. | TC-PT-7-04-010 |
| 4.2 Alert Channel and Timing Preferences | Rule: Critical alerts are always delivered. | TC-PT-7-04-011 |
| 4.2 Alert Channel and Timing Preferences | Rule: Preference events (set, changed) are logged with the account and the timestamp. | TC-PT-7-04-012 |
| 4.2 Alert Channel and Timing Preferences | Rule: The alert channel and timing preferences is audit-logged with the account and the timestamp. | TC-PT-7-04-013 |
| 4.3 Alert History | History of sent alerts | TC-PT-7-04-017 |
| 4.3 Alert History | Alert type, time, and status | TC-PT-7-04-018 |
| 4.3 Alert History | Filter the history by alert type | TC-PT-7-04-019 |
| 4.3 Alert History | Viewed and acted-on status | TC-PT-7-04-020 |
| 4.3 Alert History | History retained for a platform-defined period | TC-PT-7-04-021 |
| 4.3 Alert History | History available on web and mobile | TC-PT-7-04-022 |
| 4.3 Alert History | History event logging (viewed, filtered) | TC-PT-7-04-023 |
| 4.3 Alert History | Audit logging of the alert history | TC-PT-7-04-024 |
| 4.3 Alert History | Rule: The history lists sent alerts with type, time, and status. | TC-PT-7-04-017 |
| 4.3 Alert History | Rule: The history can be filtered by alert type. | TC-PT-7-04-018 |
| 4.3 Alert History | Rule: The history is retained for the platform-defined period. | TC-PT-7-04-019 |
| 4.3 Alert History | Rule: History events (viewed, filtered) are logged with the account and the timestamp. | TC-PT-7-04-020 |
| 4.3 Alert History | Rule: The alert history is audit-logged with the account and the timestamp. | TC-PT-7-04-021 |

## 4.1 Alert Type Preferences

### TC-PT-7-04-001 — Enable or disable alert types
**Type:** Positive
**Covers:** 4.1 → Enable or disable alert types; Rule: The alert types are independently toggleable.
**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: Enable or disable alert types.
2. Observe the result and verify the full behavior: Enable or disable alert types.
**Expected Result:** Enable or disable alert types — delivered exactly as documented.
**Priority:** Critical

### TC-PT-7-04-002 — Performance, missed session, engagement, account, billing alerts
**Type:** Positive
**Covers:** 4.1 → Performance, missed session, engagement, account, billing alerts; Rule: A default alert type set is applied.
**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: Performance.
2. Observe the result and verify the full behavior: Performance, missed session, engagement, account, billing alerts.
**Expected Result:** Performance, missed session, engagement, account, billing alerts — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-003 — Per-alert-type toggle
**Type:** Positive
**Covers:** 4.1 → Per-alert-type toggle; Rule: A preference change confirmation is shown.
**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: Per-alert-type toggle.
2. Observe the result and verify the full behavior: Per-alert-type toggle.
**Expected Result:** Per-alert-type toggle — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-004 — Default alert type set
**Type:** Positive
**Covers:** 4.1 → Default alert type set; Rule: Preference events (set, changed) 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: Default alert type set.
2. Observe the result and verify the full behavior: Default alert type set.
**Expected Result:** Default alert type set — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-005 — Preference change confirmation
**Type:** Positive
**Covers:** 4.1 → Preference change confirmation; Rule: The alert type preferences 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: Preference change confirmation.
2. Observe the result and verify the full behavior: Preference change confirmation.
**Expected Result:** Preference change confirmation — delivered exactly as documented.
**Priority:** High

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

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

### TC-PT-7-04-008 — Audit logging of the alert type preferences
**Type:** Positive
**Covers:** 4.1 → Audit logging of the alert type preferences
**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 alert type preferences.
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 Alert Channel and Timing Preferences

### TC-PT-7-04-009 — Alert channels (in-app, email, push, SMS)
**Type:** Positive
**Covers:** 4.2 → Alert channels (in-app, email, push, SMS); Rule: The alert channels are in-app, email, push, and SMS.
**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: Alert channels (in-app.
2. Observe the result and verify the full behavior: Alert channels (in-app, email, push, SMS).
**Expected Result:** Alert channels (in-app, email, push, SMS) — delivered exactly as documented.
**Priority:** Critical

### TC-PT-7-04-010 — Quiet hours for non-critical alerts
**Type:** Positive
**Covers:** 4.2 → Quiet hours for non-critical alerts; Rule: Quiet hours suppress non-critical alerts.
**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: Quiet hours for non-critical alerts.
2. Observe the result and verify the full behavior: Quiet hours for non-critical alerts.
**Expected Result:** Quiet hours for non-critical alerts — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-011 — Critical alerts always delivered
**Type:** Positive
**Covers:** 4.2 → Critical alerts always delivered; Rule: Critical alerts are always delivered.
**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: Critical alerts always delivered.
2. Observe the result and verify the full behavior: Critical alerts always delivered.
**Expected Result:** Critical alerts always delivered — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-012 — Per-channel toggle
**Type:** Positive
**Covers:** 4.2 → Per-channel toggle; Rule: Preference events (set, changed) 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: Per-channel toggle.
2. Observe the result and verify the full behavior: Per-channel toggle.
**Expected Result:** Per-channel toggle — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-013 — Timing preference confirmation
**Type:** Positive
**Covers:** 4.2 → Timing preference confirmation; Rule: The alert channel and timing preferences 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: Timing preference confirmation.
2. Observe the result and verify the full behavior: Timing preference confirmation.
**Expected Result:** Timing preference confirmation — delivered exactly as documented.
**Priority:** High

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

### TC-PT-7-04-015 — Preference event logging (set, changed)
**Type:** Positive
**Covers:** 4.2 → Preference event logging (set, changed)
**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: Preference event logging (set.
2. Observe the result and verify the full behavior: Preference event logging (set, changed).
**Expected Result:** Preference event logging (set, changed) — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-016 — Audit logging of the alert channel and timing preferences
**Type:** Positive
**Covers:** 4.2 → Audit logging of the alert channel and timing preferences
**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 alert channel and timing preferences.
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 Alert History

### TC-PT-7-04-017 — History of sent alerts
**Type:** Positive
**Covers:** 4.3 → History of sent alerts; Rule: The history lists sent alerts with type, time, and status.
**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: History of sent alerts.
2. Observe the result and verify the full behavior: History of sent alerts.
**Expected Result:** History of sent alerts — delivered exactly as documented.
**Priority:** Critical

### TC-PT-7-04-018 — Alert type, time, and status
**Type:** Positive
**Covers:** 4.3 → Alert type, time, and status; Rule: The history can be filtered by alert type.
**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: Alert type.
2. Observe the result and verify the full behavior: Alert type, time, and status.
**Expected Result:** Alert type, time, and status — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-019 — Filter the history by alert type
**Type:** Positive
**Covers:** 4.3 → Filter the history by alert type; Rule: The history is retained for the platform-defined period.
**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: Filter the history by alert type.
2. Observe the result and verify the full behavior: Filter the history by alert type.
**Expected Result:** Filter the history by alert type — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-020 — Viewed and acted-on status
**Type:** Positive
**Covers:** 4.3 → Viewed and acted-on status; Rule: History events (viewed, filtered) 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: Viewed and acted-on status.
2. Observe the result and verify the full behavior: Viewed and acted-on status.
**Expected Result:** Viewed and acted-on status — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-021 — History retained for a platform-defined period
**Type:** Positive
**Covers:** 4.3 → History retained for a platform-defined period; Rule: The alert history 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: History retained for a platform-defined period.
2. Observe the result and verify the full behavior: History retained for a platform-defined period.
**Expected Result:** History retained for a platform-defined period — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-022 — History available on web and mobile
**Type:** Positive
**Covers:** 4.3 → History 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: 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-PT-7-04-023 — History event logging (viewed, filtered)
**Type:** Positive
**Covers:** 4.3 → History event logging (viewed, filtered)
**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: History event logging (viewed.
2. Observe the result and verify the full behavior: History event logging (viewed, filtered).
**Expected Result:** History event logging (viewed, filtered) — delivered exactly as documented.
**Priority:** High

### TC-PT-7-04-024 — Audit logging of the alert history
**Type:** Positive
**Covers:** 4.3 → Audit logging of the alert history
**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 alert history.
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
