# 1. Messaging with Teachers — Test Cases

User Type: **Parent**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: messaging_with_teachers.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 Message to a Teacher | Send a message to the child's teacher | TC-PT-6-01-001 |
| 1.1 Send a Message to a Teacher | Select the teacher to message | TC-PT-6-01-002 |
| 1.1 Send a Message to a Teacher | Message with text | TC-PT-6-01-003 |
| 1.1 Send a Message to a Teacher | Message delivery confirmation | TC-PT-6-01-004 |
| 1.1 Send a Message to a Teacher | Message thread with the teacher | TC-PT-6-01-005 |
| 1.1 Send a Message to a Teacher | Messaging available on web and mobile | TC-PT-6-01-006 |
| 1.1 Send a Message to a Teacher | Message event logging (sent, delivered) | TC-PT-6-01-007 |
| 1.1 Send a Message to a Teacher | Audit logging of the send a message to a teacher | TC-PT-6-01-008 |
| 1.1 Send a Message to a Teacher | Rule: The message is sent to the child's teacher. | TC-PT-6-01-001 |
| 1.1 Send a Message to a Teacher | Rule: A delivery confirmation is shown. | TC-PT-6-01-002 |
| 1.1 Send a Message to a Teacher | Rule: The message thread is retained. | TC-PT-6-01-003 |
| 1.1 Send a Message to a Teacher | Rule: Message events (sent, delivered) are logged with the account and the timestamp. | TC-PT-6-01-004 |
| 1.1 Send a Message to a Teacher | Rule: The send a message to a teacher is audit-logged with the account and the timestamp. | TC-PT-6-01-005 |
| 1.2 Message Threads and History | Message threads with each teacher | TC-PT-6-01-009 |
| 1.2 Message Threads and History | Search within threads | TC-PT-6-01-010 |
| 1.2 Message Threads and History | Full message history | TC-PT-6-01-011 |
| 1.2 Message Threads and History | Unread message indicator | TC-PT-6-01-012 |
| 1.2 Message Threads and History | Thread archived state | TC-PT-6-01-013 |
| 1.2 Message Threads and History | History available on web and mobile | TC-PT-6-01-014 |
| 1.2 Message Threads and History | History event logging (viewed, searched) | TC-PT-6-01-015 |
| 1.2 Message Threads and History | Audit logging of the message threads and history | TC-PT-6-01-016 |
| 1.2 Message Threads and History | Rule: The threads are per teacher. | TC-PT-6-01-009 |
| 1.2 Message Threads and History | Rule: The search is within threads. | TC-PT-6-01-010 |
| 1.2 Message Threads and History | Rule: An unread indicator is shown for new messages. | TC-PT-6-01-011 |
| 1.2 Message Threads and History | Rule: History events (viewed, searched) are logged with the account and the timestamp. | TC-PT-6-01-012 |
| 1.2 Message Threads and History | Rule: The message threads and history is audit-logged with the account and the timestamp. | TC-PT-6-01-013 |
| 1.3 Message Notifications | Notification on a new teacher message | TC-PT-6-01-017 |
| 1.3 Message Notifications | Notification on a teacher reply | TC-PT-6-01-018 |
| 1.3 Message Notifications | In-app, email, and push channels | TC-PT-6-01-019 |
| 1.3 Message Notifications | Notification links to the thread | TC-PT-6-01-020 |
| 1.3 Message Notifications | Notification preferences for teacher messages | TC-PT-6-01-021 |
| 1.3 Message Notifications | Notification event logging (sent, opened) | TC-PT-6-01-022 |
| 1.3 Message Notifications | Audit logging of the message notifications | TC-PT-6-01-023 |
| 1.3 Message Notifications | Rule: Notifications are sent on new teacher messages and replies. | TC-PT-6-01-017 |
| 1.3 Message Notifications | Rule: The notification channels are in-app, email, and push. | TC-PT-6-01-018 |
| 1.3 Message Notifications | Rule: A notification links to the thread. | TC-PT-6-01-019 |
| 1.3 Message Notifications | Rule: Notification events (sent, opened) are logged with the account and the timestamp. | TC-PT-6-01-020 |
| 1.3 Message Notifications | Rule: The message notifications is audit-logged with the account and the timestamp. | TC-PT-6-01-021 |

## 1.1 Send a Message to a Teacher

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

