# 4. Data Portability — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: data_portability.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 |
|---------|--------------------|----------|
| 4.1 User Data Portability (User-Initiated Export) | Portability: the portability (the portability, the user, the data, the date) | TC-SA-23-04-001 |
| 4.1 User Data Portability (User-Initiated Export) | User: the user (the user, the name, the portability) | TC-SA-23-04-002 |
| 4.1 User Data Portability (User-Initiated Export) | Data: the data (the data of the user, the type, the date) | TC-SA-23-04-003 |
| 4.1 User Data Portability (User-Initiated Export) | Request: the request (the request of the user, the date) | TC-SA-23-04-004 |
| 4.1 User Data Portability (User-Initiated Export) | Portability status: the status (the completed, the in-progress, the failed) | TC-SA-23-04-005 |
| 4.1 User Data Portability (User-Initiated Export) | Portability count: the count (the count of the portabilities) | TC-SA-23-04-006 |
| 4.1 User Data Portability (User-Initiated Export) | Portability view: the view (the portabilities, the users, the data, the dates) | TC-SA-23-04-007 |
| 4.1 User Data Portability (User-Initiated Export) | Audit logging of the user data portability | TC-SA-23-04-008 |
| 4.1 User Data Portability (User-Initiated Export) | Rule: the portability is the freedom (the portability, the user, the data, the date); the portability is the right | TC-SA-23-04-001 |
| 4.1 User Data Portability (User-Initiated Export) | Rule: the user is the owner (the user, the name, the portability); the user is the subject | TC-SA-23-04-002 |
| 4.1 User Data Portability (User-Initiated Export) | Rule: the data is the personal data (the data of the user, the type, the date); the data is the content | TC-SA-23-04-003 |
| 4.1 User Data Portability (User-Initiated Export) | Rule: the portability status is the state (the completed, the in-progress, the failed); the status is the control | TC-SA-23-04-005 |
| 4.1 User Data Portability (User-Initiated Export) | Rule: the user can take the data (the portabilities, the users, the data, the dates); the freedom is managed | TC-SA-23-04-007 |
| 4.1 User Data Portability (User-Initiated Export) | Rule: user data portability is audit-logged with the portability, user, and timestamp | TC-SA-23-04-008 |
| 4.2 Bulk Data Export for Compliance | Export: the export (the export, the scope, the data, the date) | TC-SA-23-04-009 |
| 4.2 Bulk Data Export for Compliance | Scope: the scope (the scope of the export, the data, the date) | TC-SA-23-04-010 |
| 4.2 Bulk Data Export for Compliance | Data: the data (the data of the export, the type, the date) | TC-SA-23-04-011 |
| 4.2 Bulk Data Export for Compliance | Compliance: the compliance (the compliance, the regulation, the date) | TC-SA-23-04-012 |
| 4.2 Bulk Data Export for Compliance | Export status: the status (the completed, the in-progress, the failed) | TC-SA-23-04-013 |
| 4.2 Bulk Data Export for Compliance | Export count: the count (the count of the exports) | TC-SA-23-04-014 |
| 4.2 Bulk Data Export for Compliance | Export view: the view (the exports, the scopes, the data, the dates) | TC-SA-23-04-015 |
| 4.2 Bulk Data Export for Compliance | Audit logging of the bulk data export | TC-SA-23-04-016 |
| 4.2 Bulk Data Export for Compliance | Rule: the export is the transfer (the export, the scope, the data, the date); the export is the move | TC-SA-23-04-009 |
| 4.2 Bulk Data Export for Compliance | Rule: the scope is the boundary (the scope of the export, the data, the date); the scope is the limit | TC-SA-23-04-010 |
| 4.2 Bulk Data Export for Compliance | Rule: the data is the content (the data of the export, the type, the date); the data is the payload | TC-SA-23-04-011 |
| 4.2 Bulk Data Export for Compliance | Rule: the compliance is the requirement (the compliance, the regulation, the date); the compliance is the obligation | TC-SA-23-04-012 |
| 4.2 Bulk Data Export for Compliance | Rule: the compliance is supported (the exports, the scopes, the data, the dates); the transfer is managed | TC-SA-23-04-015 |
| 4.2 Bulk Data Export for Compliance | Rule: bulk data export is audit-logged with the export, scope, and timestamp | TC-SA-23-04-016 |

## 4.1 User Data Portability (User-Initiated Export)

### TC-SA-23-04-001 — Portability: the portability (the portability, the user, the data, the date); the portability is the right
**Type:** Positive
**Covers:** 4.1 → Portability: the portability (the portability, the user, the data, the date); Rule: the portability is the freedom (the portability, the user, the data, the date); the portability is the right
**Preconditions:** Super Admin is logged in; a user with personal data exists.
**Steps:**
1. Open Backup & Data Export → Data Portability → User Data Portability (User-Initiated Export).
2. Provide the portability: the portability (the portability, the user, the data, the date) — verify the portability is the freedom.
3. Verify the portability shows the user, the data, and the date.
4. Verify the user can actually take their data (the export is delivered to the user, not just generated).
**Expected Result:** The portability is provided — the portability, the user, the data, and the date are the right; the user can take the data.
**Priority:** Critical

