# 1. Invoices & Payment History — Test Cases

User Type: **Training Institute**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: invoices_payment_history.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 |
|---------|--------------------|----------|
| 1.1 | Invoice list | TC-TI-5-01-001 |
| 1.1 | Date, amount, status, and period per invoice | TC-TI-5-01-002 |
| 1.1 | Invoice line items | TC-TI-5-01-003 |
| 1.1 | Tax and total shown | TC-TI-5-01-004 |
| 1.1 | Filter by status or period | TC-TI-5-01-005 |
| 1.1 | Invoices paginated | TC-TI-5-01-006 |
| 1.1 | Invoices available on web and mobile | TC-TI-5-01-007 |
| 1.1 | Invoices event logging (viewed) | TC-TI-5-01-008 |
| 1.1 | Audit logging of the invoice list and details | TC-TI-5-01-009 |
| 1.1 | Rule: The invoices are filterable by status or period. | TC-TI-5-01-001 |
| 1.1 | Rule: The line items break down the charges. | TC-TI-5-01-002 |
| 1.1 | Rule: Invoices events (viewed) are logged with the account and the timestamp. | TC-TI-5-01-003 |
| 1.1 | Rule: The invoice list and details is audit-logged with the account and the timestamp. | TC-TI-5-01-004 |
| 1.2 | Download an invoice | TC-TI-5-01-010 |
| 1.2 | Invoice document format | TC-TI-5-01-011 |
| 1.2 | Share an invoice by link | TC-TI-5-01-012 |
| 1.2 | Link access controlled | TC-TI-5-01-013 |
| 1.2 | Download includes full details | TC-TI-5-01-014 |
| 1.2 | Download history shown | TC-TI-5-01-015 |
| 1.2 | Download available on web and mobile | TC-TI-5-01-016 |
| 1.2 | Download event logging (downloaded, shared) | TC-TI-5-01-017 |
| 1.2 | Audit logging of the invoice download and sharing | TC-TI-5-01-018 |
| 1.2 | Rule: The share link access is controlled and expirable. | TC-TI-5-01-010 |
| 1.2 | Rule: The download includes the full invoice details. | TC-TI-5-01-011 |
| 1.2 | Rule: Download events (downloaded, shared) are logged with the account and the timestamp. | TC-TI-5-01-012 |
| 1.2 | Rule: The invoice download and sharing is audit-logged with the account and the timestamp. | TC-TI-5-01-013 |
| 1.3 | Payment history list | TC-TI-5-01-019 |
| 1.3 | Date, amount, method, and status per payment | TC-TI-5-01-020 |
| 1.3 | Filter by period | TC-TI-5-01-021 |
| 1.3 | Payment details view | TC-TI-5-01-022 |
| 1.3 | History paginated | TC-TI-5-01-023 |
| 1.3 | Export the history | TC-TI-5-01-024 |
| 1.3 | History available on web and mobile | TC-TI-5-01-025 |
| 1.3 | History event logging (viewed, exported) | TC-TI-5-01-026 |
| 1.3 | Audit logging of the payment history | TC-TI-5-01-027 |
| 1.3 | Rule: The history is filterable by period. | TC-TI-5-01-019 |
| 1.3 | Rule: The history can be exported. | TC-TI-5-01-020 |
| 1.3 | Rule: History events (viewed, exported) are logged with the account and the timestamp. | TC-TI-5-01-021 |
| 1.3 | Rule: The payment history is audit-logged with the account and the timestamp. | TC-TI-5-01-022 |

## 1.1 Invoice List & Details

### TC-TI-5-01-001 — Invoice list
**Type:** Positive
**Covers:** 1.1 → Invoice list; Rule: The invoices are filterable by status or period.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Invoice list.
2. Observe the result and verify the full behavior: Invoice list.
**Expected Result:** Invoice list — delivered exactly as documented.
**Priority:** Critical

### TC-TI-5-01-002 — Date, amount, status, and period per invoice
**Type:** Positive
**Covers:** 1.1 → Date, amount, status, and period per invoice; Rule: The line items break down the charges.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Date, amount, status, and period per invoice.
2. Observe the result and verify the full behavior: Date, amount, status, and period per invoice.
**Expected Result:** Date, amount, status, and period per invoice — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-003 — Invoice line items
**Type:** Positive
**Covers:** 1.1 → Invoice line items; Rule: Invoices events (viewed) are logged with the account and the timestamp.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Invoice line items.
2. Observe the result and verify the full behavior: Invoice line items.
**Expected Result:** Invoice line items — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-004 — Tax and total shown
**Type:** Positive
**Covers:** 1.1 → Tax and total shown; Rule: The invoice list and details is audit-logged with the account and the timestamp.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Tax and total shown.
2. Observe the result and verify the full behavior: Tax and total shown.
**Expected Result:** Tax and total shown — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-005 — Filter by status or period
**Type:** Positive
**Covers:** 1.1 → Filter by status or period
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Filter by status or period.
2. Observe the result and verify the full behavior: Filter by status or period.
**Expected Result:** Filter by status or period — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-006 — Invoices paginated
**Type:** Positive
**Covers:** 1.1 → Invoices paginated
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Invoices paginated.
2. Observe the result and verify the full behavior: Invoices paginated.
**Expected Result:** Invoices paginated — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-007 — Invoices available on web and mobile
**Type:** Positive
**Covers:** 1.1 → Invoices available on web and mobile
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Invoices available on web and mobile.
2. Observe the result and verify the full behavior: Invoices available on web and mobile.
**Expected Result:** Invoices available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-008 — Invoices event logging (viewed)
**Type:** Positive
**Covers:** 1.1 → Invoices event logging (viewed)
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Invoices event logging (viewed).
2. Observe the result and verify the full behavior: Invoices event logging (viewed).
**Expected Result:** Invoices event logging (viewed) — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-009 — Audit logging of the invoice list and details
**Type:** Positive
**Covers:** 1.1 → Audit logging of the invoice list and details
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, perform the invoice list and details action.
2. Open the audit log and verify the entry for the action.
**Expected Result:** The invoice list and details action is recorded in the audit log with the account and the timestamp.
**Priority:** Critical


