# 6. Plan Configuration — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: plan_configuration.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 |
|---------|--------------------|----------|
| 6.1 Create, Edit, and Deactivate Plans | Plan creation: the plan created (the name, the scope, the price, the period) | TC-SA-11-06-001 |
| 6.1 Create, Edit, and Deactivate Plans | Plan edit: the plan edited (the price, the scope, the features) | TC-SA-11-06-002 |
| 6.1 Create, Edit, and Deactivate Plans | Plan deactivation: the plan deactivated (no longer offered) | TC-SA-11-06-003 |
| 6.1 Create, Edit, and Deactivate Plans | Deactivation handling: the existing subscribers handled (the grace, the migration) | TC-SA-11-06-004 |
| 6.1 Create, Edit, and Deactivate Plans | Plan list: the plans with their status (the active, the deactivated) | TC-SA-11-06-005 |
| 6.1 Create, Edit, and Deactivate Plans | Plan validation: the plan validated (the scope, the price, the period) | TC-SA-11-06-006 |
| 6.1 Create, Edit, and Deactivate Plans | Audit logging of the plan lifecycle | TC-SA-11-06-007 |
| 6.1 Create, Edit, and Deactivate Plans | Rule: the plan creation is the name, the scope, the price, and the period; the plan is the product | TC-SA-11-06-001 |
| 6.1 Create, Edit, and Deactivate Plans | Rule: the plan edit is the price, the scope, and the features; the change is recorded | TC-SA-11-06-002 |
| 6.1 Create, Edit, and Deactivate Plans | Rule: the plan deactivation is the no-longer-offered status; the existing subscribers are handled (the grace, the migration) | TC-SA-11-06-003, TC-SA-11-06-004 |
| 6.1 Create, Edit, and Deactivate Plans | Rule: a deactivated plan is not offered (the new subscribers cannot subscribe); the existing subscribers are handled | TC-SA-11-06-008 |
| 6.1 Create, Edit, and Deactivate Plans | Rule: the plan list shows the status (the active, the deactivated); the plan state is visible | TC-SA-11-06-005 |
| 6.1 Create, Edit, and Deactivate Plans | Rule: plan lifecycle is audit-logged with the plan, action, and timestamp | TC-SA-11-06-007 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Feature definition: the features per plan (the content access, the AI assistant, the mentorship) | TC-SA-11-06-009 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Limit definition: the limits per plan (the AI assistant question limit, the download cap, the concurrent users) | TC-SA-11-06-010 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Feature scope: the features the plan includes (the plan's scope) | TC-SA-11-06-011 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Limit scope: the limits the plan has (the plan's boundaries) | TC-SA-11-06-012 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Plan differentiation: the plans differentiated by the features and the limits (the free vs. the premium) | TC-SA-11-06-013 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Limit enforcement: the limits enforced (the AI assistant question limit, the download cap) | TC-SA-11-06-014 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Audit logging of the feature/limit definition | TC-SA-11-06-015 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Rule: the feature definition is the features per plan (the content access, the AI assistant, the mentorship); the features are the plan's scope | TC-SA-11-06-009 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Rule: the limit definition is the limits per plan (the AI assistant question limit, the download cap, the concurrent users); the limits are the plan's boundaries | TC-SA-11-06-010 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Rule: the plan differentiation is by the features and the limits (the free vs. the premium); the differentiation is the value | TC-SA-11-06-013 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Rule: the limit enforcement is the boundary (the AI assistant question limit, the download cap); the enforcement is the limit | TC-SA-11-06-014 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Rule: a limit breach (the AI assistant question limit reached) triggers the notification (the limit reached, the upgrade prompt); the limit is the upgrade trigger | TC-SA-11-06-016 |
| 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits) | Rule: feature/limit definition is audit-logged with the plan, features, limits, and timestamp | TC-SA-11-06-015 |
| 6.3 Plan Visibility and Availability Control | Plan visibility: the plans shown to the learners (the visible plans) | TC-SA-11-06-017 |
| 6.3 Plan Visibility and Availability Control | Plan availability: the plans that can be subscribed to (the available plans) | TC-SA-11-06-018 |
| 6.3 Plan Visibility and Availability Control | Visibility control: the visibility set (the visible, the hidden) | TC-SA-11-06-019 |
| 6.3 Plan Visibility and Availability Control | Availability control: the availability set (the available, the unavailable) | TC-SA-11-06-020 |
| 6.3 Plan Visibility and Availability Control | Plan state: the plan's state (the visible and available, the visible but unavailable, the hidden but available) | TC-SA-11-06-021 |
| 6.3 Plan Visibility and Availability Control | State change: the state changed (the visibility, the availability) | TC-SA-11-06-022 |
| 6.3 Plan Visibility and Availability Control | Audit logging of the state changes | TC-SA-11-06-023 |
| 6.3 Plan Visibility and Availability Control | Rule: the plan visibility is the shown to the learners (the visible plans); the visibility is the exposure | TC-SA-11-06-017 |
| 6.3 Plan Visibility and Availability Control | Rule: the plan availability is the can be subscribed to (the available plans); the availability is the subscription | TC-SA-11-06-018 |
| 6.3 Plan Visibility and Availability Control | Rule: the plan state is the visible and available, the visible but unavailable, or the hidden but available; the state is the control | TC-SA-11-06-021 |
| 6.3 Plan Visibility and Availability Control | Rule: a state change (the visibility, the availability) is recorded (the change, the time); it is auditable | TC-SA-11-06-022 |
| 6.3 Plan Visibility and Availability Control | Rule: a visible but unavailable plan (the coming soon) is shown but not subscribed; the state is the control | TC-SA-11-06-024 |
| 6.3 Plan Visibility and Availability Control | Rule: state changes are audit-logged with the plan, state, and timestamp | TC-SA-11-06-023 |

