# 1. AI Chat Assistant — Test Cases

User Type: **Student**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: ai_chat_assistant.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 Ask Questions to the AI Assistant | Ask a question to the AI assistant | TC-ST-14-01-001 |
| 1.1 Ask Questions to the AI Assistant | Answers grounded in the course content | TC-ST-14-01-002 |
| 1.1 Ask Questions to the AI Assistant | Follow-up questions in a conversation | TC-ST-14-01-003 |
| 1.1 Ask Questions to the AI Assistant | Conversation context kept | TC-ST-14-01-004 |
| 1.1 Ask Questions to the AI Assistant | Text and voice input for questions | TC-ST-14-01-005 |
| 1.1 Ask Questions to the AI Assistant | Answer with references to the topic | TC-ST-14-01-006 |
| 1.1 Ask Questions to the AI Assistant | Conversation history | TC-ST-14-01-007 |
| 1.1 Ask Questions to the AI Assistant | Chat event logging (question asked, answer shown) | TC-ST-14-01-008 |
| 1.1 Ask Questions to the AI Assistant | Audit logging of the ask questions to the AI assistant | TC-ST-14-01-009 |
| 1.1 Ask Questions to the AI Assistant | Rule: The assistant answers questions grounded in the course content. | TC-ST-14-01-001 |
| 1.1 Ask Questions to the AI Assistant | Rule: Follow-up questions keep the conversation context. | TC-ST-14-01-002 |
| 1.1 Ask Questions to the AI Assistant | Rule: The answer references the relevant topic. | TC-ST-14-01-003 |
| 1.1 Ask Questions to the AI Assistant | Rule: The conversation history is retained. | TC-ST-14-01-004 |
| 1.1 Ask Questions to the AI Assistant | Rule: Chat events (question asked, answer shown) are logged with the account and the timestamp. | TC-ST-14-01-005 |
| 1.1 Ask Questions to the AI Assistant | Rule: The ask questions to the AI assistant is audit-logged with the account and the timestamp. | TC-ST-14-01-006 |
| 1.2 Context-Aware Study Help | Context-aware help based on the current topic | TC-ST-14-01-010 |
| 1.2 Context-Aware Study Help | Explanations of difficult concepts | TC-ST-14-01-011 |
| 1.2 Context-Aware Study Help | Worked examples on request | TC-ST-14-01-012 |
| 1.2 Context-Aware Study Help | Next-step suggestions | TC-ST-14-01-013 |
| 1.2 Context-Aware Study Help | Help personalized to the Student's level | TC-ST-14-01-014 |
| 1.2 Context-Aware Study Help | Help available on web and mobile | TC-ST-14-01-015 |
| 1.2 Context-Aware Study Help | Help event logging (help requested, shown) | TC-ST-14-01-016 |
| 1.2 Context-Aware Study Help | Audit logging of the context-aware study help | TC-ST-14-01-017 |
| 1.2 Context-Aware Study Help | Rule: The help is based on the Student's current course, topic, and recent activity. | TC-ST-14-01-010 |
| 1.2 Context-Aware Study Help | Rule: The help is personalized to the Student's level. | TC-ST-14-01-011 |
| 1.2 Context-Aware Study Help | Rule: Worked examples are provided on request. | TC-ST-14-01-012 |
| 1.2 Context-Aware Study Help | Rule: Help events (help requested, shown) are logged with the account and the timestamp. | TC-ST-14-01-013 |
| 1.2 Context-Aware Study Help | Rule: The context-aware study help is audit-logged with the account and the timestamp. | TC-ST-14-01-014 |
| 1.3 Doubt Resolution with the Assistant | Describe a doubt to the assistant | TC-ST-14-01-018 |
| 1.3 Doubt Resolution with the Assistant | Step-by-step solution walkthrough | TC-ST-14-01-019 |
| 1.3 Doubt Resolution with the Assistant | Hints before the full solution | TC-ST-14-01-020 |
| 1.3 Doubt Resolution with the Assistant | Escalate an unresolved doubt to a teacher | TC-ST-14-01-021 |
| 1.3 Doubt Resolution with the Assistant | Doubt added to the doubt list | TC-ST-14-01-022 |
| 1.3 Doubt Resolution with the Assistant | Doubt resolution status (resolved, escalated) | TC-ST-14-01-023 |
| 1.3 Doubt Resolution with the Assistant | Doubt event logging (described, resolved, escalated) | TC-ST-14-01-024 |
| 1.3 Doubt Resolution with the Assistant | Audit logging of the doubt resolution with the assistant | TC-ST-14-01-025 |
| 1.3 Doubt Resolution with the Assistant | Rule: A hint is offered before the full solution. | TC-ST-14-01-018 |
| 1.3 Doubt Resolution with the Assistant | Rule: The solution is walked through step by step. | TC-ST-14-01-019 |
| 1.3 Doubt Resolution with the Assistant | Rule: An unresolved doubt can be escalated to a teacher. | TC-ST-14-01-020 |
| 1.3 Doubt Resolution with the Assistant | Rule: The doubt is added to the doubt list. | TC-ST-14-01-021 |
| 1.3 Doubt Resolution with the Assistant | Rule: Doubt events (described, resolved, escalated) are logged with the account and the timestamp. | TC-ST-14-01-022 |
| 1.3 Doubt Resolution with the Assistant | Rule: The doubt resolution with the assistant is audit-logged with the account and the timestamp. | TC-ST-14-01-023 |

