# 3. Auto-Renewal & Cancellation — Test Cases

User Type: **Student**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: auto_renewal_cancellation.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 |
|---------|--------------------|----------|
| 3.1 Auto-Renewal Settings | Turn auto-renewal on or off | TC-ST-07-03-001 |
| 3.1 Auto-Renewal Settings | Next renewal date and amount shown | TC-ST-07-03-002 |
| 3.1 Auto-Renewal Settings | Notification before a renewal | TC-ST-07-03-003 |
| 3.1 Auto-Renewal Settings | Auto-renewal renews the subscription at period end | TC-ST-07-03-004 |
| 3.1 Auto-Renewal Settings | Change the payment method used for renewal | TC-ST-07-03-005 |
| 3.1 Auto-Renewal Settings | Auto-renewal status visible on the subscription | TC-ST-07-03-006 |
| 3.1 Auto-Renewal Settings | Auto-renewal event logging (enabled, disabled, renewed) | TC-ST-07-03-007 |
| 3.1 Auto-Renewal Settings | Audit logging of the auto-renewal settings | TC-ST-07-03-008 |
| 3.1 Auto-Renewal Settings | Rule: Auto-renewal, when on, renews the subscription at the end of each period. | TC-ST-07-03-001 |
| 3.1 Auto-Renewal Settings | Rule: A notification is sent before a renewal (per the platform's lead time). | TC-ST-07-03-002 |
| 3.1 Auto-Renewal Settings | Rule: Turning auto-renewal off stops future renewals; the current period runs out. | TC-ST-07-03-003 |
| 3.1 Auto-Renewal Settings | Rule: The payment method for renewal can be changed. | TC-ST-07-03-004 |
| 3.1 Auto-Renewal Settings | Rule: Auto-renewal events (enabled, disabled, renewed) are logged with the subscription and the timestamp. | TC-ST-07-03-005 |
| 3.1 Auto-Renewal Settings | Rule: The auto-renewal settings is audit-logged with the account, the subscription, and the timestamp. | TC-ST-07-03-006 |
| 3.2 Cancel Subscription | Cancel auto-renewal | TC-ST-07-03-009 |
| 3.2 Cancel Subscription | Cancel the subscription | TC-ST-07-03-010 |
| 3.2 Cancel Subscription | Keep access until the end of the paid period (where applicable) | TC-ST-07-03-011 |
| 3.2 Cancel Subscription | Cancellation confirmation | TC-ST-07-03-012 |
| 3.2 Cancel Subscription | Access ends at the period end after cancellation | TC-ST-07-03-013 |
| 3.2 Cancel Subscription | Cancel reason (optional) | TC-ST-07-03-014 |
| 3.2 Cancel Subscription | Cancel event logging (cancelled, reason) | TC-ST-07-03-015 |
| 3.2 Cancel Subscription | Audit logging of the cancel subscription | TC-ST-07-03-016 |
| 3.2 Cancel Subscription | Rule: Cancellation stops future renewals. | TC-ST-07-03-009 |
| 3.2 Cancel Subscription | Rule: Access is retained until the end of the paid period where applicable. | TC-ST-07-03-010 |
| 3.2 Cancel Subscription | Rule: A cancel reason is optional and recorded. | TC-ST-07-03-011 |
| 3.2 Cancel Subscription | Rule: The cancellation is confirmed to the Student. | TC-ST-07-03-012 |
| 3.2 Cancel Subscription | Rule: Cancel events (cancelled, reason) are logged with the subscription and the timestamp. | TC-ST-07-03-013 |
| 3.2 Cancel Subscription | Rule: The cancel subscription is audit-logged with the account, the subscription, and the timestamp. | TC-ST-07-03-014 |
| 3.3 Reactivation and Grace Period | Reactivate a cancelled subscription | TC-ST-07-03-017 |
| 3.3 Reactivation and Grace Period | Grace period after a failed renewal | TC-ST-07-03-018 |
| 3.3 Reactivation and Grace Period | Fix the payment during the grace period to keep access | TC-ST-07-03-019 |
| 3.3 Reactivation and Grace Period | Access suspended after the grace period ends | TC-ST-07-03-020 |
| 3.3 Reactivation and Grace Period | Reactivation restores access immediately | TC-ST-07-03-021 |
| 3.3 Reactivation and Grace Period | Grace period notifications | TC-ST-07-03-022 |
| 3.3 Reactivation and Grace Period | Reactivation event logging (reactivated, grace entered, grace ended) | TC-ST-07-03-023 |
| 3.3 Reactivation and Grace Period | Audit logging of the reactivation and grace period | TC-ST-07-03-024 |
| 3.3 Reactivation and Grace Period | Rule: A grace period follows a failed renewal; its length is set by the platform. | TC-ST-07-03-017 |
| 3.3 Reactivation and Grace Period | Rule: Fixing the payment during the grace period keeps access. | TC-ST-07-03-018 |
| 3.3 Reactivation and Grace Period | Rule: Access is suspended after the grace period ends without payment. | TC-ST-07-03-019 |
| 3.3 Reactivation and Grace Period | Rule: Reactivation restores access immediately. | TC-ST-07-03-020 |
| 3.3 Reactivation and Grace Period | Rule: Reactivation events (reactivated, grace entered, grace ended) are logged with the subscription and the timestamp. | TC-ST-07-03-021 |
| 3.3 Reactivation and Grace Period | Rule: The reactivation and grace period is audit-logged with the account, the subscription, and the timestamp. | TC-ST-07-03-022 |

## 3.1 Auto-Renewal Settings

### TC-ST-07-03-001 — Turn auto-renewal on or off
**Type:** Positive
**Covers:** 3.1 → Turn auto-renewal on or off; Rule: Auto-renewal, when on, renews the subscription at the end of each period.
**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: Turn auto-renewal on or off.
2. Observe the result and verify the full behavior: Turn auto-renewal on or off.
**Expected Result:** Turn auto-renewal on or off — delivered exactly as documented.
**Priority:** Critical

### TC-ST-07-03-002 — Next renewal date and amount shown
**Type:** Positive
**Covers:** 3.1 → Next renewal date and amount shown; Rule: A notification is sent before a renewal (per the platform's lead time).
**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 renewal date and amount shown.
2. Observe the result and verify the full behavior: Next renewal date and amount shown.
**Expected Result:** Next renewal date and amount shown — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-003 — Notification before a renewal
**Type:** Positive
**Covers:** 3.1 → Notification before a renewal; Rule: Turning auto-renewal off stops future renewals; the current period runs out.
**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: Notification before a renewal.
2. Observe the result and verify the full behavior: Notification before a renewal.
**Expected Result:** Notification before a renewal — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-004 — Auto-renewal renews the subscription at period end
**Type:** Positive
**Covers:** 3.1 → Auto-renewal renews the subscription at period end; Rule: The payment method for renewal can be changed.
**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: Auto-renewal renews the subscription at period end.
2. Observe the result and verify the full behavior: Auto-renewal renews the subscription at period end.
**Expected Result:** Auto-renewal renews the subscription at period end — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-005 — Change the payment method used for renewal
**Type:** Positive
**Covers:** 3.1 → Change the payment method used for renewal; Rule: Auto-renewal events (enabled, disabled, renewed) are logged with the subscription 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: Change the payment method used for renewal.
2. Observe the result and verify the full behavior: Change the payment method used for renewal.
**Expected Result:** Change the payment method used for renewal — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-006 — Auto-renewal status visible on the subscription
**Type:** Positive
**Covers:** 3.1 → Auto-renewal status visible on the subscription; Rule: The auto-renewal settings is audit-logged with the account, the subscription, 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: Auto-renewal status visible on the subscription.
2. Observe the result and verify the full behavior: Auto-renewal status visible on the subscription.
**Expected Result:** Auto-renewal status visible on the subscription — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-007 — Auto-renewal event logging (enabled, disabled, renewed)
**Type:** Positive
**Covers:** 3.1 → Auto-renewal event logging (enabled, disabled, renewed)
**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: Auto-renewal event logging (enabled.
2. Observe the result and verify the full behavior: Auto-renewal event logging (enabled, disabled, renewed).
**Expected Result:** Auto-renewal event logging (enabled, disabled, renewed) — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-008 — Audit logging of the auto-renewal settings
**Type:** Positive
**Covers:** 3.1 → Audit logging of the auto-renewal settings
**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 auto-renewal settings.
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

## 3.2 Cancel Subscription

### TC-ST-07-03-009 — Cancel auto-renewal
**Type:** Positive
**Covers:** 3.2 → Cancel auto-renewal; Rule: Cancellation stops future renewals.
**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: Cancel auto-renewal.
2. Observe the result and verify the full behavior: Cancel auto-renewal.
**Expected Result:** Cancel auto-renewal — delivered exactly as documented.
**Priority:** Critical

### TC-ST-07-03-010 — Cancel the subscription
**Type:** Positive
**Covers:** 3.2 → Cancel the subscription; Rule: Access is retained until the end of the paid period where applicable.
**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: Cancel the subscription.
2. Observe the result and verify the full behavior: Cancel the subscription.
**Expected Result:** Cancel the subscription — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-011 — Keep access until the end of the paid period (where applicable)
**Type:** Positive
**Covers:** 3.2 → Keep access until the end of the paid period (where applicable); Rule: A cancel reason is optional and recorded.
**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: Keep access until the end of the paid period (where applicable).
2. Observe the result and verify the full behavior: Keep access until the end of the paid period (where applicable).
**Expected Result:** Keep access until the end of the paid period (where applicable) — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-012 — Cancellation confirmation
**Type:** Positive
**Covers:** 3.2 → Cancellation confirmation; Rule: The cancellation is confirmed to the Student.
**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: Cancellation confirmation.
2. Observe the result and verify the full behavior: Cancellation confirmation.
**Expected Result:** Cancellation confirmation — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-013 — Access ends at the period end after cancellation
**Type:** Positive
**Covers:** 3.2 → Access ends at the period end after cancellation; Rule: Cancel events (cancelled, reason) are logged with the subscription 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: Access ends at the period end after cancellation.
2. Observe the result and verify the full behavior: Access ends at the period end after cancellation.
**Expected Result:** Access ends at the period end after cancellation — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-014 — Cancel reason (optional)
**Type:** Positive
**Covers:** 3.2 → Cancel reason (optional); Rule: The cancel subscription is audit-logged with the account, the subscription, 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: Cancel reason (optional).
2. Observe the result and verify the full behavior: Cancel reason (optional).
**Expected Result:** Cancel reason (optional) — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-015 — Cancel event logging (cancelled, reason)
**Type:** Positive
**Covers:** 3.2 → Cancel event logging (cancelled, reason)
**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: Cancel event logging (cancelled.
2. Observe the result and verify the full behavior: Cancel event logging (cancelled, reason).
**Expected Result:** Cancel event logging (cancelled, reason) — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-016 — Audit logging of the cancel subscription
**Type:** Positive
**Covers:** 3.2 → Audit logging of the cancel subscription
**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 cancel subscription.
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

## 3.3 Reactivation and Grace Period

### TC-ST-07-03-017 — Reactivate a cancelled subscription
**Type:** Positive
**Covers:** 3.3 → Reactivate a cancelled subscription; Rule: A grace period follows a failed renewal; its length is set by the platform.
**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: Reactivate a cancelled subscription.
2. Observe the result and verify the full behavior: Reactivate a cancelled subscription.
**Expected Result:** Reactivate a cancelled subscription — delivered exactly as documented.
**Priority:** Critical

### TC-ST-07-03-018 — Grace period after a failed renewal
**Type:** Positive
**Covers:** 3.3 → Grace period after a failed renewal; Rule: Fixing the payment during the grace period keeps access.
**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: Grace period after a failed renewal.
2. Observe the result and verify the full behavior: Grace period after a failed renewal.
**Expected Result:** Grace period after a failed renewal — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-019 — Fix the payment during the grace period to keep access
**Type:** Positive
**Covers:** 3.3 → Fix the payment during the grace period to keep access; Rule: Access is suspended after the grace period ends without payment.
**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: Fix the payment during the grace period to keep access.
2. Observe the result and verify the full behavior: Fix the payment during the grace period to keep access.
**Expected Result:** Fix the payment during the grace period to keep access — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-020 — Access suspended after the grace period ends
**Type:** Positive
**Covers:** 3.3 → Access suspended after the grace period ends; Rule: Reactivation restores access immediately.
**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: Access suspended after the grace period ends.
2. Observe the result and verify the full behavior: Access suspended after the grace period ends.
**Expected Result:** Access suspended after the grace period ends — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-021 — Reactivation restores access immediately
**Type:** Positive
**Covers:** 3.3 → Reactivation restores access immediately; Rule: Reactivation events (reactivated, grace entered, grace ended) are logged with the subscription 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: Reactivation restores access immediately.
2. Observe the result and verify the full behavior: Reactivation restores access immediately.
**Expected Result:** Reactivation restores access immediately — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-022 — Grace period notifications
**Type:** Positive
**Covers:** 3.3 → Grace period notifications; Rule: The reactivation and grace period is audit-logged with the account, the subscription, 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: Grace period notifications.
2. Observe the result and verify the full behavior: Grace period notifications.
**Expected Result:** Grace period notifications — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-023 — Reactivation event logging (reactivated, grace entered, grace ended)
**Type:** Positive
**Covers:** 3.3 → Reactivation event logging (reactivated, grace entered, grace ended)
**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: Reactivation event logging (reactivated.
2. Observe the result and verify the full behavior: Reactivation event logging (reactivated, grace entered, grace ended).
**Expected Result:** Reactivation event logging (reactivated, grace entered, grace ended) — delivered exactly as documented.
**Priority:** High

### TC-ST-07-03-024 — Audit logging of the reactivation and grace period
**Type:** Positive
**Covers:** 3.3 → Audit logging of the reactivation and grace period
**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 reactivation and grace period.
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
