# 2. Live Chat Support — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: live_chat_support.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 |
|---------|--------------------|----------|
| 2.1 Real-time Chat for Urgent Issues | Chat: the chat (the chat, the user, the agent, the message, the date) | TC-SA-21-02-001 |
| 2.1 Real-time Chat for Urgent Issues | User: the user (the user, the name, the chat) | TC-SA-21-02-002 |
| 2.1 Real-time Chat for Urgent Issues | Agent: the agent (the agent, the name, the chat) | TC-SA-21-02-003 |
| 2.1 Real-time Chat for Urgent Issues | Message: the message (the message, the text, the date) | TC-SA-21-02-004 |
| 2.1 Real-time Chat for Urgent Issues | Chat status: the status (the active, the closed) | TC-SA-21-02-005 |
| 2.1 Real-time Chat for Urgent Issues | Chat duration: the duration (the duration of the chat, the time) | TC-SA-21-02-006 |
| 2.1 Real-time Chat for Urgent Issues | Chat view: the view (the chats, the users, the agents, the messages, the dates) | TC-SA-21-02-007 |
| 2.1 Real-time Chat for Urgent Issues | Audit logging of the real-time chat | TC-SA-21-02-008 |
| 2.1 Real-time Chat for Urgent Issues | Rule: the chat is the conversation (the chat, the user, the agent, the message, the date); the chat is the exchange | TC-SA-21-02-001 |
| 2.1 Real-time Chat for Urgent Issues | Rule: the user is the participant (the user, the name, the chat); the user is the side | TC-SA-21-02-002 |
| 2.1 Real-time Chat for Urgent Issues | Rule: the agent is the handler (the agent, the name, the chat); the agent is the support | TC-SA-21-02-003 |
| 2.1 Real-time Chat for Urgent Issues | Rule: the chat status is the state (the active, the closed); the status is the control | TC-SA-21-02-005 |
| 2.1 Real-time Chat for Urgent Issues | Rule: the chat is active (the chats, the users, the agents, the messages, the dates); the conversation is managed | TC-SA-21-02-007 |
| 2.1 Real-time Chat for Urgent Issues | Rule: real-time chat is audit-logged with the chat, user, and timestamp | TC-SA-21-02-008 |
| 2.2 Chatbot for Common Queries | Chatbot: the chatbot (the chatbot, the query, the response, the date) | TC-SA-21-02-009 |
| 2.2 Chatbot for Common Queries | Query: the query (the query, the text, the date) | TC-SA-21-02-010 |
| 2.2 Chatbot for Common Queries | Response: the response (the response, the text, the date) | TC-SA-21-02-011 |
| 2.2 Chatbot for Common Queries | Query count: the count (the count of the queries) | TC-SA-21-02-012 |
| 2.2 Chatbot for Common Queries | Response accuracy: the accuracy (the accuracy of the responses, the percentage) | TC-SA-21-02-013 |
| 2.2 Chatbot for Common Queries | Chatbot status: the status (the active, the inactive) | TC-SA-21-02-014 |
| 2.2 Chatbot for Common Queries | Chatbot view: the view (the chatbots, the queries, the responses, the counts) | TC-SA-21-02-015 |
| 2.2 Chatbot for Common Queries | Audit logging of the chatbot configuration | TC-SA-21-02-016 |
| 2.2 Chatbot for Common Queries | Rule: the chatbot is the automation (the chatbot, the query, the response, the date); the chatbot is the bot | TC-SA-21-02-009 |
| 2.2 Chatbot for Common Queries | Rule: the query is the question (the query, the text, the date); the query is the input | TC-SA-21-02-010 |
| 2.2 Chatbot for Common Queries | Rule: the response is the answer (the response, the text, the date); the response is the output | TC-SA-21-02-011 |
| 2.2 Chatbot for Common Queries | Rule: the response accuracy is the measure (the accuracy of the responses, the percentage); the accuracy is the quality | TC-SA-21-02-013 |
| 2.2 Chatbot for Common Queries | Rule: the chatbot is active (the chatbots, the queries, the responses, the counts); the automation is managed | TC-SA-21-02-015 |
| 2.2 Chatbot for Common Queries | Rule: chatbot configuration is audit-logged with the chatbot, query, and timestamp | TC-SA-21-02-016 |
| 2.3 Human Handoff when Needed | Handoff: the handoff (the handoff, the chat, the agent, the date) | TC-SA-21-02-017 |
| 2.3 Human Handoff when Needed | Chat: the chat (the chat, the user, the agent, the date) | TC-SA-21-02-018 |
| 2.3 Human Handoff when Needed | Agent: the agent (the agent, the name, the handoff) | TC-SA-21-02-019 |
| 2.3 Human Handoff when Needed | Handoff trigger: the trigger (the trigger of the handoff, e.g., the user request, the complexity) | TC-SA-21-02-020 |
| 2.3 Human Handoff when Needed | Handoff status: the status (the handed-off, the resolved) | TC-SA-21-02-021 |
| 2.3 Human Handoff when Needed | Handoff count: the count (the count of the handoffs) | TC-SA-21-02-022 |
| 2.3 Human Handoff when Needed | Handoff view: the view (the handoffs, the chats, the agents, the dates) | TC-SA-21-02-023 |
| 2.3 Human Handoff when Needed | Audit logging of the human handoff | TC-SA-21-02-024 |
| 2.3 Human Handoff when Needed | Rule: the handoff is the transfer (the handoff, the chat, the agent, the date); the handoff is the pass | TC-SA-21-02-017 |
| 2.3 Human Handoff when Needed | Rule: the chat is the conversation (the chat, the user, the agent, the date); the chat is the exchange | TC-SA-21-02-018 |
| 2.3 Human Handoff when Needed | Rule: the agent is the handler (the agent, the name, the handoff); the agent is the support | TC-SA-21-02-019 |
| 2.3 Human Handoff when Needed | Rule: the handoff trigger is the condition (the trigger of the handoff, e.g., the user request, the complexity); the trigger is the rule | TC-SA-21-02-020 |
| 2.3 Human Handoff when Needed | Rule: the chat is handed off (the handoffs, the chats, the agents, the dates); the transfer is managed | TC-SA-21-02-023 |
| 2.3 Human Handoff when Needed | Rule: human handoff is audit-logged with the handoff, agent, and timestamp | TC-SA-21-02-024 |
| 2.4 Chat History and Transcripts | History: the history (the history, the chat, the transcript, the date) | TC-SA-21-02-025 |
| 2.4 Chat History and Transcripts | Chat: the chat (the chat, the user, the agent, the date) | TC-SA-21-02-026 |
| 2.4 Chat History and Transcripts | Transcript: the transcript (the transcript, the text, the date) | TC-SA-21-02-027 |
| 2.4 Chat History and Transcripts | Chat count: the count (the count of the chats) | TC-SA-21-02-028 |
| 2.4 Chat History and Transcripts | Chat period: the period (the period of the chats, e.g., the daily, the weekly, the monthly) | TC-SA-21-02-029 |
| 2.4 Chat History and Transcripts | Chat export: the export (the chats, the format, the period) | TC-SA-21-02-030 |
| 2.4 Chat History and Transcripts | Chat view: the view (the histories, the chats, the transcripts, the dates) | TC-SA-21-02-031 |
| 2.4 Chat History and Transcripts | Audit logging of the chat history storage | TC-SA-21-02-032 |
| 2.4 Chat History and Transcripts | Rule: the history is the record (the history, the chat, the transcript, the date); the history is the memory | TC-SA-21-02-025 |
| 2.4 Chat History and Transcripts | Rule: the chat is the conversation (the chat, the user, the agent, the date); the chat is the exchange | TC-SA-21-02-026 |
| 2.4 Chat History and Transcripts | Rule: the transcript is the record (the transcript, the text, the date); the transcript is the text | TC-SA-21-02-027 |
| 2.4 Chat History and Transcripts | Rule: the chat count is the measure (the count of the chats); the count is the volume | TC-SA-21-02-028 |
| 2.4 Chat History and Transcripts | Rule: the history is stored (the histories, the chats, the transcripts, the dates); the record is managed | TC-SA-21-02-031 |
| 2.4 Chat History and Transcripts | Rule: chat history storage is audit-logged with the history, chat, and timestamp | TC-SA-21-02-032 |

