# 2. Study Groups Management — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: study_groups_management.md — every feature, sub-feature, and rule covered

## Test Execution Policy

- Zero tolerance: any deviation from the documented behavior is a defect.
- Every failed test is logged with a Bug ID, the feature, the sub-feature, the expected vs actual result, and the severity; 100% of bugs are fixed before the group passes.
- 100% pass rate is required for the group to be marked complete.

## Coverage Matrix

| Feature | Sub-feature / Rule | Test IDs |
|---------|--------------------|----------|
| 2.1 Group Creation & Approval | Group creation by subject (student-initiated) | TC-SA-SL-5-001 |
| 2.1 Group Creation & Approval | Approval workflow: pending → approved/rejected | TC-SA-SL-5-002 |
| 2.1 Group Creation & Approval | Group size limits and join/leave rules | TC-SA-SL-5-003 |
| 2.1 Group Creation & Approval | Group dissolution with member notification | TC-SA-SL-5-004 |
| 2.1 Group Creation & Approval | Rule: pending group not joinable until approved | TC-SA-SL-5-005 |
| 2.1 Group Creation & Approval | Rule: dissolution notifies members, history preserved | TC-SA-SL-5-006 |
| 2.1 Group Creation & Approval | Audit logging of study group creation/approval | TC-SA-SL-5-007 |
| 2.2 Group Chat Moderation | Keyword/profanity filtering | TC-SA-SL-6-001 |
| 2.2 Group Chat Moderation | Message reporting and moderation queue | TC-SA-SL-6-002 |
| 2.2 Group Chat Moderation | Member muting and removal | TC-SA-SL-6-003 |
| 2.2 Group Chat Moderation | Chat visibility controls (active, paused, archived) | TC-SA-SL-6-004 |
| 2.2 Group Chat Moderation | Rule: muted member cannot post for mute duration | TC-SA-SL-6-005 |
| 2.2 Group Chat Moderation | Audit logging of group chat moderation | TC-SA-SL-6-006 |
| 2.3 Resource Sharing Controls | Shareable content types and file limits | TC-SA-SL-7-001 |
| 2.3 Resource Sharing Controls | Sharing scope: group-only or public library | TC-SA-SL-7-002 |
| 2.3 Resource Sharing Controls | Shared resource moderation (approve/flag/remove) | TC-SA-SL-7-003 |
| 2.3 Resource Sharing Controls | Rule: oversized/disallowed file rejected on upload | TC-SA-SL-7-004 |
| 2.3 Resource Sharing Controls | Rule: group-only resource not visible outside group | TC-SA-SL-7-005 |
| 2.3 Resource Sharing Controls | Audit logging of resource sharing controls | TC-SA-SL-7-006 |
| 2.4 Group Study Session Scheduling | Session scheduling by members and reminders | TC-SA-SL-8-001 |
| 2.4 Group Study Session Scheduling | Session attendance tracking and history | TC-SA-SL-8-002 |
| 2.4 Group Study Session Scheduling | Rule: only active group members can schedule | TC-SA-SL-8-003 |
| 2.4 Group Study Session Scheduling | Rule: opt-out member not sent reminders | TC-SA-SL-8-004 |
| 2.4 Group Study Session Scheduling | Audit logging of group study session scheduling | TC-SA-SL-8-005 |

## 2.1 Group Creation & Approval

### TC-SA-SL-5-001 — Group creation by subject (student-initiated)
**Type:** Positive
**Covers:** 2.1 → Group creation
**Preconditions:** A student account is active; study groups are enabled.
**Steps:**
1. As a student, create a study group by subject.
2. Verify the group is created and enters the pending state.
**Expected Result:** Group creation by subject — delivered exactly as documented.
**Priority:** Critical

### TC-SA-SL-5-002 — Approval workflow: pending → approved/rejected
**Type:** Positive
**Covers:** 2.1 → Approval workflow
**Preconditions:** A pending study group exists.
**Steps:**
1. As a Super Admin, approve the group and verify it becomes active.
2. Reject a separate pending group with a reason and verify the creator is notified.
**Expected Result:** Approval workflow — delivered exactly as documented.
**Priority:** Critical