## 1.1 Ask Questions to the AI Assistant

### TC-ST-14-01-001 — Ask a question to the AI assistant
**Type:** Positive
**Covers:** 1.1 → Ask a question to the AI assistant; Rule: The assistant answers questions grounded in the course content.
**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: Ask a question to the AI assistant.
2. Observe the result and verify the full behavior: Ask a question to the AI assistant.
**Expected Result:** Ask a question to the AI assistant — delivered exactly as documented.
**Priority:** Critical

### TC-ST-14-01-002 — Answers grounded in the course content
**Type:** Positive
**Covers:** 1.1 → Answers grounded in the course content; Rule: Follow-up questions keep the conversation context.
**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: Answers grounded in the course content.
2. Observe the result and verify the full behavior: Answers grounded in the course content.
**Expected Result:** Answers grounded in the course content — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-003 — Follow-up questions in a conversation
**Type:** Positive
**Covers:** 1.1 → Follow-up questions in a conversation; Rule: The answer references the relevant topic.
**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: Follow-up questions in a conversation.
2. Observe the result and verify the full behavior: Follow-up questions in a conversation.
**Expected Result:** Follow-up questions in a conversation — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-004 — Conversation context kept
**Type:** Positive
**Covers:** 1.1 → Conversation context kept; Rule: The conversation history is retained.
**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: Conversation context kept.
2. Observe the result and verify the full behavior: Conversation context kept.
**Expected Result:** Conversation context kept — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-005 — Text and voice input for questions
**Type:** Positive
**Covers:** 1.1 → Text and voice input for questions; Rule: Chat events (question asked, answer shown) are logged with the account 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: Text and voice input for questions.
2. Observe the result and verify the full behavior: Text and voice input for questions.
**Expected Result:** Text and voice input for questions — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-006 — Answer with references to the topic
**Type:** Positive
**Covers:** 1.1 → Answer with references to the topic; Rule: The ask questions to the AI assistant is audit-logged with the account 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: Answer with references to the topic.
2. Observe the result and verify the full behavior: Answer with references to the topic.
**Expected Result:** Answer with references to the topic — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-007 — Conversation history
**Type:** Positive
**Covers:** 1.1 → Conversation history
**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: Conversation history.
2. Observe the result and verify the full behavior: Conversation history.
**Expected Result:** Conversation history — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-008 — Chat event logging (question asked, answer shown)
**Type:** Positive
**Covers:** 1.1 → Chat event logging (question asked, answer 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: Chat event logging (question asked.
2. Observe the result and verify the full behavior: Chat event logging (question asked, answer shown).
**Expected Result:** Chat event logging (question asked, answer shown) — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-009 — Audit logging of the ask questions to the AI assistant
**Type:** Positive
**Covers:** 1.1 → Audit logging of the ask questions to the AI assistant
**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 ask questions to the AI assistant.
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 Context-Aware Study Help

### TC-ST-14-01-010 — Context-aware help based on the current topic
**Type:** Positive
**Covers:** 1.2 → Context-aware help based on the current topic; Rule: The help is based on the Student's current course, topic, and recent activity.
**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: Context-aware help based on the current topic.
2. Observe the result and verify the full behavior: Context-aware help based on the current topic.
**Expected Result:** Context-aware help based on the current topic — delivered exactly as documented.
**Priority:** Critical

### TC-ST-14-01-011 — Explanations of difficult concepts
**Type:** Positive
**Covers:** 1.2 → Explanations of difficult concepts; Rule: The help is personalized to the Student's level.
**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: Explanations of difficult concepts.
2. Observe the result and verify the full behavior: Explanations of difficult concepts.
**Expected Result:** Explanations of difficult concepts — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-012 — Worked examples on request
**Type:** Positive
**Covers:** 1.2 → Worked examples on request; Rule: Worked examples are provided on request.
**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: Worked examples on request.
2. Observe the result and verify the full behavior: Worked examples on request.
**Expected Result:** Worked examples on request — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-013 — Next-step suggestions
**Type:** Positive
**Covers:** 1.2 → Next-step suggestions; Rule: Help events (help requested, shown) are logged with the account 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: Next-step suggestions.
2. Observe the result and verify the full behavior: Next-step suggestions.
**Expected Result:** Next-step suggestions — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-014 — Help personalized to the Student's level
**Type:** Positive
**Covers:** 1.2 → Help personalized to the Student's level; Rule: The context-aware study help is audit-logged with the account 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: Help personalized to the Student's level.
2. Observe the result and verify the full behavior: Help personalized to the Student's level.
**Expected Result:** Help personalized to the Student's level — delivered exactly as documented.
**Priority:** High

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

### TC-ST-14-01-016 — Help event logging (help requested, shown)
**Type:** Positive
**Covers:** 1.2 → Help event logging (help requested, 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: Help event logging (help requested.
2. Observe the result and verify the full behavior: Help event logging (help requested, shown).
**Expected Result:** Help event logging (help requested, shown) — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-017 — Audit logging of the context-aware study help
**Type:** Positive
**Covers:** 1.2 → Audit logging of the context-aware study help
**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 context-aware study help.
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 Doubt Resolution with the Assistant

### TC-ST-14-01-018 — Describe a doubt to the assistant
**Type:** Positive
**Covers:** 1.3 → Describe a doubt to the assistant; Rule: A hint is offered before the full solution.
**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: Describe a doubt to the assistant.
2. Observe the result and verify the full behavior: Describe a doubt to the assistant.
**Expected Result:** Describe a doubt to the assistant — delivered exactly as documented.
**Priority:** Critical

### TC-ST-14-01-019 — Step-by-step solution walkthrough
**Type:** Positive
**Covers:** 1.3 → Step-by-step solution walkthrough; Rule: The solution is walked through step by step.
**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: Step-by-step solution walkthrough.
2. Observe the result and verify the full behavior: Step-by-step solution walkthrough.
**Expected Result:** Step-by-step solution walkthrough — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-020 — Hints before the full solution
**Type:** Positive
**Covers:** 1.3 → Hints before the full solution; Rule: An unresolved doubt can be escalated to a teacher.
**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: Hints before the full solution.
2. Observe the result and verify the full behavior: Hints before the full solution.
**Expected Result:** Hints before the full solution — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-021 — Escalate an unresolved doubt to a teacher
**Type:** Positive
**Covers:** 1.3 → Escalate an unresolved doubt to a teacher; Rule: The doubt is added to the doubt list.
**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: Escalate an unresolved doubt to a teacher.
2. Observe the result and verify the full behavior: Escalate an unresolved doubt to a teacher.
**Expected Result:** Escalate an unresolved doubt to a teacher — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-022 — Doubt added to the doubt list
**Type:** Positive
**Covers:** 1.3 → Doubt added to the doubt list; Rule: Doubt events (described, resolved, escalated) are logged with the account 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: Doubt added to the doubt list.
2. Observe the result and verify the full behavior: Doubt added to the doubt list.
**Expected Result:** Doubt added to the doubt list — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-023 — Doubt resolution status (resolved, escalated)
**Type:** Positive
**Covers:** 1.3 → Doubt resolution status (resolved, escalated); Rule: The doubt resolution with the assistant is audit-logged with the account 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: Doubt resolution status (resolved.
2. Observe the result and verify the full behavior: Doubt resolution status (resolved, escalated).
**Expected Result:** Doubt resolution status (resolved, escalated) — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-024 — Doubt event logging (described, resolved, escalated)
**Type:** Positive
**Covers:** 1.3 → Doubt event logging (described, resolved, escalated)
**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: Doubt event logging (described.
2. Observe the result and verify the full behavior: Doubt event logging (described, resolved, escalated).
**Expected Result:** Doubt event logging (described, resolved, escalated) — delivered exactly as documented.
**Priority:** High

### TC-ST-14-01-025 — Audit logging of the doubt resolution with the assistant
**Type:** Positive
**Covers:** 1.3 → Audit logging of the doubt resolution with the assistant
**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 doubt resolution with the assistant.
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