### TC-SA-23-04-002 — User: the user (the user, the name, the portability); the user is the subject
**Type:** Positive
**Covers:** 4.1 → User: the user (the user, the name, the portability); Rule: the user is the owner (the user, the name, the portability); the user is the subject
**Preconditions:** Multiple users exist.
**Steps:**
1. Select the user: the user (the user, the name, the portability) — verify the user is the owner.
2. Verify the user shows the name and the portability.
3. Verify the portability is scoped to exactly the selected user (no other user's data is included).
**Expected Result:** The user is selected — the user, the name, and the portability are the subject; portability never leaks across users.
**Priority:** High

### TC-SA-23-04-003 — Data: the data (the data of the user, the type, the date); the data is the content
**Type:** Positive
**Covers:** 4.1 → Data: the data (the data of the user, the type, the date); Rule: the data is the personal data (the data of the user, the type, the date); the data is the content
**Preconditions:** A user with multiple data types exists.
**Steps:**
1. Select the data: the data (the data of the user, the type, the date) — verify the data is the personal data.
2. Verify the data shows the type and the date.
3. Verify the portability export contains the user's personal data of the selected types.
**Expected Result:** The data is selected — the data of the user, the type, and the date are the content.
**Priority:** High

### TC-SA-23-04-004 — Request: the request (the request of the user, the date); the request is the trigger
**Type:** Edge
**Covers:** 4.1 → Request: the request (the request of the user, the date); Rule: the portability is the freedom (the portability, the user, the data, the date); the portability is the right
**Preconditions:** A user-initiated portability request exists; a second, duplicate request from the same user (duplicate-request edge) is also prepared.
**Steps:**
1. Receive the request: the request (the request of the user, the date) — verify the request is the trigger.
2. Verify the request shows the user and the date.
3. Verify the request triggers the portability (the export starts on the request, not before).
4. Submit the duplicate request — verify the system handles it per the documented rule (one active portability per user, or a clear message); two concurrent portabilities for the same user never produce conflicting or partial exports.
**Expected Result:** The request is received — the request of the user, the date, is the trigger; duplicate requests never produce conflicting exports.
**Priority:** High

### TC-SA-23-04-005 — Portability status: the status (the completed, the in-progress, the failed); the status is the control
**Type:** Positive
**Covers:** 4.1 → Portability status: the status (the completed, the in-progress, the failed); Rule: the portability status is the state (the completed, the in-progress, the failed); the status is the control
**Preconditions:** Portabilities with various statuses exist.
**Steps:**
1. View the portability status: the status (the completed, the in-progress, the failed) — verify the portability status is the state.
2. Start a portability — verify it shows in-progress, then completed on success.
3. Verify a failed portability shows failed with the reason.
**Expected Result:** The portability status is shown — the completed, the in-progress, and the failed are the control.
**Priority:** High

### TC-SA-23-04-006 — Portability count: the count (the count of the portabilities); the count is the measure
**Type:** Positive
**Covers:** 4.1 → Portability count: the count (the count of the portabilities)
**Preconditions:** Multiple portabilities exist.
**Steps:**
1. View the portability count: the count (the count of the portabilities) — verify the portability count is the measure.
2. Verify the count matches the actual number of portabilities.
3. Complete a new portability — verify the count increments.
**Expected Result:** The portability count is shown — the count of the portabilities is the measure.
**Priority:** High

### TC-SA-23-04-007 — Portability view: the view (the portabilities, the users, the data, the dates); the freedom is managed
**Type:** Positive
**Covers:** 4.1 → Portability view: the view (the portabilities, the users, the data, the dates); Rule: the user can take the data (the portabilities, the users, the data, the dates); the freedom is managed
**Preconditions:** Multiple portabilities exist.
**Steps:**
1. View the portabilities: the view (the portabilities, the users, the data, the dates) — verify the user can take the data.
2. Verify each portability shows the user, the data, and the date.
3. Verify the freedom is managed (view, request, track, deliver).
**Expected Result:** The portabilities are viewed — the portabilities, the users, the data, and the dates are visible; the freedom is managed.
**Priority:** High

### TC-SA-23-04-008 — User data portability is audit-logged with the portability, user, and timestamp
**Type:** Positive
**Covers:** 4.1 → Audit logging of the user data portability; Rule: user data portability is audit-logged with the portability, user, and timestamp
**Preconditions:** Super Admin has processed a user data portability.
**Steps:**
1. Open the audit trail and filter by "user data portability".
2. Verify entries show the portability, the user, and the timestamp.
**Expected Result:** The user data portability is audit-logged with the portability, user, and timestamp.
**Priority:** Critical

## 4.2 Bulk Data Export for Compliance

### TC-SA-23-04-009 — Export: the export (the export, the scope, the data, the date); the export is the move
**Type:** Positive
**Covers:** 4.2 → Export: the export (the export, the scope, the data, the date); Rule: the export is the transfer (the export, the scope, the data, the date); the export is the move
**Preconditions:** Super Admin is logged in; data exists across multiple scopes.
**Steps:**
1. Open Backup & Data Export → Data Portability → Bulk Data Export for Compliance.
2. Export the data in bulk: the export (the export, the scope, the data, the date) — verify the export is the transfer.
3. Verify the export shows the scope, the data, and the date.
4. Verify the bulk export contains exactly the scoped data (complete, uncorrupted transfer).
**Expected Result:** The bulk export is performed — the export, the scope, the data, and the date are the move.
**Priority:** Critical

### TC-SA-23-04-010 — Scope: the scope (the scope of the export, the data, the date); the scope is the limit
**Type:** Positive
**Covers:** 4.2 → Scope: the scope (the scope of the export, the data, the date); Rule: the scope is the boundary (the scope of the export, the data, the date); the scope is the limit
**Preconditions:** Multiple data scopes exist.
**Steps:**
1. Set the scope: the scope (the scope of the export, the data, the date) — verify the scope is the boundary.
2. Verify the scope shows the data and the date.
3. Run the bulk export — verify only the scoped data is included (out-of-scope data is never captured).
**Expected Result:** The scope is set — the scope of the export, the data, and the date are the limit.
**Priority:** High

### TC-SA-23-04-011 — Data: the data (the data of the export, the type, the date); the data is the payload
**Type:** Positive
**Covers:** 4.2 → Data: the data (the data of the export, the type, the date); Rule: the data is the content (the data of the export, the type, the date); the data is the payload
**Preconditions:** Multiple data types exist in scope.
**Steps:**
1. Select the data: the data (the data of the export, the type, the date) — verify the data is the content.
2. Verify the data shows the type and the date.
3. Export with a data-type selection — verify only the selected data types are included.
**Expected Result:** The data is selected — the data of the export, the type, and the date are the payload.
**Priority:** High

### TC-SA-23-04-012 — Compliance: the compliance (the compliance, the regulation, the date); the compliance is the obligation
**Type:** Edge
**Covers:** 4.2 → Compliance: the compliance (the compliance, the regulation, the date); Rule: the compliance is the requirement (the compliance, the regulation, the date); the compliance is the obligation
**Preconditions:** Multiple compliance regulations are available; a regulation with a specific data-requirement set (compliance-requirement edge) is also prepared.
**Steps:**
1. Select the compliance: the compliance (the compliance, the regulation, the date) — verify the compliance is the requirement.
2. Verify the compliance shows the regulation and the date.
3. Run the bulk export for the regulation — verify the exported data set satisfies exactly the regulation's documented requirements (no missing required data, no extra data beyond the scope).
**Expected Result:** The compliance is selected — the compliance, the regulation, and the date are the obligation; the export satisfies the regulation's requirements exactly.
**Priority:** High

### TC-SA-23-04-013 — Export status: the status (the completed, the in-progress, the failed); the status is the control
**Type:** Positive
**Covers:** 4.2 → Export status: the status (the completed, the in-progress, the failed); Rule: the export status is the state (the completed, the in-progress, the failed); the status is the control
**Preconditions:** Bulk exports with various statuses exist.
**Steps:**
1. View the export status: the status (the completed, the in-progress, the failed) — verify the export status is the state.
2. Start a bulk export — verify it shows in-progress, then completed on success.
3. Verify a failed bulk export shows failed with the reason.
**Expected Result:** The export status is shown — the completed, the in-progress, and the failed are the control.
**Priority:** High

### TC-SA-23-04-014 — Export count: the count (the count of the exports); the count is the measure
**Type:** Positive
**Covers:** 4.2 → Export count: the count (the count of the exports)
**Preconditions:** Multiple bulk exports exist.
**Steps:**
1. View the export count: the count (the count of the exports) — verify the export count is the measure.
2. Verify the count matches the actual number of exports.
3. Complete a new bulk export — verify the count increments.
**Expected Result:** The export count is shown — the count of the exports is the measure.
**Priority:** High

### TC-SA-23-04-015 — Export view: the view (the exports, the scopes, the data, the dates); the transfer is managed
**Type:** Positive
**Covers:** 4.2 → Export view: the view (the exports, the scopes, the data, the dates); Rule: the compliance is supported (the exports, the scopes, the data, the dates); the transfer is managed
**Preconditions:** Multiple bulk exports exist.
**Steps:**
1. View the exports: the view (the exports, the scopes, the data, the dates) — verify the compliance is supported.
2. Verify each export shows the scope, the data, and the date.
3. Verify the transfer is managed (view, scope, export, verify).
**Expected Result:** The exports are viewed — the exports, the scopes, the data, and the dates are visible; the transfer is managed.
**Priority:** High

### TC-SA-23-04-016 — Bulk data export is audit-logged with the export, scope, and timestamp
**Type:** Positive
**Covers:** 4.2 → Audit logging of the bulk data export; Rule: bulk data export is audit-logged with the export, scope, and timestamp
**Preconditions:** Super Admin has run a bulk data export.
**Steps:**
1. Open the audit trail and filter by "bulk data export".
2. Verify entries show the export, the scope, and the timestamp.
**Expected Result:** The bulk data export is audit-logged with the export, scope, and timestamp.
**Priority:** Critical