### TC-PT-6-01-002 — Select the teacher to message
**Type:** Positive
**Covers:** 1.1 → Select the teacher to message; Rule: A delivery 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: Select the teacher to message.
2. Observe the result and verify the full behavior: Select the teacher to message.
**Expected Result:** Select the teacher to message — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-003 — Message with text
**Type:** Positive
**Covers:** 1.1 → Message with text; Rule: The message thread is retained.
**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: Message with text.
2. Observe the result and verify the full behavior: Message with text.
**Expected Result:** Message with text — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-004 — Message delivery confirmation
**Type:** Positive
**Covers:** 1.1 → Message delivery confirmation; Rule: Message events (sent, delivered) 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: Message delivery confirmation.
2. Observe the result and verify the full behavior: Message delivery confirmation.
**Expected Result:** Message delivery confirmation — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-005 — Message thread with the teacher
**Type:** Positive
**Covers:** 1.1 → Message thread with the teacher; Rule: The send a message to a teacher 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: Message thread with the teacher.
2. Observe the result and verify the full behavior: Message thread with the teacher.
**Expected Result:** Message thread with the teacher — delivered exactly as documented.
**Priority:** High

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

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

### TC-PT-6-01-008 — Audit logging of the send a message to a teacher
**Type:** Positive
**Covers:** 1.1 → Audit logging of the send a message to a teacher
**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 message to a teacher.
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 Message Threads and History

### TC-PT-6-01-009 — Message threads with each teacher
**Type:** Positive
**Covers:** 1.2 → Message threads with each teacher; Rule: The threads are per teacher.
**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: Message threads with each teacher.
2. Observe the result and verify the full behavior: Message threads with each teacher.
**Expected Result:** Message threads with each teacher — delivered exactly as documented.
**Priority:** Critical

### TC-PT-6-01-010 — Search within threads
**Type:** Positive
**Covers:** 1.2 → Search within threads; Rule: The search is within threads.
**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: Search within threads.
2. Observe the result and verify the full behavior: Search within threads.
**Expected Result:** Search within threads — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-011 — Full message history
**Type:** Positive
**Covers:** 1.2 → Full message history; Rule: An unread indicator is shown for new messages.
**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: Full message history.
2. Observe the result and verify the full behavior: Full message history.
**Expected Result:** Full message history — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-012 — Unread message indicator
**Type:** Positive
**Covers:** 1.2 → Unread message indicator; Rule: History events (viewed, searched) 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: Unread message indicator.
2. Observe the result and verify the full behavior: Unread message indicator.
**Expected Result:** Unread message indicator — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-013 — Thread archived state
**Type:** Positive
**Covers:** 1.2 → Thread archived state; Rule: The message threads and 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: Thread archived state.
2. Observe the result and verify the full behavior: Thread archived state.
**Expected Result:** Thread archived state — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-014 — History available on web and mobile
**Type:** Positive
**Covers:** 1.2 → 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-6-01-015 — History event logging (viewed, searched)
**Type:** Positive
**Covers:** 1.2 → History event logging (viewed, searched)
**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, searched).
**Expected Result:** History event logging (viewed, searched) — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-016 — Audit logging of the message threads and history
**Type:** Positive
**Covers:** 1.2 → Audit logging of the message threads and 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 message threads and 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

## 1.3 Message Notifications

### TC-PT-6-01-017 — Notification on a new teacher message
**Type:** Positive
**Covers:** 1.3 → Notification on a new teacher message; Rule: Notifications are sent on new teacher messages and replies.
**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: Notification on a new teacher message.
2. Observe the result and verify the full behavior: Notification on a new teacher message.
**Expected Result:** Notification on a new teacher message — delivered exactly as documented.
**Priority:** Critical

### TC-PT-6-01-018 — Notification on a teacher reply
**Type:** Positive
**Covers:** 1.3 → Notification on a teacher reply; Rule: The notification channels are in-app, email, and push.
**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: Notification on a teacher reply.
2. Observe the result and verify the full behavior: Notification on a teacher reply.
**Expected Result:** Notification on a teacher reply — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-019 — In-app, email, and push channels
**Type:** Positive
**Covers:** 1.3 → In-app, email, and push channels; Rule: A notification links to the thread.
**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.
2. Observe the result and verify the full behavior: In-app, email, and push channels.
**Expected Result:** In-app, email, and push channels — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-020 — Notification links to the thread
**Type:** Positive
**Covers:** 1.3 → Notification links to the thread; Rule: Notification 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: Notification links to the thread.
2. Observe the result and verify the full behavior: Notification links to the thread.
**Expected Result:** Notification links to the thread — delivered exactly as documented.
**Priority:** High

### TC-PT-6-01-021 — Notification preferences for teacher messages
**Type:** Positive
**Covers:** 1.3 → Notification preferences for teacher messages; Rule: The message notifications 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: Notification preferences for teacher messages.
2. Observe the result and verify the full behavior: Notification preferences for teacher messages.
**Expected Result:** Notification preferences for teacher messages — delivered exactly as documented.
**Priority:** High

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

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