# 1. Screen Time & Usage Limits — Test Cases

User Type: **Parent**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: screen_time_usage_limits.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 |
|---------|--------------------|----------|
| 1.1 Daily Screen Time Limits | Set a daily screen time limit (minutes) | TC-PT-5-01-001 |
| 1.1 Daily Screen Time Limits | Child notified as they approach the limit | TC-PT-5-01-002 |
| 1.1 Daily Screen Time Limits | Access paused when the limit is reached | TC-PT-5-01-003 |
| 1.1 Daily Screen Time Limits | Parent can extend the limit | TC-PT-5-01-004 |
| 1.1 Daily Screen Time Limits | Limit reset at the start of each day | TC-PT-5-01-005 |
| 1.1 Daily Screen Time Limits | Limit available on web and mobile | TC-PT-5-01-006 |
| 1.1 Daily Screen Time Limits | Limit event logging (set, extended, reached) | TC-PT-5-01-007 |
| 1.1 Daily Screen Time Limits | Audit logging of the daily screen time limits | TC-PT-5-01-008 |
| 1.1 Daily Screen Time Limits | Rule: The limit is in minutes per day. | TC-PT-5-01-001 |
| 1.1 Daily Screen Time Limits | Rule: The child is notified as they approach the limit. | TC-PT-5-01-002 |
| 1.1 Daily Screen Time Limits | Rule: Access is paused when the limit is reached. | TC-PT-5-01-003 |
| 1.1 Daily Screen Time Limits | Rule: The limit resets at the start of each day. | TC-PT-5-01-004 |
| 1.1 Daily Screen Time Limits | Rule: Limit events (set, extended, reached) are logged with the account and the timestamp. | TC-PT-5-01-005 |
| 1.1 Daily Screen Time Limits | Rule: The daily screen time limits is audit-logged with the account and the timestamp. | TC-PT-5-01-006 |
| 1.2 Time-of-Day Restrictions | Set allowed time windows | TC-PT-5-01-009 |
| 1.2 Time-of-Day Restrictions | Set blocked time windows | TC-PT-5-01-010 |
| 1.2 Time-of-Day Restrictions | Access restricted outside allowed windows | TC-PT-5-01-011 |
| 1.2 Time-of-Day Restrictions | Restriction schedule (daily, weekdays, weekends) | TC-PT-5-01-012 |
| 1.2 Time-of-Day Restrictions | Restriction status shown to the child | TC-PT-5-01-013 |
| 1.2 Time-of-Day Restrictions | Restrictions available on web and mobile | TC-PT-5-01-014 |
| 1.2 Time-of-Day Restrictions | Restriction event logging (set, applied) | TC-PT-5-01-015 |
| 1.2 Time-of-Day Restrictions | Audit logging of the time-of-day restrictions | TC-PT-5-01-016 |
| 1.2 Time-of-Day Restrictions | Rule: The restrictions are time windows. | TC-PT-5-01-009 |
| 1.2 Time-of-Day Restrictions | Rule: Access is restricted outside the allowed windows. | TC-PT-5-01-010 |
| 1.2 Time-of-Day Restrictions | Rule: The restriction schedule is daily, weekdays, or weekends. | TC-PT-5-01-011 |
| 1.2 Time-of-Day Restrictions | Rule: Restriction events (set, applied) are logged with the account and the timestamp. | TC-PT-5-01-012 |
| 1.2 Time-of-Day Restrictions | Rule: The time-of-day restrictions is audit-logged with the account and the timestamp. | TC-PT-5-01-013 |
| 1.3 Usage Alerts | Alert when usage approaches the limit | TC-PT-5-01-017 |
| 1.3 Usage Alerts | Alert when usage exceeds the limit | TC-PT-5-01-018 |
| 1.3 Usage Alerts | In-app and email alert channels | TC-PT-5-01-019 |
| 1.3 Usage Alerts | Alert with usage details | TC-PT-5-01-020 |
| 1.3 Usage Alerts | Alert frequency control | TC-PT-5-01-021 |
| 1.3 Usage Alerts | Alert event logging (sent, opened) | TC-PT-5-01-022 |
| 1.3 Usage Alerts | Audit logging of the usage alerts | TC-PT-5-01-023 |
| 1.3 Usage Alerts | Rule: Alerts are sent when usage approaches or exceeds the limit. | TC-PT-5-01-017 |
| 1.3 Usage Alerts | Rule: The alert channels are in-app and email. | TC-PT-5-01-018 |
| 1.3 Usage Alerts | Rule: The alert frequency is controllable. | TC-PT-5-01-019 |
| 1.3 Usage Alerts | Rule: Alert events (sent, opened) are logged with the account and the timestamp. | TC-PT-5-01-020 |
| 1.3 Usage Alerts | Rule: The usage alerts is audit-logged with the account and the timestamp. | TC-PT-5-01-021 |