## 2.1 Real-time Chat for Urgent Issues

### TC-SA-21-02-001 — Chat: the chat (the chat, the user, the agent, the message, the date); the chat is the exchange
**Type:** Positive
**Covers:** 2.1 → Chat: the chat (the chat, the user, the agent, the message, the date); Rule: the chat is the conversation (the chat, the user, the agent, the message, the date); the chat is the exchange
**Preconditions:** Super Admin is logged in; a user with an urgent issue is available.
**Steps:**
1. Open Customer Support Management → Live Chat Support → Real-time Chat.
2. Start the chat: the chat (the chat, the user, the agent, the message, the date) — verify the chat is the conversation.
3. Verify the chat shows the user, the agent, the message, and the date.
4. Send a message — verify it appears in real-time for both the user and the agent.
**Expected Result:** The chat is started — the chat, the user, the agent, the message, and the date are the exchange.
**Priority:** Critical

### TC-SA-21-02-002 — User: the user (the user, the name, the chat); the user is the side
**Type:** Positive
**Covers:** 2.1 → User: the user (the user, the name, the chat); Rule: the user is the participant (the user, the name, the chat); the user is the side
**Preconditions:** Multiple users have started chats.
**Steps:**
1. Select the user: the user (the user, the name, the chat) — verify the user is the participant.
2. Verify the user shows the name and the chat.
3. Verify the user's identity matches the account that started the chat.
**Expected Result:** The user is selected — the user, the name, and the chat are the side.
**Priority:** High