## 1.2 Invoice Download & Sharing

### TC-TI-5-01-010 — Download an invoice
**Type:** Positive
**Covers:** 1.2 → Download an invoice; Rule: The share link access is controlled and expirable.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Download an invoice.
2. Observe the result and verify the full behavior: Download an invoice.
**Expected Result:** Download an invoice — delivered exactly as documented.
**Priority:** Critical

### TC-TI-5-01-011 — Invoice document format
**Type:** Positive
**Covers:** 1.2 → Invoice document format; Rule: The download includes the full invoice details.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Invoice document format.
2. Observe the result and verify the full behavior: Invoice document format.
**Expected Result:** Invoice document format — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-012 — Share an invoice by link
**Type:** Positive
**Covers:** 1.2 → Share an invoice by link; Rule: Download events (downloaded, shared) are logged with the account and the timestamp.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Share an invoice by link.
2. Observe the result and verify the full behavior: Share an invoice by link.
**Expected Result:** Share an invoice by link — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-013 — Link access controlled
**Type:** Positive
**Covers:** 1.2 → Link access controlled; Rule: The invoice download and sharing is audit-logged with the account and the timestamp.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Link access controlled.
2. Observe the result and verify the full behavior: Link access controlled.
**Expected Result:** Link access controlled — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-014 — Download includes full details
**Type:** Positive
**Covers:** 1.2 → Download includes full details
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Download includes full details.
2. Observe the result and verify the full behavior: Download includes full details.
**Expected Result:** Download includes full details — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-015 — Download history shown
**Type:** Positive
**Covers:** 1.2 → Download history shown
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Download history shown.
2. Observe the result and verify the full behavior: Download history shown.
**Expected Result:** Download history shown — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-016 — Download available on web and mobile
**Type:** Positive
**Covers:** 1.2 → Download available on web and mobile
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Download available on web and mobile.
2. Observe the result and verify the full behavior: Download available on web and mobile.
**Expected Result:** Download available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-017 — Download event logging (downloaded, shared)
**Type:** Positive
**Covers:** 1.2 → Download event logging (downloaded, shared)
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Download event logging (downloaded, shared).
2. Observe the result and verify the full behavior: Download event logging (downloaded, shared).
**Expected Result:** Download event logging (downloaded, shared) — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-018 — Audit logging of the invoice download and sharing
**Type:** Positive
**Covers:** 1.2 → Audit logging of the invoice download and sharing
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, perform the invoice download and sharing action.
2. Open the audit log and verify the entry for the action.
**Expected Result:** The invoice download and sharing action is recorded in the audit log with the account and the timestamp.
**Priority:** Critical


## 1.3 Payment History

### TC-TI-5-01-019 — Payment history list
**Type:** Positive
**Covers:** 1.3 → Payment history list; Rule: The history is filterable by period.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Payment history list.
2. Observe the result and verify the full behavior: Payment history list.
**Expected Result:** Payment history list — delivered exactly as documented.
**Priority:** Critical

### TC-TI-5-01-020 — Date, amount, method, and status per payment
**Type:** Positive
**Covers:** 1.3 → Date, amount, method, and status per payment; Rule: The history can be exported.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Date, amount, method, and status per payment.
2. Observe the result and verify the full behavior: Date, amount, method, and status per payment.
**Expected Result:** Date, amount, method, and status per payment — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-021 — Filter by period
**Type:** Positive
**Covers:** 1.3 → Filter by period; Rule: History events (viewed, exported) are logged with the account and the timestamp.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Filter by period.
2. Observe the result and verify the full behavior: Filter by period.
**Expected Result:** Filter by period — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-022 — Payment details view
**Type:** Positive
**Covers:** 1.3 → Payment details view; Rule: The payment history is audit-logged with the account and the timestamp.
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Payment details view.
2. Observe the result and verify the full behavior: Payment details view.
**Expected Result:** Payment details view — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-023 — History paginated
**Type:** Positive
**Covers:** 1.3 → History paginated
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: History paginated.
2. Observe the result and verify the full behavior: History paginated.
**Expected Result:** History paginated — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-024 — Export the history
**Type:** Positive
**Covers:** 1.3 → Export the history
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: Export the history.
2. Observe the result and verify the full behavior: Export the history.
**Expected Result:** Export the history — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-025 — History available on web and mobile
**Type:** Positive
**Covers:** 1.3 → History available on web and mobile
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: History available on web and mobile.
2. Observe the result and verify the full behavior: History available on web and mobile.
**Expected Result:** History available on web and mobile — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-026 — History event logging (viewed, exported)
**Type:** Positive
**Covers:** 1.3 → History event logging (viewed, exported)
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, set up the precondition and perform: History event logging (viewed, exported).
2. Observe the result and verify the full behavior: History event logging (viewed, exported).
**Expected Result:** History event logging (viewed, exported) — delivered exactly as documented.
**Priority:** High

### TC-TI-5-01-027 — Audit logging of the payment history
**Type:** Positive
**Covers:** 1.3 → Audit logging of the payment history
**Preconditions:** A Training Institute account is active and the Training Institute is in the state required for this behavior.
**Steps:**
1. As a Training Institute, perform the payment history action.
2. Open the audit log and verify the entry for the action.
**Expected Result:** The payment history action is recorded in the audit log with the account and the timestamp.
**Priority:** Critical