## 1.1 Daily Screen Time Limits

### TC-PT-5-01-001 — Set a daily screen time limit (minutes)
**Type:** Edge
**Covers:** 1.1 → Set a daily screen time limit (minutes); Rule: The limit is in minutes per day.
**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 daily screen time limit (minutes).
2. Observe the result and verify the full behavior: Set a daily screen time limit (minutes).
**Expected Result:** Set a daily screen time limit (minutes) — delivered exactly as documented.
**Priority:** Critical

### TC-PT-5-01-002 — Child notified as they approach the limit
**Type:** Edge
**Covers:** 1.1 → Child notified as they approach the limit; Rule: The child is notified as they approach the limit.
**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 notified as they approach the limit.
2. Observe the result and verify the full behavior: Child notified as they approach the limit.
**Expected Result:** Child notified as they approach the limit — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-003 — Access paused when the limit is reached
**Type:** Edge
**Covers:** 1.1 → Access paused when the limit is reached; Rule: Access is paused when the limit is reached.
**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: Access paused when the limit is reached.
2. Observe the result and verify the full behavior: Access paused when the limit is reached.
**Expected Result:** Access paused when the limit is reached — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-004 — Parent can extend the limit
**Type:** Edge
**Covers:** 1.1 → Parent can extend the limit; Rule: The limit resets at the start of each day.
**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: Parent can extend the limit.
2. Observe the result and verify the full behavior: Parent can extend the limit.
**Expected Result:** Parent can extend the limit — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-005 — Limit reset at the start of each day
**Type:** Edge
**Covers:** 1.1 → Limit reset at the start of each day; Rule: Limit events (set, extended, reached) 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: Limit reset at the start of each day.
2. Observe the result and verify the full behavior: Limit reset at the start of each day.
**Expected Result:** Limit reset at the start of each day — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-006 — Limit available on web and mobile
**Type:** Edge
**Covers:** 1.1 → Limit available on web and mobile; Rule: The daily screen time limits 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: Limit available on web and mobile.
2. Observe the result and verify the full behavior: Limit available on web and mobile.
**Expected Result:** Limit available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-007 — Limit event logging (set, extended, reached)
**Type:** Edge
**Covers:** 1.1 → Limit event logging (set, extended, reached)
**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: Limit event logging (set.
2. Observe the result and verify the full behavior: Limit event logging (set, extended, reached).
**Expected Result:** Limit event logging (set, extended, reached) — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-008 — Audit logging of the daily screen time limits
**Type:** Edge
**Covers:** 1.1 → Audit logging of the daily screen time limits
**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 daily screen time limits.
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

## 1.2 Time-of-Day Restrictions

### TC-PT-5-01-009 — Set allowed time windows
**Type:** Positive
**Covers:** 1.2 → Set allowed time windows; Rule: The restrictions are time windows.
**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 allowed time windows.
2. Observe the result and verify the full behavior: Set allowed time windows.
**Expected Result:** Set allowed time windows — delivered exactly as documented.
**Priority:** Critical

### TC-PT-5-01-010 — Set blocked time windows
**Type:** Edge
**Covers:** 1.2 → Set blocked time windows; Rule: Access is restricted outside the allowed windows.
**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 blocked time windows.
2. Observe the result and verify the full behavior: Set blocked time windows.
**Expected Result:** Set blocked time windows — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-011 — Access restricted outside allowed windows
**Type:** Positive
**Covers:** 1.2 → Access restricted outside allowed windows; Rule: The restriction schedule is daily, weekdays, or weekends.
**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: Access restricted outside allowed windows.
2. Observe the result and verify the full behavior: Access restricted outside allowed windows.
**Expected Result:** Access restricted outside allowed windows — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-012 — Restriction schedule (daily, weekdays, weekends)
**Type:** Positive
**Covers:** 1.2 → Restriction schedule (daily, weekdays, weekends); Rule: Restriction events (set, applied) 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: Restriction schedule (daily.
2. Observe the result and verify the full behavior: Restriction schedule (daily, weekdays, weekends).
**Expected Result:** Restriction schedule (daily, weekdays, weekends) — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-013 — Restriction status shown to the child
**Type:** Positive
**Covers:** 1.2 → Restriction status shown to the child; Rule: The time-of-day restrictions 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: Restriction status shown to the child.
2. Observe the result and verify the full behavior: Restriction status shown to the child.
**Expected Result:** Restriction status shown to the child — delivered exactly as documented.
**Priority:** High

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

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

### TC-PT-5-01-016 — Audit logging of the time-of-day restrictions
**Type:** Positive
**Covers:** 1.2 → Audit logging of the time-of-day restrictions
**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 time-of-day restrictions.
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

## 1.3 Usage Alerts

### TC-PT-5-01-017 — Alert when usage approaches the limit
**Type:** Edge
**Covers:** 1.3 → Alert when usage approaches the limit; Rule: Alerts are sent when usage approaches or exceeds the limit.
**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 when usage approaches the limit.
2. Observe the result and verify the full behavior: Alert when usage approaches the limit.
**Expected Result:** Alert when usage approaches the limit — delivered exactly as documented.
**Priority:** Critical

### TC-PT-5-01-018 — Alert when usage exceeds the limit
**Type:** Edge
**Covers:** 1.3 → Alert when usage exceeds the limit; Rule: The alert channels are in-app and email.
**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 when usage exceeds the limit.
2. Observe the result and verify the full behavior: Alert when usage exceeds the limit.
**Expected Result:** Alert when usage exceeds the limit — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-019 — In-app and email alert channels
**Type:** Positive
**Covers:** 1.3 → In-app and email alert channels; Rule: The alert frequency is controllable.
**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: In-app and email alert channels.
2. Observe the result and verify the full behavior: In-app and email alert channels.
**Expected Result:** In-app and email alert channels — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-020 — Alert with usage details
**Type:** Positive
**Covers:** 1.3 → Alert with usage details; Rule: Alert events (sent, opened) 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: Alert with usage details.
2. Observe the result and verify the full behavior: Alert with usage details.
**Expected Result:** Alert with usage details — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-021 — Alert frequency control
**Type:** Positive
**Covers:** 1.3 → Alert frequency control; Rule: The usage alerts 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: Alert frequency control.
2. Observe the result and verify the full behavior: Alert frequency control.
**Expected Result:** Alert frequency control — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-022 — Alert event logging (sent, opened)
**Type:** Positive
**Covers:** 1.3 → Alert event logging (sent, opened)
**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 event logging (sent.
2. Observe the result and verify the full behavior: Alert event logging (sent, opened).
**Expected Result:** Alert event logging (sent, opened) — delivered exactly as documented.
**Priority:** High

### TC-PT-5-01-023 — Audit logging of the usage alerts
**Type:** Positive
**Covers:** 1.3 → Audit logging of the usage alerts
**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 usage alerts.
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
