# 1. Linking Child Accounts — Test Cases

User Type: **Parent**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: linking_child_accounts.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 Send a Link Request | Send a link request by the child's email or account ID | TC-PT-2-01-001 |
| 1.1 Send a Link Request | Link invitation sent to the child | TC-PT-2-01-002 |
| 1.1 Send a Link Request | Request status (pending, accepted, declined, expired) | TC-PT-2-01-003 |
| 1.1 Send a Link Request | Multiple link requests can be sent | TC-PT-2-01-004 |
| 1.1 Send a Link Request | Resend a pending request | TC-PT-2-01-005 |
| 1.1 Send a Link Request | Request expiry | TC-PT-2-01-006 |
| 1.1 Send a Link Request | Link request event logging (sent, resent) | TC-PT-2-01-007 |
| 1.1 Send a Link Request | Audit logging of the send a link request | TC-PT-2-01-008 |
| 1.1 Send a Link Request | Rule: The link request is sent to the child's registered email or account ID. | TC-PT-2-01-001 |
| 1.1 Send a Link Request | Rule: The request is pending until accepted. | TC-PT-2-01-002 |
| 1.1 Send a Link Request | Rule: A pending request can be resent. | TC-PT-2-01-003 |
| 1.1 Send a Link Request | Rule: The request expires after the platform's window. | TC-PT-2-01-004 |
| 1.1 Send a Link Request | Rule: Link request events (sent, resent) are logged with the account and the timestamp. | TC-PT-2-01-005 |
| 1.1 Send a Link Request | Rule: The send a link request is audit-logged with the account and the timestamp. | TC-PT-2-01-006 |
| 1.2 Child Accepts the Link | Child accepts the link invitation | TC-PT-2-01-009 |
| 1.2 Child Accepts the Link | Child's account linked to the Parent's | TC-PT-2-01-010 |
| 1.2 Child Accepts the Link | Parent notified of the acceptance | TC-PT-2-01-011 |
| 1.2 Child Accepts the Link | Link effective immediately on acceptance | TC-PT-2-01-012 |
| 1.2 Child Accepts the Link | Child can decline the invitation | TC-PT-2-01-013 |
| 1.2 Child Accepts the Link | Link event logging (accepted, declined) | TC-PT-2-01-014 |
| 1.2 Child Accepts the Link | Audit logging of the child accepts the link | TC-PT-2-01-015 |
| 1.2 Child Accepts the Link | Rule: The link is effective immediately on acceptance. | TC-PT-2-01-009 |
| 1.2 Child Accepts the Link | Rule: The Parent is notified of the acceptance or decline. | TC-PT-2-01-010 |
| 1.2 Child Accepts the Link | Rule: The child can decline the invitation. | TC-PT-2-01-011 |
| 1.2 Child Accepts the Link | Rule: Link events (accepted, declined) are logged with the account and the timestamp. | TC-PT-2-01-012 |
| 1.2 Child Accepts the Link | Rule: The child accepts the link is audit-logged with the account and the timestamp. | TC-PT-2-01-013 |
| 1.3 Link Multiple Children | Link multiple children's accounts | TC-PT-2-01-016 |
| 1.3 Link Multiple Children | List of all linked children | TC-PT-2-01-017 |
| 1.3 Link Multiple Children | Switch between linked children | TC-PT-2-01-018 |
| 1.3 Link Multiple Children | Each child has their own dashboard | TC-PT-2-01-019 |
| 1.3 Link Multiple Children | Maximum linked children limit | TC-PT-2-01-020 |
| 1.3 Link Multiple Children | Link event logging (child linked) | TC-PT-2-01-021 |
| 1.3 Link Multiple Children | Audit logging of the link multiple children | TC-PT-2-01-022 |
| 1.3 Link Multiple Children | Rule: Multiple children can be linked to one Parent account. | TC-PT-2-01-016 |
| 1.3 Link Multiple Children | Rule: Each child has their own dashboard. | TC-PT-2-01-017 |
| 1.3 Link Multiple Children | Rule: A maximum linked children limit is enforced. | TC-PT-2-01-018 |
| 1.3 Link Multiple Children | Rule: Link events (child linked) are logged with the account and the timestamp. | TC-PT-2-01-019 |
| 1.3 Link Multiple Children | Rule: The link multiple children is audit-logged with the account and the timestamp. | TC-PT-2-01-020 |

## 1.1 Send a Link Request

### TC-PT-2-01-001 — Send a link request by the child's email or account ID
**Type:** Positive
**Covers:** 1.1 → Send a link request by the child's email or account ID; Rule: The link request is sent to the child's registered email or account ID.
**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: Send a link request by the child's email or account ID.
2. Observe the result and verify the full behavior: Send a link request by the child's email or account ID.
**Expected Result:** Send a link request by the child's email or account ID — delivered exactly as documented.
**Priority:** Critical