### TC-SA-21-02-003 — Agent: the agent (the agent, the name, the chat); the agent is the support
**Type:** Edge
**Covers:** 2.1 → Agent: the agent (the agent, the name, the chat); Rule: the agent is the handler (the agent, the name, the chat); the agent is the support
**Preconditions:** Multiple agents are available; all agents are offline (no-available-agent edge) in a second scenario.
**Steps:**
1. Select the agent: the agent (the agent, the name, the chat) — verify the agent is the handler.
2. Verify the agent shows the name and the chat.
3. Start a chat when all agents are offline — verify the user gets a clear "we'll get back to you" message or queue position (no silent drop, no crash).
**Expected Result:** The agent is selected — the agent, the name, and the chat are the support; chats with no available agent are queued or acknowledged, never silently dropped.
**Priority:** High

### TC-SA-21-02-004 — Message: the message (the message, the text, the date); the message is the content
**Type:** Positive
**Covers:** 2.1 → Message: the message (the message, the text, the date)
**Preconditions:** An active chat exists.
**Steps:**
1. Send the message: the message (the message, the text, the date) — verify the message is the content.
2. Verify the message shows the text and the date.
3. Verify messages appear in chronological order with correct timestamps.
**Expected Result:** The message is sent — the message, the text, and the date are the content.
**Priority:** High

### TC-SA-21-02-005 — Chat status: the status (the active, the closed); the status is the control
**Type:** Positive
**Covers:** 2.1 → Chat status: the status (the active, the closed); Rule: the chat status is the state (the active, the closed); the status is the control
**Preconditions:** Chats with active and closed statuses exist.
**Steps:**
1. View the chat status: the status (the active, the closed) — verify the chat status is the state.
2. Close an active chat — verify the status changes to closed and no further messages can be sent.
3. Verify a closed chat cannot be re-opened as active (a new chat is started instead).
**Expected Result:** The chat status is shown — the active and the closed are the control.
**Priority:** High

### TC-SA-21-02-006 — Chat duration: the duration (the duration of the chat, the time); the duration is the measure
**Type:** Edge
**Covers:** 2.1 → Chat duration: the duration (the duration of the chat, the time)
**Preconditions:** Chats of varying lengths exist; a chat that is closed immediately after starting (zero-duration edge) is also prepared.
**Steps:**
1. View the chat duration: the duration (the duration of the chat, the time) — verify the duration is the measure.
2. Verify the duration matches the actual time between the first and last message.
3. Check the immediately-closed chat — verify its duration shows 0 (or the minimum unit) without error or negative value.
**Expected Result:** The chat duration is shown — the duration of the chat and the time are the measure; zero-duration chats display cleanly.
**Priority:** High

### TC-SA-21-02-007 — Chat view: the view (the chats, the users, the agents, the messages, the dates); the conversation is managed
**Type:** Positive
**Covers:** 2.1 → Chat view: the view (the chats, the users, the agents, the messages, the dates); Rule: the chat is active (the chats, the users, the agents, the messages, the dates); the conversation is managed
**Preconditions:** Multiple chats exist.
**Steps:**
1. View the chats: the view (the chats, the users, the agents, the messages, the dates) — verify the chat is active.
2. Verify each chat shows the user, the agent, the messages, and the dates.
3. Verify the conversation is managed (start, monitor, close).
**Expected Result:** The chats are viewed — the chats, the users, the agents, the messages, and the dates are visible; the conversation is managed.
**Priority:** High