## 6.1 Create, Edit, and Deactivate Plans

### TC-SA-11-06-001 — Plan creation: the plan created (the name, the scope, the price, the period); the plan is the product
**Type:** Positive
**Covers:** 6.1 → Plan creation: the plan created (the name, the scope, the price, the period); Rule: the plan creation is the name, the scope, the price, and the period; the plan is the product
**Preconditions:** The Super Admin opens the plan configuration.
**Steps:**
1. Create a plan: the name, the scope (the content access), the price, and the period.
2. Save the plan.
3. Verify the plan is created and live.
**Expected Result:** The plan is created (the name, the scope, the price, the period) — the plan is the product.
**Priority:** Critical

### TC-SA-11-06-002 — Plan edit: the plan edited (the price, the scope, the features); the change is recorded
**Type:** Positive
**Covers:** 6.1 → Plan edit: the plan edited (the price, the scope, the features); Rule: the plan edit is the price, the scope, and the features; the change is recorded
**Preconditions:** A plan is live.
**Steps:**
1. Edit the plan (change the price, the scope, the features).
2. Save the edit.
3. Verify the plan is updated and the change is recorded.
**Expected Result:** The plan is edited (the price, the scope, the features) — the change is recorded.
**Priority:** Critical

### TC-SA-11-06-003 — Plan deactivation: the plan deactivated (no longer offered); the existing subscribers are handled
**Type:** Positive
**Covers:** 6.1 → Plan deactivation: the plan deactivated (no longer offered); Deactivation handling: the existing subscribers handled (the grace, the migration); Rule: the plan deactivation is the no-longer-offered status; the existing subscribers are handled (the grace, the migration)
**Preconditions:** A plan is live with existing subscribers.
**Steps:**
1. Deactivate the plan.
2. Verify the plan is no longer offered.
3. Verify the existing subscribers are handled (the grace, the migration).
**Expected Result:** The plan is deactivated (no longer offered) — the existing subscribers are handled (the grace, the migration).
**Priority:** Critical

### TC-SA-11-06-004 — Deactivation handling: the existing subscribers handled (the grace, the migration)
**Type:** Edge
**Covers:** 6.1 → Deactivation handling: the existing subscribers handled (the grace, the migration)
**Preconditions:** A plan with existing subscribers is deactivated.
**Steps:**
1. Deactivate the plan.
2. Verify the existing subscribers get the grace (the access continues for the paid period).
3. Verify the migration path is offered (the subscribers can move to another plan).
**Expected Result:** The existing subscribers are handled — the grace is applied and the migration is offered.
**Priority:** Critical

