# 7. Price History & Control — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: price_history_control.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 |
|---------|--------------------|----------|
| 7.1 Update Prices Over Time | Price update: the update (the item, the new price, the effective date) | TC-SA-12-07-001 |
| 7.1 Update Prices Over Time | Update scope: the scope (the item, the price) | TC-SA-12-07-002 |
| 7.1 Update Prices Over Time | Effective date: the date (the date the new price is effective) | TC-SA-12-07-003 |
| 7.1 Update Prices Over Time | Update definition: the definition (the item, the new price, the date) | TC-SA-12-07-001 |
| 7.1 Update Prices Over Time | Price application: the price applied (the new price is applied from the effective date) | TC-SA-12-07-004 |
| 7.1 Update Prices Over Time | Price record: the price recorded (the item, the old price, the new price, the date) | TC-SA-12-07-005 |
| 7.1 Update Prices Over Time | Audit logging of the price updates | TC-SA-12-07-006 |
| 7.1 Update Prices Over Time | Rule: the price update is per item (the item, the new price, the effective date); the update is explicit | TC-SA-12-07-001 |
| 7.1 Update Prices Over Time | Rule: the update scope is the item and the price; the scope is the item | TC-SA-12-07-002 |
| 7.1 Update Prices Over Time | Rule: the effective date is the timing (the date the new price is effective); the date is the control | TC-SA-12-07-003 |
| 7.1 Update Prices Over Time | Rule: a price update is recorded (the item, the old price, the new price, the date); it is auditable | TC-SA-12-07-005 |
| 7.1 Update Prices Over Time | Rule: the price updates are visible (the items, the old prices, the new prices, the dates); the price history is managed | TC-SA-12-07-007 |
| 7.1 Update Prices Over Time | Rule: price updates are audit-logged with the item, old price, new price, and timestamp | TC-SA-12-07-006 |
| 7.2 Control Price Visibility | Visibility rule: the rule (the item, the visibility, the scope) | TC-SA-12-07-008 |
| 7.2 Control Price Visibility | Visibility scope: the scope (the item, the region, the time) | TC-SA-12-07-009 |
| 7.2 Control Price Visibility | Visibility control: the control (the prices shown, the prices hidden) | TC-SA-12-07-010 |
| 7.2 Control Price Visibility | Rule definition: the rules (the item, the visibility, the scope) | TC-SA-12-07-011 |
| 7.2 Control Price Visibility | Visibility application: the visibility applied (the prices are shown or hidden per the rule) | TC-SA-12-07-012 |
| 7.2 Control Price Visibility | Visibility record: the visibility recorded (the item, the visibility, the scope, the time) | TC-SA-12-07-013 |
| 7.2 Control Price Visibility | Audit logging of the visibility rules and the applications | TC-SA-12-07-014 |
| 7.2 Control Price Visibility | Rule: the visibility rule is per item (the item, the visibility, the scope); the rule is explicit | TC-SA-12-07-008 |
| 7.2 Control Price Visibility | Rule: the visibility scope is the item, the region, and the time; the scope is the control | TC-SA-12-07-009 |
| 7.2 Control Price Visibility | Rule: the visibility control is the shown or the hidden; the control is the visibility | TC-SA-12-07-010 |
| 7.2 Control Price Visibility | Rule: a rule change (a visibility rule updated) is recorded (the new visibility, the new scope, the time); it is auditable | TC-SA-12-07-011 |
| 7.2 Control Price Visibility | Rule: the visibility rules are visible (the items, the visibilities, the scopes); the price visibility is managed | TC-SA-12-07-015 |
| 7.2 Control Price Visibility | Rule: visibility rules and applications are audit-logged with the item, visibility, and timestamp | TC-SA-12-07-014 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Grandfathering rule: the rule (the grandfathering, the duration, the scope) | TC-SA-12-07-016 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Grandfathering scope: the scope (the existing subscriptions, the old price) | TC-SA-12-07-017 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Grandfathering duration: the duration (the duration the old price is kept) | TC-SA-12-07-018 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Rule definition: the rules (the grandfathering, the duration, the scope) | TC-SA-12-07-019 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Grandfathering application: the grandfathering applied (the existing subscriptions keep the old price) | TC-SA-12-07-020 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Grandfathering record: the grandfathering recorded (the subscription, the old price, the duration, the time) | TC-SA-12-07-021 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Audit logging of the grandfathering rules and the applications | TC-SA-12-07-022 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Rule: the grandfathering rule is per subscription (the grandfathering, the duration, the scope); the rule is explicit | TC-SA-12-07-016 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Rule: the grandfathering scope is the existing subscriptions and the old price; the scope is the grandfathering | TC-SA-12-07-017 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Rule: the grandfathering duration is the period (the duration the old price is kept); the duration is the control | TC-SA-12-07-018 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Rule: a rule change (a grandfathering rule updated) is recorded (the new grandfathering, the new duration, the new scope, the time); it is auditable | TC-SA-12-07-019 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Rule: the grandfathering rules are visible (the subscriptions, the old prices, the durations); the grandfathering is managed | TC-SA-12-07-023 |
| 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable) | Rule: grandfathering rules and applications are audit-logged with the subscription, old price, and timestamp | TC-SA-12-07-022 |