### TC-SA-21-02-008 — Real-time chat is audit-logged with the chat, user, and timestamp
**Type:** Positive
**Covers:** 2.1 → Audit logging of the real-time chat; Rule: real-time chat is audit-logged with the chat, user, and timestamp
**Preconditions:** A chat has been conducted.
**Steps:**
1. Open the audit trail and filter by "real-time chat".
2. Verify entries show the chat, the user, and the timestamp.
**Expected Result:** The real-time chat is audit-logged with the chat, user, and timestamp.
**Priority:** Critical

## 2.2 Chatbot for Common Queries

### TC-SA-21-02-009 — Chatbot: the chatbot (the chatbot, the query, the response, the date); the chatbot is the bot
**Type:** Positive
**Covers:** 2.2 → Chatbot: the chatbot (the chatbot, the query, the response, the date); Rule: the chatbot is the automation (the chatbot, the query, the response, the date); the chatbot is the bot
**Preconditions:** Super Admin is logged in; the chatbot is configured.
**Steps:**
1. Open Customer Support Management → Live Chat Support → Chatbot for Common Queries.
2. Configure the chatbot: the chatbot (the chatbot, the query, the response, the date) — verify the chatbot is the automation.
3. Verify the chatbot shows the query, the response, and the date.
4. Ask a common query — verify the chatbot responds automatically.
**Expected Result:** The chatbot is configured — the chatbot, the query, the response, and the date are the bot.
**Priority:** Critical

### TC-SA-21-02-010 — Query: the query (the query, the text, the date); the query is the input
**Type:** Positive
**Covers:** 2.2 → Query: the query (the query, the text, the date); Rule: the query is the question (the query, the text, the date); the query is the input
**Preconditions:** The chatbot is active; multiple queries have been asked.
**Steps:**
1. View the query: the query (the query, the text, the date) — verify the query is the question.
2. Verify the query shows the text and the date.
3. Ask a new query — verify it is recorded with the correct text and date.
**Expected Result:** The query is shown — the query, the text, and the date are the input.
**Priority:** High

### TC-SA-21-02-011 — Response: the response (the response, the text, the date); the response is the output
**Type:** Edge
**Covers:** 2.2 → Response: the response (the response, the text, the date); Rule: the response is the answer (the response, the text, the date); the response is the output
**Preconditions:** The chatbot is active; a query the chatbot cannot answer (unrecognized-query edge) is also prepared.
**Steps:**
1. View the response: the response (the response, the text, the date) — verify the response is the answer.
2. Verify the response shows the text and the date.
3. Ask the unrecognized query — verify the chatbot gives a graceful fallback (e.g., "I can't answer that, would you like a human?") instead of an error or empty reply.
**Expected Result:** The response is shown — the response, the text, and the date are the output; unrecognized queries get a graceful fallback, never an error or empty reply.
**Priority:** High

### TC-SA-21-02-012 — Query count: the count (the count of the queries); the count is the measure
**Type:** Positive
**Covers:** 2.2 → Query count: the count (the count of the queries)
**Preconditions:** Multiple queries have been asked.
**Steps:**
1. View the query count: the count (the count of the queries) — verify the count is the measure.
2. Verify the count matches the actual number of queries.
3. Ask a new query — verify the count increments.
**Expected Result:** The query count is shown — the count of the queries is the measure.
**Priority:** High

### TC-SA-21-02-013 — Response accuracy: the accuracy (the accuracy of the responses, the percentage); the accuracy is the quality
**Type:** Edge
**Covers:** 2.2 → Response accuracy: the accuracy (the accuracy of the responses, the percentage); Rule: the response accuracy is the measure (the accuracy of the responses, the percentage); the accuracy is the quality
**Preconditions:** The chatbot has answered queries; a dataset with known correct/incorrect responses (including a zero-query edge) is prepared.
**Steps:**
1. View the response accuracy: the accuracy (the accuracy of the responses, the percentage) — verify the response accuracy is the measure.
2. Verify the accuracy percentage matches (correct responses ÷ total responses) × 100.
3. Check the zero-query state — verify accuracy shows 0% or "N/A" (no division-by-zero error).
**Expected Result:** The response accuracy is shown — the accuracy of the responses and the percentage are the quality; zero-query state never causes a division error.
**Priority:** High