### TC-SA-11-06-005 — Plan list: the plans with their status (the active, the deactivated); the plan state is visible
**Type:** Positive
**Covers:** 6.1 → Plan list: the plans with their status (the active, the deactivated); Rule: the plan list shows the status (the active, the deactivated); the plan state is visible
**Preconditions:** Multiple plans exist (active and deactivated).
**Steps:**
1. Open the plan list.
2. Verify the plans are shown with their status (the active, the deactivated).
3. Verify the plan state is visible.
**Expected Result:** The plan list shows the status — the active and the deactivated plans are visible.
**Priority:** High

### TC-SA-11-06-006 — Plan validation: the plan validated (the scope, the price, the period)
**Type:** Negative
**Covers:** 6.1 → Plan validation: the plan validated (the scope, the price, the period)
**Preconditions:** The Super Admin opens the plan configuration.
**Steps:**
1. Attempt to create a plan with an invalid scope (a missing content access).
2. Attempt to create a plan with an invalid price (a negative price).
3. Attempt to create a plan with an invalid period (a zero duration).
4. Verify each invalid plan is rejected with a validation error.
**Expected Result:** The invalid plans are rejected — the scope, the price, and the period are validated.
**Priority:** Critical

### TC-SA-11-06-007 — Plan lifecycle is audit-logged with the plan, action, and timestamp
**Type:** Positive
**Covers:** 6.1 → Audit logging of the plan lifecycle; Rule: plan lifecycle is audit-logged with the plan, action, and timestamp
**Preconditions:** Plan lifecycle events have occurred (creation, edit, deactivation).
**Steps:**
1. Open the audit trail and filter by "plan lifecycle".
2. Verify entries show the plan, the action, and the timestamp.
**Expected Result:** The plan lifecycle is audit-logged with the plan, action, and timestamp.
**Priority:** Critical

### TC-SA-11-06-008 — A deactivated plan is not offered (the new subscribers cannot subscribe); the existing subscribers are handled
**Type:** Negative
**Covers:** 6.1 → Rule: a deactivated plan is not offered (the new subscribers cannot subscribe); the existing subscribers are handled
**Preconditions:** A plan is deactivated.
**Steps:**
1. As a new learner, attempt to subscribe to the deactivated plan.
2. Verify the subscription is blocked (the plan is not offered).
3. Verify the existing subscribers are still handled.
**Expected Result:** The deactivated plan is not offered — the new subscribers cannot subscribe; the existing subscribers are handled.
**Priority:** Critical

## 6.2 Define Features and Limits per Plan (e.g., AI Assistant Question Limits)

### TC-SA-11-06-009 — Feature definition: the features per plan (the content access, the AI assistant, the mentorship); the features are the plan's scope
**Type:** Positive
**Covers:** 6.2 → Feature definition: the features per plan (the content access, the AI assistant, the mentorship); Rule: the feature definition is the features per plan (the content access, the AI assistant, the mentorship); the features are the plan's scope
**Preconditions:** The Super Admin opens the plan configuration.
**Steps:**
1. Define the features per plan: the content access, the AI assistant, the mentorship.
2. Save the feature definition.
3. Verify the features are the plan's scope.
**Expected Result:** The features are defined per plan — the content access, the AI assistant, and the mentorship are the plan's scope.
**Priority:** Critical

### TC-SA-11-06-010 — Limit definition: the limits per plan (the AI assistant question limit, the download cap, the concurrent users); the limits are the plan's boundaries
**Type:** Positive
**Covers:** 6.2 → Limit definition: the limits per plan (the AI assistant question limit, the download cap, the concurrent users); Rule: the limit definition is the limits per plan (the AI assistant question limit, the download cap, the concurrent users); the limits are the plan's boundaries
**Preconditions:** The Super Admin opens the plan configuration.
**Steps:**
1. Define the limits per plan: the AI assistant question limit, the download cap, the concurrent users.
2. Save the limit definition.
3. Verify the limits are the plan's boundaries.
**Expected Result:** The limits are defined per plan — the AI assistant question limit, the download cap, and the concurrent users are the plan's boundaries.
**Priority:** Critical