## 7.1 Update Prices Over Time

### TC-SA-12-07-001 — Update definition: the definition (the item, the new price, the date); the update is explicit per item
**Type:** Positive
**Covers:** 7.1 → Price update: the update (the item, the new price, the effective date); Update definition: the definition (the item, the new price, the date); Rule: the price update is per item; the update is explicit
**Preconditions:** The Super Admin opens the price history & control.
**Steps:**
1. Define the price update: the item (the one the price is for), the new price, and the effective date.
2. Save the update.
3. Verify the price update is defined and explicit per item.
**Expected Result:** The price update is defined (the item, the new price, the effective date) — the update is explicit.
**Priority:** Critical

### TC-SA-12-07-002 — Update scope: the scope (the item, the price); the scope is the item
**Type:** Positive
**Covers:** 7.1 → Update scope: the scope (the item, the price); Rule: the update scope is the item and the price; the scope is the item
**Preconditions:** A price update is defined.
**Steps:**
1. Open the update scope.
2. Verify the scope is the item and the price.
3. Verify the scope is the item.
**Expected Result:** The update scope is the item and the price — the scope is the item.
**Priority:** High

### TC-SA-12-07-003 — Effective date: the date (the date the new price is effective); the date is the control
**Type:** Positive
**Covers:** 7.1 → Effective date: the date (the date the new price is effective); Rule: the effective date is the timing (the date the new price is effective); the date is the control
**Preconditions:** A price update is defined with an effective date.
**Steps:**
1. Open the effective date.
2. Verify the date is the date the new price is effective.
3. Verify the date is the control (the new price is not applied before the effective date).
**Expected Result:** The effective date is the date the new price is effective — the date is the control.
**Priority:** Critical

### TC-SA-12-07-004 — Price application: the price applied (the new price is applied from the effective date)
**Type:** Positive
**Covers:** 7.1 → Price application: the price applied (the new price is applied from the effective date)
**Preconditions:** A price update is defined with a future effective date.
**Steps:**
1. Before the effective date, verify the old price is still applied.
2. On/after the effective date, verify the new price is applied.
3. Verify the new price is applied from the effective date (not before).
**Expected Result:** The price is applied — the new price is applied from the effective date.
**Priority:** Critical

### TC-SA-12-07-005 — Price record: the price recorded (the item, the old price, the new price, the date); the record is auditable
**Type:** Positive
**Covers:** 7.1 → Price record: the price recorded (the item, the old price, the new price, the date); Rule: a price update is recorded (the item, the old price, the new price, the date); it is auditable
**Preconditions:** A price update has been applied.
**Steps:**
1. Open the price record.
2. Verify it shows the item, the old price, the new price, and the date.
3. Verify the record is auditable.
**Expected Result:** The price is recorded — the item, the old price, the new price, and the date are shown and auditable.
**Priority:** High