### TC-SA-21-02-014 — Chatbot status: the status (the active, the inactive); the status is the state
**Type:** Positive
**Covers:** 2.2 → Chatbot status: the status (the active, the inactive)
**Preconditions:** The chatbot can be toggled active/inactive.
**Steps:**
1. View the chatbot status: the status (the active, the inactive) — verify the chatbot status is the state.
2. Deactivate the chatbot — verify users are routed directly to human agents (or a message explains the bot is offline).
3. Reactivate it — verify it answers common queries again.
**Expected Result:** The chatbot status is shown — the active and the inactive are the state.
**Priority:** High

### TC-SA-21-02-015 — Chatbot view: the view (the chatbots, the queries, the responses, the counts); the automation is managed
**Type:** Positive
**Covers:** 2.2 → Chatbot view: the view (the chatbots, the queries, the responses, the counts); Rule: the chatbot is active (the chatbots, the queries, the responses, the counts); the automation is managed
**Preconditions:** The chatbot has handled queries.
**Steps:**
1. View the chatbot: the view (the chatbots, the queries, the responses, the counts) — verify the chatbot is active.
2. Verify the view shows the queries, the responses, and the counts.
3. Verify the automation is managed (configure, monitor, toggle).
**Expected Result:** The chatbot is viewed — the chatbots, the queries, the responses, and the counts are visible; the automation is managed.
**Priority:** High

### TC-SA-21-02-016 — Chatbot configuration is audit-logged with the chatbot, query, and timestamp
**Type:** Positive
**Covers:** 2.2 → Audit logging of the chatbot configuration; Rule: chatbot configuration is audit-logged with the chatbot, query, and timestamp
**Preconditions:** Super Admin has configured the chatbot.
**Steps:**
1. Open the audit trail and filter by "chatbot".
2. Verify entries show the chatbot, the query, and the timestamp.
**Expected Result:** The chatbot configuration is audit-logged with the chatbot, query, and timestamp.
**Priority:** Critical

## 2.3 Human Handoff when Needed

### TC-SA-21-02-017 — Handoff: the handoff (the handoff, the chat, the agent, the date); the handoff is the pass
**Type:** Positive
**Covers:** 2.3 → Handoff: the handoff (the handoff, the chat, the agent, the date); Rule: the handoff is the transfer (the handoff, the chat, the agent, the date); the handoff is the pass
**Preconditions:** Super Admin is logged in; a chatbot conversation exists.
**Steps:**
1. Open Customer Support Management → Live Chat Support → Human Handoff.
2. Hand off the chat: the handoff (the handoff, the chat, the agent, the date) — verify the handoff is the transfer.
3. Verify the handoff shows the chat, the agent, and the date.
4. Verify the conversation continues seamlessly with the human agent (no message loss).
**Expected Result:** The handoff is created — the handoff, the chat, the agent, and the date are the pass.
**Priority:** Critical

### TC-SA-21-02-018 — Chat: the chat (the chat, the user, the agent, the date); the chat is the exchange
**Type:** Positive
**Covers:** 2.3 → Chat: the chat (the chat, the user, the agent, the date); Rule: the chat is the conversation (the chat, the user, the agent, the date); the chat is the exchange
**Preconditions:** Multiple chats have been handed off.
**Steps:**
1. Select the chat: the chat (the chat, the user, the agent, the date) — verify the chat is the conversation.
2. Verify the chat shows the user, the agent, and the date.
3. Verify the full chat history is visible to the human agent after handoff.
**Expected Result:** The chat is selected — the chat, the user, the agent, and the date are the exchange.
**Priority:** High

### TC-SA-21-02-019 — Agent: the agent (the agent, the name, the handoff); the agent is the support
**Type:** Edge
**Covers:** 2.3 → Agent: the agent (the agent, the name, the handoff); Rule: the agent is the handler (the agent, the name, the handoff); the agent is the support
**Preconditions:** Multiple agents exist; all agents are busy/offline when a handoff is requested (no-available-agent edge) is also prepared.
**Steps:**
1. Select the agent: the agent (the agent, the name, the handoff) — verify the agent is the handler.
2. Verify the agent shows the name and the handoff.
3. Request a handoff when no agent is available — verify the user is queued with an estimated wait (no dropped conversation, no crash).
**Expected Result:** The agent is selected — the agent, the name, and the handoff are the support; handoffs with no available agent queue the user, never drop the conversation.
**Priority:** High

