# 4. Groups & Roles — Test Cases

User Type: **Organization**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: groups_roles.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 |
|---------|--------------------|----------|
| 4.1 | Create, edit, and archive departments | TC-ORG-4-01-001 |
| 4.1 | Create groups within departments | TC-ORG-4-01-002 |
| 4.1 | Move users between groups | TC-ORG-4-01-003 |
| 4.1 | Group membership list | TC-ORG-4-01-004 |
| 4.1 | Department and group hierarchy view | TC-ORG-4-01-005 |
| 4.1 | Department & Group Management available on web and mobile | TC-ORG-4-01-006 |
| 4.1 | department & group management event logging (viewed) | TC-ORG-4-01-007 |
| 4.1 | Audit logging of department & group management | TC-ORG-4-01-008 |
| 4.1 | Rule: Create, edit, and archive departments. | TC-ORG-4-01-009 |
| 4.1 | Rule: Create groups within departments. | TC-ORG-4-01-010 |
| 4.1 | Rule: Move users between groups. | TC-ORG-4-01-011 |
| 4.1 | Rule: Group membership list. | TC-ORG-4-01-012 |
| 4.1 | Rule: Department and group hierarchy view. | TC-ORG-4-01-013 |
| 4.2 | Role definitions: learner, mentor, program coordinator | TC-ORG-4-02-014 |
| 4.2 | Assign roles to users | TC-ORG-4-02-015 |
| 4.2 | Bulk role assignment | TC-ORG-4-02-016 |
| 4.2 | Role change history | TC-ORG-4-02-017 |
| 4.2 | Role-based access enforcement | TC-ORG-4-02-018 |
| 4.2 | Role Assignment available on web and mobile | TC-ORG-4-02-019 |
| 4.2 | role assignment event logging (viewed) | TC-ORG-4-02-020 |
| 4.2 | Audit logging of role assignment | TC-ORG-4-02-021 |
| 4.2 | Rule: Role definitions: learner, mentor, program coordinator. | TC-ORG-4-02-022 |
| 4.2 | Rule: Assign roles to users. | TC-ORG-4-02-023 |
| 4.2 | Rule: Bulk role assignment. | TC-ORG-4-02-024 |
| 4.2 | Rule: Role change history. | TC-ORG-4-02-025 |
| 4.2 | Rule: Role-based access enforcement. | TC-ORG-4-02-026 |

## 4.1 Department & Group Management

### TC-ORG-4-01-001 — Create, edit, and archive departments
**Type:** Positive
**Covers:** 4.1 → Create, edit, and archive departments; Rule: Create, edit, and archive departments.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Create, edit, and archive departments.
2. Observe the result and verify the full behavior: Create, edit, and archive departments.
**Expected Result:** Create, edit, and archive departments — delivered exactly as documented.
**Priority:** Critical

### TC-ORG-4-01-002 — Create groups within departments
**Type:** Positive
**Covers:** 4.1 → Create groups within departments; Rule: Create groups within departments.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Create groups within departments.
2. Observe the result and verify the full behavior: Create groups within departments.
**Expected Result:** Create groups within departments — delivered exactly as documented.
**Priority:** High

### TC-ORG-4-01-003 — Move users between groups
**Type:** Positive
**Covers:** 4.1 → Move users between groups; Rule: Move users between groups.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Move users between groups.
2. Observe the result and verify the full behavior: Move users between groups.
**Expected Result:** Move users between groups — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-01-004 — Group membership list
**Type:** Positive
**Covers:** 4.1 → Group membership list; Rule: Group membership list.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Group membership list.
2. Observe the result and verify the full behavior: Group membership list.
**Expected Result:** Group membership list — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-01-005 — Department and group hierarchy view
**Type:** Positive
**Covers:** 4.1 → Department and group hierarchy view; Rule: Department and group hierarchy view.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Department and group hierarchy view.
2. Observe the result and verify the full behavior: Department and group hierarchy view.
**Expected Result:** Department and group hierarchy view — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-01-006 — Department & Group Management available on web and mobile
**Type:** Positive
**Covers:** 4.1 → Department & Group Management available on web and mobile; Rule: Create, edit, and archive departments.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Department & Group Management available on web and mobile.
2. Observe the result and verify the full behavior: Department & Group Management available on web and mobile.
**Expected Result:** Department & Group Management available on web and mobile — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-01-007 — department & group management event logging (viewed)
**Type:** Positive
**Covers:** 4.1 → department & group management event logging (viewed); Rule: Create groups within departments.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: department & group management event logging (viewed).
2. Observe the result and verify the full behavior: department & group management event logging (viewed).
**Expected Result:** department & group management event logging (viewed) — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-01-008 — Audit logging of department & group management
**Type:** Positive
**Covers:** 4.1 → Audit logging of department & group management; Rule: Move users between groups.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Audit logging of department & group management.
2. Observe the result and verify the full behavior: Audit logging of department & group management.
**Expected Result:** Audit logging of department & group management — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-01-009 — Rule: Create, edit, and archive departments.
**Type:** Positive
**Covers:** 4.1 → Rule: Create, edit, and archive departments.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Create, edit, and archive departments.
2. Observe the result and verify the full behavior: Create, edit, and archive departments.
**Expected Result:** Create, edit, and archive departments. — delivered exactly as documented.
**Priority:** Critical

### TC-ORG-4-01-010 — Rule: Create groups within departments.
**Type:** Positive
**Covers:** 4.1 → Rule: Create groups within departments.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Create groups within departments.
2. Observe the result and verify the full behavior: Create groups within departments.
**Expected Result:** Create groups within departments. — delivered exactly as documented.
**Priority:** High