### TC-SA-12-07-006 — Price updates are audit-logged with the item, old price, new price, and timestamp
**Type:** Positive
**Covers:** 7.1 → Audit logging of the price updates; Rule: price updates are audit-logged with the item, old price, new price, and timestamp
**Preconditions:** Price update events have occurred.
**Steps:**
1. Open the audit trail and filter by "price update".
2. Verify entries show the item, the old price, the new price, and the timestamp.
**Expected Result:** The price updates are audit-logged with the item, old price, new price, and timestamp.
**Priority:** Critical

### TC-SA-12-07-007 — The price updates are visible (the items, the old prices, the new prices, the dates); the price history is managed
**Type:** Positive
**Covers:** 7.1 → Rule: the price updates are visible (the items, the old prices, the new prices, the dates); the price history is managed
**Preconditions:** Multiple price updates have been made.
**Steps:**
1. Open the price history view.
2. Verify the items, the old prices, the new prices, and the dates are visible.
3. Verify the price history is managed.
**Expected Result:** The price updates are visible — the items, the old prices, the new prices, and the dates are shown.
**Priority:** Medium

## 7.2 Control Price Visibility

### TC-SA-12-07-008 — Visibility rule: the rule (the item, the visibility, the scope); the rule is explicit per item
**Type:** Positive
**Covers:** 7.2 → Visibility rule: the rule (the item, the visibility, the scope); Rule: the visibility rule is per item; the rule is explicit
**Preconditions:** The Super Admin opens the price history & control.
**Steps:**
1. Define the visibility rule: the item, the visibility (shown or hidden), and the scope.
2. Save the rule.
3. Verify the visibility rule is live and explicit per item.
**Expected Result:** The visibility rule is defined (the item, the visibility, the scope) — the rule is explicit.
**Priority:** Critical

### TC-SA-12-07-009 — Visibility scope: the scope (the item, the region, the time); the scope is the control
**Type:** Positive
**Covers:** 7.2 → Visibility scope: the scope (the item, the region, the time); Rule: the visibility scope is the item, the region, and the time; the scope is the control
**Preconditions:** A visibility rule is defined.
**Steps:**
1. Open the visibility scope.
2. Verify the scope is the item, the region, and the time.
3. Verify the scope is the control (the visibility applies per region and time).
**Expected Result:** The visibility scope is the item, the region, and the time — the scope is the control.
**Priority:** High

### TC-SA-12-07-010 — Visibility control: the control (the prices shown, the prices hidden); the control is the visibility
**Type:** Negative
**Covers:** 7.2 → Visibility control: the control (the prices shown, the prices hidden); Rule: the visibility control is the shown or the hidden; the control is the visibility
**Preconditions:** A visibility rule is defined with the price hidden for a scope.
**Steps:**
1. As a learner in the hidden scope, view the item.
2. Verify the price is hidden (the prices hidden per the rule).
3. As a learner outside the scope, verify the price is shown (the prices shown per the rule).
**Expected Result:** The visibility control is applied — the prices are shown or hidden per the rule.
**Priority:** Critical

### TC-SA-12-07-011 — Rule definition: the rules (the item, the visibility, the scope); a rule change is recorded and auditable
**Type:** Positive
**Covers:** 7.2 → Rule definition: the rules (the item, the visibility, the scope); Rule: a rule change (a visibility rule updated) is recorded (the new visibility, the new scope, the time); it is auditable
**Preconditions:** The visibility rules are defined (the item, the visibility, the scope).
**Steps:**
1. Open the visibility rules and verify the item, the visibility, and the scope are defined.
2. Change a visibility rule (the new visibility, the new scope, the time).
3. Verify the change is recorded and auditable.
**Expected Result:** The visibility rules are defined (the item, the visibility, the scope) — a rule change is recorded and auditable.
**Priority:** High