### TC-SA-21-02-020 — Handoff trigger: the trigger (the trigger of the handoff, e.g., the user request, the complexity); the trigger is the rule
**Type:** Positive
**Covers:** 2.3 → Handoff trigger: the trigger (the trigger of the handoff, e.g., the user request, the complexity); Rule: the handoff trigger is the condition (the trigger of the handoff, e.g., the user request, the complexity); the trigger is the rule
**Preconditions:** Handoff triggers for user request and complexity are configured.
**Steps:**
1. Set the handoff trigger: the trigger (the trigger of the handoff, e.g., the user request, the complexity) — verify the handoff trigger is the condition.
2. Have a user type "talk to a human" — verify the handoff is triggered automatically.
3. Submit a complex query the chatbot flags — verify the handoff is triggered automatically.
**Expected Result:** The handoff trigger is set — the trigger of the handoff (the user request, the complexity) is the rule.
**Priority:** High

### TC-SA-21-02-021 — Handoff status: the status (the handed-off, the resolved); the status is the state
**Type:** Positive
**Covers:** 2.3 → Handoff status: the status (the handed-off, the resolved)
**Preconditions:** Handoffs with handed-off and resolved statuses exist.
**Steps:**
1. View the handoff status: the status (the handed-off, the resolved) — verify the handoff status is the state.
2. Verify a handed-off chat becomes resolved when the agent completes it.
3. Verify the status transition is recorded with a timestamp.
**Expected Result:** The handoff status is shown — the handed-off and the resolved are the state.
**Priority:** High

### TC-SA-21-02-022 — Handoff count: the count (the count of the handoffs); the count is the measure
**Type:** Positive
**Covers:** 2.3 → Handoff count: the count (the count of the handoffs)
**Preconditions:** Multiple handoffs have occurred.
**Steps:**
1. View the handoff count: the count (the count of the handoffs) — verify the count is the measure.
2. Verify the count matches the actual number of handoffs.
3. Trigger a new handoff — verify the count increments.
**Expected Result:** The handoff count is shown — the count of the handoffs is the measure.
**Priority:** High

### TC-SA-21-02-023 — Handoff view: the view (the handoffs, the chats, the agents, the dates); the transfer is managed
**Type:** Positive
**Covers:** 2.3 → Handoff view: the view (the handoffs, the chats, the agents, the dates); Rule: the chat is handed off (the handoffs, the chats, the agents, the dates); the transfer is managed
**Preconditions:** Multiple handoffs exist.
**Steps:**
1. View the handoffs: the view (the handoffs, the chats, the agents, the dates) — verify the chat is handed off.
2. Verify each handoff shows the chat, the agent, and the date.
3. Verify the transfer is managed (trigger, view, track).
**Expected Result:** The handoffs are viewed — the handoffs, the chats, the agents, and the dates are visible; the transfer is managed.
**Priority:** High

### TC-SA-21-02-024 — Human handoff is audit-logged with the handoff, agent, and timestamp
**Type:** Positive
**Covers:** 2.3 → Audit logging of the human handoff; Rule: human handoff is audit-logged with the handoff, agent, and timestamp
**Preconditions:** A handoff has occurred.
**Steps:**
1. Open the audit trail and filter by "human handoff".
2. Verify entries show the handoff, the agent, and the timestamp.
**Expected Result:** The human handoff is audit-logged with the handoff, agent, and timestamp.
**Priority:** Critical

## 2.4 Chat History and Transcripts

### TC-SA-21-02-025 — History: the history (the history, the chat, the transcript, the date); the history is the memory
**Type:** Positive
**Covers:** 2.4 → History: the history (the history, the chat, the transcript, the date); Rule: the history is the record (the history, the chat, the transcript, the date); the history is the memory
**Preconditions:** Super Admin is logged in; chats have been conducted.
**Steps:**
1. Open Customer Support Management → Live Chat Support → Chat History and Transcripts.
2. Store the history: the history (the history, the chat, the transcript, the date) — verify the history is the record.
3. Verify the history shows the chat, the transcript, and the date.
4. Verify the history is retained after the chat is closed.
**Expected Result:** The history is stored — the history, the chat, the transcript, and the date are the memory.
**Priority:** Critical