### TC-SA-11-06-011 — Feature scope: the features the plan includes (the plan's scope)
**Type:** Positive
**Covers:** 6.2 → Feature scope: the features the plan includes (the plan's scope)
**Preconditions:** A plan's features are defined.
**Steps:**
1. Open the plan's feature scope.
2. Verify the features the plan includes are shown.
3. Verify the feature scope is the plan's scope.
**Expected Result:** The feature scope is shown — the features the plan include are the plan's scope.
**Priority:** High

### TC-SA-11-06-012 — Limit scope: the limits the plan has (the plan's boundaries)
**Type:** Positive
**Covers:** 6.2 → Limit scope: the limits the plan has (the plan's boundaries)
**Preconditions:** A plan's limits are defined.
**Steps:**
1. Open the plan's limit scope.
2. Verify the limits the plan has are shown.
3. Verify the limit scope is the plan's boundaries.
**Expected Result:** The limit scope is shown — the limits the plan has are the plan's boundaries.
**Priority:** High

### TC-SA-11-06-013 — Plan differentiation: the plans differentiated by the features and the limits (the free vs. the premium); the differentiation is the value
**Type:** Negative
**Covers:** 6.2 → Plan differentiation: the plans differentiated by the features and the limits (the free vs. the premium); Rule: the plan differentiation is by the features and the limits (the free vs. the premium); the differentiation is the value
**Preconditions:** Multiple plans are defined (the free vs. the premium).
**Steps:**
1. Compare the free plan to the premium plan.
2. Verify the plans are differentiated by the features and the limits.
3. Verify the differentiation is the value.
**Expected Result:** The plans are differentiated by the features and the limits — the free vs. the premium is the value.
**Priority:** High

### TC-SA-11-06-014 — Limit enforcement: the limits enforced (the AI assistant question limit, the download cap); the enforcement is the limit
**Type:** Negative
**Covers:** 6.2 → Limit enforcement: the limits enforced (the AI assistant question limit, the download cap); Rule: the limit enforcement is the boundary (the AI assistant question limit, the download cap); the enforcement is the limit
**Preconditions:** A learner is on a plan with limits (the AI assistant question limit, the download cap).
**Steps:**
1. As the learner, attempt to exceed the AI assistant question limit.
2. Attempt to exceed the download cap.
3. Verify the limits are enforced (the excess is blocked).
**Expected Result:** The limits are enforced — the AI assistant question limit and the download cap are the boundaries.
**Priority:** Critical

### TC-SA-11-06-015 — Feature/limit definition is audit-logged with the plan, features, limits, and timestamp
**Type:** Positive
**Covers:** 6.2 → Audit logging of the feature/limit definition; Rule: feature/limit definition is audit-logged with the plan, features, limits, and timestamp
**Preconditions:** Feature/limit definition events have occurred.
**Steps:**
1. Open the audit trail and filter by "feature/limit definition".
2. Verify entries show the plan, the features, the limits, and the timestamp.
**Expected Result:** The feature/limit definition is audit-logged with the plan, features, limits, and timestamp.
**Priority:** Critical

### TC-SA-11-06-016 — A limit breach (the AI assistant question limit reached) triggers the notification (the limit reached, the upgrade prompt); the limit is the upgrade trigger
**Type:** Negative
**Covers:** 6.2 → Rule: a limit breach (the AI assistant question limit reached) triggers the notification (the limit reached, the upgrade prompt); the limit is the upgrade trigger
**Preconditions:** A learner is on a plan with an AI assistant question limit and reaches the limit.
**Steps:**
1. As the learner, reach the AI assistant question limit.
2. Verify the learner is notified (the limit reached, the upgrade prompt).
3. Verify the limit is the upgrade trigger.
**Expected Result:** The limit breach triggers the notification (the limit reached, the upgrade prompt) — the limit is the upgrade trigger.
**Priority:** Critical

## 6.3 Plan Visibility and Availability Control

### TC-SA-11-06-017 — Plan visibility: the plans shown to the learners (the visible plans); the visibility is the exposure
**Type:** Positive
**Covers:** 6.3 → Plan visibility: the plans shown to the learners (the visible plans); Rule: the plan visibility is the shown to the learners (the visible plans); the visibility is the exposure
**Preconditions:** Multiple plans exist with visibility set.
**Steps:**
1. As a learner, open the plans page.
2. Verify the visible plans are shown.
3. Verify the visibility is the exposure.
**Expected Result:** The visible plans are shown to the learners — the visibility is the exposure.
**Priority:** Critical

### TC-SA-11-06-018 — Plan availability: the plans that can be subscribed to (the available plans); the availability is the subscription
**Type:** Positive
**Covers:** 6.3 → Plan availability: the plans that can be subscribed to (the available plans); Rule: the plan availability is the can be subscribed to (the available plans); the availability is the subscription
**Preconditions:** Multiple plans exist with availability set.
**Steps:**
1. As a learner, attempt to subscribe to an available plan.
2. Verify the subscription is allowed.
3. Verify the availability is the subscription.
**Expected Result:** The available plans can be subscribed to — the availability is the subscription.
**Priority:** Critical

### TC-SA-11-06-019 — Visibility control: the visibility set (the visible, the hidden)
**Type:** Positive
**Covers:** 6.3 → Visibility control: the visibility set (the visible, the hidden)
**Preconditions:** The Super Admin opens the plan configuration.
**Steps:**
1. Set a plan's visibility to visible.
2. Set another plan's visibility to hidden.
3. Verify the visibility is set (the visible, the hidden).
**Expected Result:** The visibility is set — the visible and the hidden plans are controlled.
**Priority:** High

### TC-SA-11-06-020 — Availability control: the availability set (the available, the unavailable)
**Type:** Positive
**Covers:** 6.3 → Availability control: the availability set (the available, the unavailable)
**Preconditions:** The Super Admin opens the plan configuration.
**Steps:**
1. Set a plan's availability to available.
2. Set another plan's availability to unavailable.
3. Verify the availability is set (the available, the unavailable).
**Expected Result:** The availability is set — the available and the unavailable plans are controlled.
**Priority:** High

### TC-SA-11-06-021 — Plan state: the plan's state (the visible and available, the visible but unavailable, the hidden but available); the state is the control
**Type:** Positive
**Covers:** 6.3 → Plan state: the plan's state (the visible and available, the visible but unavailable, the hidden but available); Rule: the plan state is the visible and available, the visible but unavailable, or the hidden but available; the state is the control
**Preconditions:** Multiple plans exist with different states.
**Steps:**
1. Set a plan to visible and available.
2. Set another plan to visible but unavailable.
3. Set another plan to hidden but available.
4. Verify each plan's state is set correctly.
**Expected Result:** The plan states are set — the visible and available, the visible but unavailable, and the hidden but available are the control.
**Priority:** Critical

### TC-SA-11-06-022 — State change: the state changed (the visibility, the availability); the change is recorded
**Type:** Positive
**Covers:** 6.3 → State change: the state changed (the visibility, the availability); Rule: a state change (the visibility, the availability) is recorded (the change, the time); it is auditable
**Preconditions:** A plan has a state.
**Steps:**
1. Change the plan's state (the visibility, the availability).
2. Verify the state is changed.
3. Verify the change is recorded and auditable.
**Expected Result:** The state is changed (the visibility, the availability) — the change is recorded and auditable.
**Priority:** High

### TC-SA-11-06-023 — State changes are audit-logged with the plan, state, and timestamp
**Type:** Positive
**Covers:** 6.3 → Audit logging of the state changes; Rule: state changes are audit-logged with the plan, state, and timestamp
**Preconditions:** State change events have occurred.
**Steps:**
1. Open the audit trail and filter by "plan state".
2. Verify entries show the plan, the state, and the timestamp.
**Expected Result:** The state changes are audit-logged with the plan, state, and timestamp.
**Priority:** Critical

### TC-SA-11-06-024 — A visible but unavailable plan (the coming soon) is shown but not subscribed; the state is the control
**Type:** Negative
**Covers:** 6.3 → Rule: a visible but unavailable plan (the coming soon) is shown but not subscribed; the state is the control
**Preconditions:** A plan is set to visible but unavailable (the coming soon).
**Steps:**
1. As a learner, verify the plan is shown (visible).
2. Attempt to subscribe to the plan.
3. Verify the subscription is blocked (unavailable).
**Expected Result:** The visible but unavailable plan is shown but not subscribed — the state is the control.
**Priority:** Critical