### TC-SA-12-07-012 — Visibility application: the visibility applied (the prices are shown or hidden per the rule)
**Type:** Positive
**Covers:** 7.2 → Visibility application: the visibility applied (the prices are shown or hidden per the rule)
**Preconditions:** The visibility rules are live.
**Steps:**
1. As a learner, view the items.
2. Verify the prices are shown or hidden per the rule (the visibility applied).
3. Verify the visibility matches the rule's scope (the item, the region, the time).
**Expected Result:** The visibility is applied — the prices are shown or hidden per the rule.
**Priority:** Critical

### TC-SA-12-07-013 — Visibility record: the visibility recorded (the item, the visibility, the scope, the time); the record is the proof
**Type:** Positive
**Covers:** 7.2 → Visibility record: the visibility recorded (the item, the visibility, the scope, the time)
**Preconditions:** A visibility rule has been applied.
**Steps:**
1. Open the visibility record.
2. Verify it shows the item, the visibility, the scope, and the time.
**Expected Result:** The visibility is recorded — the item, the visibility, the scope, and the time are shown.
**Priority:** High

### TC-SA-12-07-014 — Visibility rules and applications are audit-logged with the item, visibility, and timestamp
**Type:** Positive
**Covers:** 7.2 → Audit logging of the visibility rules and the applications; Rule: visibility rules and applications are audit-logged with the item, visibility, and timestamp
**Preconditions:** Visibility rule and application events have occurred.
**Steps:**
1. Open the audit trail and filter by "price visibility".
2. Verify entries show the item, the visibility, and the timestamp.
**Expected Result:** The visibility rules and applications are audit-logged with the item, visibility, and timestamp.
**Priority:** Critical

### TC-SA-12-07-015 — The visibility rules are visible (the items, the visibilities, the scopes); the price visibility is managed
**Type:** Positive
**Covers:** 7.2 → Rule: the visibility rules are visible (the items, the visibilities, the scopes); the price visibility is managed
**Preconditions:** Multiple visibility rules are defined.
**Steps:**
1. Open the visibility rules view.
2. Verify the items, the visibilities, and the scopes are visible.
3. Verify the price visibility is managed.
**Expected Result:** The visibility rules are visible — the items, the visibilities, and the scopes are shown.
**Priority:** Medium

## 7.3 Grandfather Existing Subscriptions at Old Prices (If Applicable)

### TC-SA-12-07-016 — Grandfathering rule: the rule (the grandfathering, the duration, the scope); the rule is explicit per subscription
**Type:** Positive
**Covers:** 7.3 → Grandfathering rule: the rule (the grandfathering, the duration, the scope); Rule: the grandfathering rule is per subscription; the rule is explicit
**Preconditions:** The Super Admin opens the price history & control.
**Steps:**
1. Define the grandfathering rule: the grandfathering, the duration, and the scope.
2. Save the rule.
3. Verify the grandfathering rule is live and explicit per subscription.
**Expected Result:** The grandfathering rule is defined (the grandfathering, the duration, the scope) — the rule is explicit.
**Priority:** Critical

### TC-SA-12-07-017 — Grandfathering scope: the scope (the existing subscriptions, the old price); the scope is the grandfathering
**Type:** Positive
**Covers:** 7.3 → Grandfathering scope: the scope (the existing subscriptions, the old price); Rule: the grandfathering scope is the existing subscriptions and the old price; the scope is the grandfathering
**Preconditions:** A grandfathering rule is defined.
**Steps:**
1. Open the grandfathering scope.
2. Verify the scope is the existing subscriptions and the old price.
3. Verify the scope is the grandfathering.
**Expected Result:** The grandfathering scope is the existing subscriptions and the old price — the scope is the grandfathering.
**Priority:** High