### TC-SA-SL-5-003 — Group size limits and join/leave rules
**Type:** Positive
**Covers:** 2.1 → Size limits and join/leave
**Preconditions:** An active study group exists.
**Steps:**
1. Set the group size limits (min/max members) and join/leave rules.
2. Verify joins and leaves respect the limits and rules.
**Expected Result:** Group size limits and join/leave rules — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-5-004 — Group dissolution with member notification
**Type:** Negative
**Covers:** 2.1 → Group dissolution
**Preconditions:** An active study group with members exists.
**Steps:**
1. Dissolve the group (by owner or by admin).
2. Verify members are notified and the group is removed from active lists.
**Expected Result:** Group dissolution — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-5-005 — Rule: pending group not joinable until approved
**Type:** Negative
**Covers:** 2.1 → Rule: pending not joinable
**Preconditions:** A study group is pending approval.
**Steps:**
1. Attempt to join the pending group as another student.
2. Verify the join is not allowed.
**Expected Result:** A pending group is not joinable until approved — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-5-006 — Rule: dissolution notifies members, history preserved
**Type:** Negative
**Covers:** 2.1 → Rule: dissolution notification and history
**Preconditions:** An active study group is dissolved.
**Steps:**
1. Verify all members are notified of the dissolution.
2. Verify the group's history is preserved per retention policy.
**Expected Result:** Dissolution notifies all members and the group's history is preserved — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-5-007 — Audit logging of study group creation/approval
**Type:** Positive
**Covers:** 2.1 → Audit logging
**Preconditions:** Study group actions have been performed.
**Steps:**
1. Open the audit trail and filter by study group creation/approval.
2. Verify entries show the group, the actor, and the timestamp.
**Expected Result:** Audit logging of study group creation/approval — delivered exactly as documented.
**Priority:** Critical

## 2.2 Group Chat Moderation

### TC-SA-SL-6-001 — Keyword/profanity filtering
**Type:** Positive
**Covers:** 2.2 → Keyword/profanity filtering
**Preconditions:** Group chat is active; filtering is configured.
**Steps:**
1. Configure the keyword/profanity filtering.
2. Post a message containing a filtered keyword and verify it is held or removed per policy.
**Expected Result:** Keyword/profanity filtering — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-6-002 — Message reporting and moderation queue
**Type:** Positive
**Covers:** 2.2 → Reporting and queue
**Preconditions:** A group message is reported by a member.
**Steps:**
1. Report an inappropriate message.
2. Verify it appears in the moderation queue for review.
**Expected Result:** Message reporting and moderation queue — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-6-003 — Member muting and removal
**Type:** Positive
**Covers:** 2.2 → Muting and removal
**Preconditions:** A group member has posted inappropriate content.
**Steps:**
1. Mute the member (temporary) and verify the effect.
2. Remove the member (permanent) and verify access is lost.
**Expected Result:** Member muting and removal — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-6-004 — Chat visibility controls (active, paused, archived)
**Type:** Positive
**Covers:** 2.2 → Chat visibility controls
**Preconditions:** A group chat is active.
**Steps:**
1. Set the chat to paused and verify no new messages are accepted.
2. Set the chat to archived and verify it is read-only.
**Expected Result:** Chat visibility controls — delivered exactly as documented.
**Priority:** Medium

### TC-SA-SL-6-005 — Rule: muted member cannot post for mute duration
**Type:** Negative
**Covers:** 2.2 → Rule: mute enforcement
**Preconditions:** A member is muted for a defined duration.
**Steps:**
1. Attempt to post as the muted member during the mute.
2. Verify the post is blocked; verify posting resumes after the mute expires.
**Expected Result:** A muted member cannot post for the mute duration — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-6-006 — Audit logging of group chat moderation
**Type:** Positive
**Covers:** 2.2 → Audit logging
**Preconditions:** Moderation actions have been performed.
**Steps:**
1. Open the audit trail and filter by group chat moderation.
2. Verify entries show the group, the message/member, the action, and the timestamp.
**Expected Result:** Audit logging of group chat moderation — delivered exactly as documented.
**Priority:** Critical

## 2.3 Resource Sharing Controls