### TC-SA-21-02-026 — Chat: the chat (the chat, the user, the agent, the date); the chat is the exchange
**Type:** Positive
**Covers:** 2.4 → Chat: the chat (the chat, the user, the agent, the date); Rule: the chat is the conversation (the chat, the user, the agent, the date); the chat is the exchange
**Preconditions:** Multiple chats exist in the history.
**Steps:**
1. Select the chat: the chat (the chat, the user, the agent, the date) — verify the chat is the conversation.
2. Verify the chat shows the user, the agent, and the date.
3. Verify the chat's full message thread is preserved in the history.
**Expected Result:** The chat is selected — the chat, the user, the agent, and the date are the exchange.
**Priority:** High

### TC-SA-21-02-027 — Transcript: the transcript (the transcript, the text, the date); the transcript is the text
**Type:** Positive
**Covers:** 2.4 → Transcript: the transcript (the transcript, the text, the date); Rule: the transcript is the record (the transcript, the text, the date); the transcript is the text
**Preconditions:** A chat with multiple messages exists.
**Steps:**
1. View the transcript: the transcript (the transcript, the text, the date) — verify the transcript is the record.
2. Verify the transcript shows the full text of every message in order.
3. Verify each message in the transcript has its date/time.
**Expected Result:** The transcript is shown — the transcript, the text, and the date are the text.
**Priority:** High

### TC-SA-21-02-028 — Chat count: the count (the count of the chats); the count is the volume
**Type:** Positive
**Covers:** 2.4 → Chat count: the count (the count of the chats); Rule: the chat count is the measure (the count of the chats); the count is the volume
**Preconditions:** Multiple chats exist in the history.
**Steps:**
1. View the chat count: the count (the count of the chats) — verify the chat count is the measure.
2. Verify the count matches the actual number of chats in the history.
3. Complete a new chat — verify the count increments.
**Expected Result:** The chat count is shown — the count of the chats is the volume.
**Priority:** High

### TC-SA-21-02-029 — Chat period: the period (the period of the chats, e.g., the daily, the weekly, the monthly); the period is the scope
**Type:** Positive
**Covers:** 2.4 → Chat period: the period (the period of the chats, e.g., the daily, the weekly, the monthly)
**Preconditions:** Chats exist across multiple days, weeks, and months.
**Steps:**
1. Set the chat period: the period (the period of the chats, e.g., the daily, the weekly, the monthly) — verify the period is the scope.
2. Switch between daily, weekly, and monthly — verify the chat history updates for each period.
3. Verify the period boundaries are correct.
**Expected Result:** The chat period is set — the period of the chats (the daily, the weekly, the monthly) is the scope.
**Priority:** High

### TC-SA-21-02-030 — Chat export: the export (the chats, the format, the period); the export is the record
**Type:** Edge
**Covers:** 2.4 → Chat export: the export (the chats, the format, the period)
**Preconditions:** Chats exist in multiple periods; an empty period (no chats, zero-row export edge) is also prepared.
**Steps:**
1. Export the chats: the export (the chats, the format, the period) — verify the export is the record.
2. Verify the export file contains all chats for the selected period in the selected format, with correct content.
3. Export the empty period — verify the export completes (empty file or clear "no data" message, no error/corrupt file).
**Expected Result:** The chats are exported — the chats, the format, and the period are the record; empty-period exports never produce corrupt files or errors.
**Priority:** High

### TC-SA-21-02-031 — Chat view: the view (the histories, the chats, the transcripts, the dates); the record is managed
**Type:** Positive
**Covers:** 2.4 → Chat view: the view (the histories, the chats, the transcripts, the dates); Rule: the history is stored (the histories, the chats, the transcripts, the dates); the record is managed
**Preconditions:** Multiple chats with transcripts exist.
**Steps:**
1. View the histories: the view (the histories, the chats, the transcripts, the dates) — verify the history is stored.
2. Verify each history shows the chat, the transcript, and the date.
3. Verify the record is managed (view, filter, export).
**Expected Result:** The histories are viewed — the histories, the chats, the transcripts, and the dates are visible; the record is managed.
**Priority:** High

### TC-SA-21-02-032 — Chat history storage is audit-logged with the history, chat, and timestamp
**Type:** Positive
**Covers:** 2.4 → Audit logging of the chat history storage; Rule: chat history storage is audit-logged with the history, chat, and timestamp
**Preconditions:** Chat history has been stored.
**Steps:**
1. Open the audit trail and filter by "chat history".
2. Verify entries show the history, the chat, and the timestamp.
**Expected Result:** The chat history storage is audit-logged with the history, chat, and timestamp.
**Priority:** Critical