### TC-PT-2-01-002 — Link invitation sent to the child
**Type:** Positive
**Covers:** 1.1 → Link invitation sent to the child; Rule: The request is pending until accepted.
**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 invitation sent to the child.
2. Observe the result and verify the full behavior: Link invitation sent to the child.
**Expected Result:** Link invitation sent to the child — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-003 — Request status (pending, accepted, declined, expired)
**Type:** Edge
**Covers:** 1.1 → Request status (pending, accepted, declined, expired); Rule: A pending request can be resent.
**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: Request status (pending.
2. Observe the result and verify the full behavior: Request status (pending, accepted, declined, expired).
**Expected Result:** Request status (pending, accepted, declined, expired) — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-004 — Multiple link requests can be sent
**Type:** Positive
**Covers:** 1.1 → Multiple link requests can be sent; Rule: The request expires after the platform's window.
**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: Multiple link requests can be sent.
2. Observe the result and verify the full behavior: Multiple link requests can be sent.
**Expected Result:** Multiple link requests can be sent — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-005 — Resend a pending request
**Type:** Positive
**Covers:** 1.1 → Resend a pending request; Rule: Link request events (sent, resent) 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: Resend a pending request.
2. Observe the result and verify the full behavior: Resend a pending request.
**Expected Result:** Resend a pending request — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-006 — Request expiry
**Type:** Edge
**Covers:** 1.1 → Request expiry; Rule: The send a link request 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: Request expiry.
2. Observe the result and verify the full behavior: Request expiry.
**Expected Result:** Request expiry — delivered exactly as documented.
**Priority:** High

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

### TC-PT-2-01-008 — Audit logging of the send a link request
**Type:** Positive
**Covers:** 1.1 → Audit logging of the send a link request
**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 send a link request.
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 Child Accepts the Link

### TC-PT-2-01-009 — Child accepts the link invitation
**Type:** Positive
**Covers:** 1.2 → Child accepts the link invitation; Rule: The link is effective immediately on acceptance.
**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 accepts the link invitation.
2. Observe the result and verify the full behavior: Child accepts the link invitation.
**Expected Result:** Child accepts the link invitation — delivered exactly as documented.
**Priority:** Critical

### TC-PT-2-01-010 — Child's account linked to the Parent's
**Type:** Positive
**Covers:** 1.2 → Child's account linked to the Parent's; Rule: The Parent is notified of the acceptance or decline.
**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's account linked to the Parent's.
2. Observe the result and verify the full behavior: Child's account linked to the Parent's.
**Expected Result:** Child's account linked to the Parent's — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-011 — Parent notified of the acceptance
**Type:** Positive
**Covers:** 1.2 → Parent notified of the acceptance; Rule: The child can decline the invitation.
**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 notified of the acceptance.
2. Observe the result and verify the full behavior: Parent notified of the acceptance.
**Expected Result:** Parent notified of the acceptance — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-012 — Link effective immediately on acceptance
**Type:** Positive
**Covers:** 1.2 → Link effective immediately on acceptance; Rule: Link events (accepted, declined) 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: Link effective immediately on acceptance.
2. Observe the result and verify the full behavior: Link effective immediately on acceptance.
**Expected Result:** Link effective immediately on acceptance — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-013 — Child can decline the invitation
**Type:** Positive
**Covers:** 1.2 → Child can decline the invitation; Rule: The child accepts the link 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: Child can decline the invitation.
2. Observe the result and verify the full behavior: Child can decline the invitation.
**Expected Result:** Child can decline the invitation — delivered exactly as documented.
**Priority:** High

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

### TC-PT-2-01-015 — Audit logging of the child accepts the link
**Type:** Positive
**Covers:** 1.2 → Audit logging of the child accepts the link
**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 child accepts the link.
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 Link Multiple Children

### TC-PT-2-01-016 — Link multiple children's accounts
**Type:** Positive
**Covers:** 1.3 → Link multiple children's accounts; Rule: Multiple children can be linked to one Parent account.
**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 multiple children's accounts.
2. Observe the result and verify the full behavior: Link multiple children's accounts.
**Expected Result:** Link multiple children's accounts — delivered exactly as documented.
**Priority:** Critical

### TC-PT-2-01-017 — List of all linked children
**Type:** Positive
**Covers:** 1.3 → List of all linked children; Rule: Each child has their own dashboard.
**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: List of all linked children.
2. Observe the result and verify the full behavior: List of all linked children.
**Expected Result:** List of all linked children — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-018 — Switch between linked children
**Type:** Positive
**Covers:** 1.3 → Switch between linked children; Rule: A maximum linked children limit is enforced.
**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: Switch between linked children.
2. Observe the result and verify the full behavior: Switch between linked children.
**Expected Result:** Switch between linked children — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-019 — Each child has their own dashboard
**Type:** Positive
**Covers:** 1.3 → Each child has their own dashboard; Rule: Link events (child linked) 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: Each child has their own dashboard.
2. Observe the result and verify the full behavior: Each child has their own dashboard.
**Expected Result:** Each child has their own dashboard — delivered exactly as documented.
**Priority:** High

### TC-PT-2-01-020 — Maximum linked children limit
**Type:** Edge
**Covers:** 1.3 → Maximum linked children limit; Rule: The link multiple children 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: Maximum linked children limit.
2. Observe the result and verify the full behavior: Maximum linked children limit.
**Expected Result:** Maximum linked children limit — delivered exactly as documented.
**Priority:** High

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

### TC-PT-2-01-022 — Audit logging of the link multiple children
**Type:** Positive
**Covers:** 1.3 → Audit logging of the link multiple children
**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 link multiple children.
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