### TC-SA-SL-7-001 — Shareable content types and file limits
**Type:** Positive
**Covers:** 2.3 → Content types and file limits
**Preconditions:** A Super Admin is configuring resource sharing.
**Steps:**
1. Configure the shareable content types (notes, files, links) and file type/size limits.
2. Verify shares respect the configured types and limits.
**Expected Result:** Shareable content types and file limits — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-7-002 — Sharing scope: group-only or public library
**Type:** Positive
**Covers:** 2.3 → Sharing scope
**Preconditions:** A resource is shared.
**Steps:**
1. Share a resource as group-only and verify its scope.
2. Share a resource to the public library and verify it enters the library.
**Expected Result:** Sharing scope — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-7-003 — Shared resource moderation (approve/flag/remove)
**Type:** Positive
**Covers:** 2.3 → Resource moderation
**Preconditions:** Shared resources exist in the moderation view.
**Steps:**
1. Approve, flag, and remove shared resources (separately).
2. Verify each action takes effect and is recorded.
**Expected Result:** Shared resource moderation — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-7-004 — Rule: oversized/disallowed file rejected on upload
**Type:** Negative
**Covers:** 2.3 → Rule: file limit enforcement
**Preconditions:** File type/size limits are configured.
**Steps:**
1. Attempt to upload a file exceeding the size limit or of a disallowed type.
2. Verify the upload is rejected.
**Expected Result:** A file exceeding the size limit or of a disallowed type is rejected on upload — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-7-005 — Rule: group-only resource not visible outside group
**Type:** Negative
**Covers:** 2.3 → Rule: scope enforcement
**Preconditions:** A resource is shared group-only.
**Steps:**
1. Attempt to view the resource as a student outside the group.
2. Verify the resource is not visible.
**Expected Result:** A group-only resource is not visible outside the group — delivered exactly as documented.
**Priority:** Critical

### TC-SA-SL-7-006 — Audit logging of resource sharing controls
**Type:** Positive
**Covers:** 2.3 → Audit logging
**Preconditions:** Resource sharing actions have been performed.
**Steps:**
1. Open the audit trail and filter by resource sharing.
2. Verify entries show the resource, the actor, and the timestamp.
**Expected Result:** Audit logging of resource sharing controls — delivered exactly as documented.
**Priority:** Critical

## 2.4 Group Study Session Scheduling

### TC-SA-SL-8-001 — Session scheduling by members and reminders
**Type:** Positive
**Covers:** 2.4 → Scheduling and reminders
**Preconditions:** An active study group exists; scheduling is enabled.
**Steps:**
1. As a group member, schedule a study session.
2. Verify reminders are sent to group members.
**Expected Result:** Session scheduling by members and reminders — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-8-002 — Session attendance tracking and history
**Type:** Positive
**Covers:** 2.4 → Attendance and history
**Preconditions:** A group study session has occurred.
**Steps:**
1. Verify attendance is tracked for the session.
2. Review the session history per group.
**Expected Result:** Session attendance tracking and history — delivered exactly as documented.
**Priority:** Medium

### TC-SA-SL-8-003 — Rule: only active group members can schedule
**Type:** Negative
**Covers:** 2.4 → Rule: member-only scheduling
**Preconditions:** A student is not a member of the group.
**Steps:**
1. Attempt to schedule a session for the group as a non-member.
2. Verify the scheduling is not allowed.
**Expected Result:** Only members of an active group can schedule a session for it — delivered exactly as documented.
**Priority:** High

### TC-SA-SL-8-004 — Rule: opt-out member not sent reminders
**Type:** Negative
**Covers:** 2.4 → Rule: reminder opt-out
**Preconditions:** A group member has opted out of reminders.
**Steps:**
1. Schedule a group study session.
2. Verify the opted-out member is not sent a reminder while others are.
**Expected Result:** A member who opted out of reminders is not spammed — delivered exactly as documented.
**Priority:** Medium

### TC-SA-SL-8-005 — Audit logging of group study session scheduling
**Type:** Positive
**Covers:** 2.4 → Audit logging
**Preconditions:** Scheduling configuration changes have been made.
**Steps:**
1. Open the audit trail and filter by group study session scheduling.
2. Verify entries show the change and the timestamp.
**Expected Result:** Audit logging of group study session scheduling — delivered exactly as documented.
**Priority:** Critical