### TC-ORG-4-01-011 — Rule: Move users between groups.
**Type:** Positive
**Covers:** 4.1 → Rule: Move users between groups.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Move users between groups.
2. Observe the result and verify the full behavior: Move users between groups.
**Expected Result:** Move users between groups. — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-01-012 — Rule: Group membership list.
**Type:** Positive
**Covers:** 4.1 → Rule: Group membership list.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Group membership list.
2. Observe the result and verify the full behavior: Group membership list.
**Expected Result:** Group membership list. — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-01-013 — Rule: Department and group hierarchy view.
**Type:** Positive
**Covers:** 4.1 → Rule: Department and group hierarchy view.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Department and group hierarchy view.
2. Observe the result and verify the full behavior: Department and group hierarchy view.
**Expected Result:** Department and group hierarchy view. — delivered exactly as documented.
**Priority:** Medium

## 4.2 Role Assignment

### TC-ORG-4-02-014 — Role definitions: learner, mentor, program coordinator
**Type:** Positive
**Covers:** 4.2 → Role definitions: learner, mentor, program coordinator; Rule: Role definitions: learner, mentor, program coordinator.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Role definitions: learner, mentor, program coordinator.
2. Observe the result and verify the full behavior: Role definitions: learner, mentor, program coordinator.
**Expected Result:** Role definitions: learner, mentor, program coordinator — delivered exactly as documented.
**Priority:** Critical

### TC-ORG-4-02-015 — Assign roles to users
**Type:** Positive
**Covers:** 4.2 → Assign roles to users; Rule: Assign roles to users.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Assign roles to users.
2. Observe the result and verify the full behavior: Assign roles to users.
**Expected Result:** Assign roles to users — delivered exactly as documented.
**Priority:** High

### TC-ORG-4-02-016 — Bulk role assignment
**Type:** Positive
**Covers:** 4.2 → Bulk role assignment; Rule: Bulk role assignment.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Bulk role assignment.
2. Observe the result and verify the full behavior: Bulk role assignment.
**Expected Result:** Bulk role assignment — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-02-017 — Role change history
**Type:** Positive
**Covers:** 4.2 → Role change history; Rule: Role change history.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Role change history.
2. Observe the result and verify the full behavior: Role change history.
**Expected Result:** Role change history — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-02-018 — Role-based access enforcement
**Type:** Positive
**Covers:** 4.2 → Role-based access enforcement; Rule: Role-based access enforcement.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Role-based access enforcement.
2. Observe the result and verify the full behavior: Role-based access enforcement.
**Expected Result:** Role-based access enforcement — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-02-019 — Role Assignment available on web and mobile
**Type:** Positive
**Covers:** 4.2 → Role Assignment available on web and mobile; Rule: Role definitions: learner, mentor, program coordinator.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Role Assignment available on web and mobile.
2. Observe the result and verify the full behavior: Role Assignment available on web and mobile.
**Expected Result:** Role Assignment available on web and mobile — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-02-020 — role assignment event logging (viewed)
**Type:** Positive
**Covers:** 4.2 → role assignment event logging (viewed); Rule: Assign roles to users.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: role assignment event logging (viewed).
2. Observe the result and verify the full behavior: role assignment event logging (viewed).
**Expected Result:** role assignment event logging (viewed) — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-02-021 — Audit logging of role assignment
**Type:** Positive
**Covers:** 4.2 → Audit logging of role assignment; Rule: Bulk role assignment.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform: Audit logging of role assignment.
2. Observe the result and verify the full behavior: Audit logging of role assignment.
**Expected Result:** Audit logging of role assignment — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-02-022 — Rule: Role definitions: learner, mentor, program coordinator.
**Type:** Positive
**Covers:** 4.2 → Rule: Role definitions: learner, mentor, program coordinator.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Role definitions: learner, mentor, program coordinator.
2. Observe the result and verify the full behavior: Role definitions: learner, mentor, program coordinator.
**Expected Result:** Role definitions: learner, mentor, program coordinator. — delivered exactly as documented.
**Priority:** Critical

### TC-ORG-4-02-023 — Rule: Assign roles to users.
**Type:** Positive
**Covers:** 4.2 → Rule: Assign roles to users.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Assign roles to users.
2. Observe the result and verify the full behavior: Assign roles to users.
**Expected Result:** Assign roles to users. — delivered exactly as documented.
**Priority:** High

### TC-ORG-4-02-024 — Rule: Bulk role assignment.
**Type:** Positive
**Covers:** 4.2 → Rule: Bulk role assignment.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Bulk role assignment.
2. Observe the result and verify the full behavior: Bulk role assignment.
**Expected Result:** Bulk role assignment. — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-02-025 — Rule: Role change history.
**Type:** Positive
**Covers:** 4.2 → Rule: Role change history.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Role change history.
2. Observe the result and verify the full behavior: Role change history.
**Expected Result:** Role change history. — delivered exactly as documented.
**Priority:** Medium

### TC-ORG-4-02-026 — Rule: Role-based access enforcement.
**Type:** Positive
**Covers:** 4.2 → Rule: Role-based access enforcement.
**Preconditions:** A Organization account is active and the Organization is in the state required for this behavior.
**Steps:**
1. As a Organization, set up the precondition and perform the action that triggers the rule: Role-based access enforcement.
2. Observe the result and verify the full behavior: Role-based access enforcement.
**Expected Result:** Role-based access enforcement. — delivered exactly as documented.
**Priority:** Medium