### TC-SA-12-07-018 — Grandfathering duration: the duration (the duration the old price is kept); the duration is the control
**Type:** Positive
**Covers:** 7.3 → Grandfathering duration: the duration (the duration the old price is kept); Rule: the grandfathering duration is the period (the duration the old price is kept); the duration is the control
**Preconditions:** A grandfathering rule is defined with a duration.
**Steps:**
1. Open the grandfathering duration.
2. Verify the duration is the duration the old price is kept.
3. Verify the duration is the control (the old price is kept for the duration, then the new price applies).
**Expected Result:** The grandfathering duration is the duration the old price is kept — the duration is the control.
**Priority:** Critical

### TC-SA-12-07-019 — Rule definition: the rules (the grandfathering, the duration, the scope); a rule change is recorded and auditable
**Type:** Positive
**Covers:** 7.3 → Rule definition: the rules (the grandfathering, the duration, the scope); Rule: a rule change (a grandfathering rule updated) is recorded (the new grandfathering, the new duration, the new scope, the time); it is auditable
**Preconditions:** The grandfathering rules are defined (the grandfathering, the duration, the scope).
**Steps:**
1. Open the grandfathering rules and verify the grandfathering, the duration, and the scope are defined.
2. Change a grandfathering rule (the new grandfathering, the new duration, the new scope, the time).
3. Verify the change is recorded and auditable.
**Expected Result:** The grandfathering rules are defined (the grandfathering, the duration, the scope) — a rule change is recorded and auditable.
**Priority:** High

### TC-SA-12-07-020 — Grandfathering application: the grandfathering applied (the existing subscriptions keep the old price)
**Type:** Positive
**Covers:** 7.3 → Grandfathering application: the grandfathering applied (the existing subscriptions keep the old price)
**Preconditions:** A price update has been made and a grandfathering rule is live.
**Steps:**
1. As a learner with an existing subscription, renew.
2. Verify the existing subscription keeps the old price (the grandfathering applied).
3. Verify the new price applies only to new subscriptions (or after the grandfathering duration).
**Expected Result:** The grandfathering is applied — the existing subscriptions keep the old price.
**Priority:** Critical

### TC-SA-12-07-021 — Grandfathering record: the grandfathering recorded (the subscription, the old price, the duration, the time); the record is the proof
**Type:** Positive
**Covers:** 7.3 → Grandfathering record: the grandfathering recorded (the subscription, the old price, the duration, the time)
**Preconditions:** A grandfathering has been applied.
**Steps:**
1. Open the grandfathering record.
2. Verify it shows the subscription, the old price, the duration, and the time.
**Expected Result:** The grandfathering is recorded — the subscription, the old price, the duration, and the time are shown.
**Priority:** High

### TC-SA-12-07-022 — Grandfathering rules and applications are audit-logged with the subscription, old price, and timestamp
**Type:** Positive
**Covers:** 7.3 → Audit logging of the grandfathering rules and the applications; Rule: grandfathering rules and applications are audit-logged with the subscription, old price, and timestamp
**Preconditions:** Grandfathering rule and application events have occurred.
**Steps:**
1. Open the audit trail and filter by "grandfathering".
2. Verify entries show the subscription, the old price, and the timestamp.
**Expected Result:** The grandfathering rules and applications are audit-logged with the subscription, old price, and timestamp.
**Priority:** Critical

### TC-SA-12-07-023 — The grandfathering rules are visible (the subscriptions, the old prices, the durations); the grandfathering is managed
**Type:** Positive
**Covers:** 7.3 → Rule: the grandfathering rules are visible (the subscriptions, the old prices, the durations); the grandfathering is managed
**Preconditions:** Multiple grandfathering rules are defined.
**Steps:**
1. Open the grandfathering rules view.
2. Verify the subscriptions, the old prices, and the durations are visible.
3. Verify the grandfathering is managed.
**Expected Result:** The grandfathering rules are visible — the subscriptions, the old prices, and the durations are shown.
**Priority:** Medium
