# 2. Branding Assets Management — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: branding_assets_management.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 |
|---------|--------------------|----------|
| 2.1 Logo and Asset Upload | Asset upload | TC-SA-WL-02-001 |
| 2.1 Logo and Asset Upload | Asset types | TC-SA-WL-02-002 |
| 2.1 Logo and Asset Upload | Asset format | TC-SA-WL-02-003 |
| 2.1 Logo and Asset Upload | Asset replacement | TC-SA-WL-02-004 |
| 2.1 Logo and Asset Upload | Asset deletion | TC-SA-WL-02-005 |
| 2.1 Logo and Asset Upload | Rule: an asset must be in an allowed format | TC-SA-WL-02-006 |
| 2.1 Logo and Asset Upload | Rule: an asset exceeding the size limit is rejected | TC-SA-WL-02-007 |
| 2.1 Logo and Asset Upload | Rule: an asset in use cannot be deleted | TC-SA-WL-02-008 |
| 2.1 Logo and Asset Upload | Rule: an asset is scoped to the institute | TC-SA-WL-02-009 |
| 2.1 Logo and Asset Upload | Rule: upload actions are audit-logged | TC-SA-WL-02-010 |
| 2.2 Color Palette Management | Palette definition | TC-SA-WL-02-011 |
| 2.2 Color Palette Management | Palette roles | TC-SA-WL-02-012 |
| 2.2 Color Palette Management | Palette preview | TC-SA-WL-02-013 |
| 2.2 Color Palette Management | Palette import | TC-SA-WL-02-014 |
| 2.2 Color Palette Management | Palette export | TC-SA-WL-02-015 |
| 2.2 Color Palette Management | Rule: a role must be assigned to exactly one color | TC-SA-WL-02-016 |
| 2.2 Color Palette Management | Rule: an import must match the expected schema | TC-SA-WL-02-017 |
| 2.2 Color Palette Management | Rule: a palette change applies on next load | TC-SA-WL-02-018 |
| 2.2 Color Palette Management | Rule: palette changes are audit-logged | TC-SA-WL-02-019 |
| 2.3 Font and Typography Settings | Font family | TC-SA-WL-02-020 |
| 2.3 Font and Typography Settings | Font weights | TC-SA-WL-02-021 |
| 2.3 Font and Typography Settings | Font sizes | TC-SA-WL-02-022 |
| 2.3 Font and Typography Settings | Line height | TC-SA-WL-02-023 |
| 2.3 Font and Typography Settings | Typography preview | TC-SA-WL-02-024 |
| 2.3 Font and Typography Settings | Rule: a font family must be allowed or uploaded | TC-SA-WL-02-025 |
| 2.3 Font and Typography Settings | Rule: a font not loaded falls back to the system default | TC-SA-WL-02-026 |
| 2.3 Font and Typography Settings | Rule: configuration changes are audit-logged | TC-SA-WL-02-027 |
| 2.4 Asset Versioning and Preview | Asset versioning | TC-SA-WL-02-028 |
| 2.4 Asset Versioning and Preview | Version restore | TC-SA-WL-02-029 |
| 2.4 Asset Versioning and Preview | Asset preview | TC-SA-WL-02-030 |
| 2.4 Asset Versioning and Preview | Version comparison | TC-SA-WL-02-031 |
| 2.4 Asset Versioning and Preview | Version retention | TC-SA-WL-02-032 |
| 2.4 Asset Versioning and Preview | Rule: a version is created on each replacement | TC-SA-WL-02-033 |
| 2.4 Asset Versioning and Preview | Rule: a version restore is recorded as a new version | TC-SA-WL-02-034 |
| 2.4 Asset Versioning and Preview | Rule: a version beyond retention is pruned | TC-SA-WL-02-035 |
| 2.4 Asset Versioning and Preview | Rule: versioning actions are audit-logged | TC-SA-WL-02-036 |

### TC-SA-WL-02-001 — Asset upload
**Type:** Positive
**Covers:** 2.1 → Asset upload: the upload of logos, images, and icons
**Preconditions:** A Super Admin account is active; an institute exists.
**Steps:**
1. As a Super Admin, upload the institute logo.
2. Observe the result and verify the full behavior: the asset is uploaded and listed.
**Expected Result:** The upload works — the asset is listed, delivered exactly as documented.
**Priority:** Critical

### TC-SA-WL-02-002 — Asset types
**Type:** Positive
**Covers:** 2.1 → Asset types: the asset types supported
**Preconditions:** A Super Admin account is active.
**Steps:**
1. As a Super Admin, upload a logo, favicon, and banner.
2. Observe the result and verify the full behavior: each asset is categorized by type.
**Expected Result:** The types are applied — the assets are categorized, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-003 — Asset format
**Type:** Positive
**Covers:** 2.1 → Asset format: the allowed formats and size limits per asset type
**Preconditions:** A Super Admin account is active; the logo allows PNG and SVG.
**Steps:**
1. As a Super Admin, upload a PNG logo.
2. Observe the result and verify the full behavior: the upload is accepted.
**Expected Result:** The format is accepted — the upload succeeds, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-004 — Asset replacement
**Type:** Positive
**Covers:** 2.1 → Asset replacement: the replacement of an existing asset
**Preconditions:** A Super Admin account is active; a logo exists.
**Steps:**
1. As a Super Admin, replace the logo with a new file.
2. Observe the result and verify the full behavior: the new asset is in the same slot; the old is versioned.
**Expected Result:** The replacement works — the slot is updated and the old is versioned, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-005 — Asset deletion
**Type:** Positive
**Covers:** 2.1 → Asset deletion: the deletion of an unused asset
**Preconditions:** A Super Admin account is active; an unused asset exists.
**Steps:**
1. As a Super Admin, delete the unused asset.
2. Observe the result and verify the full behavior: the asset is removed from the list.
**Expected Result:** The deletion works — the asset is removed, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-006 — Rule: an asset must be in an allowed format
**Type:** Negative
**Covers:** 2.1 → Rule: an asset must be in an allowed format for its type
**Preconditions:** A Super Admin account is active; a BMP file is prepared for a logo slot.
**Steps:**
1. As a Super Admin, attempt to upload the BMP as a logo.
2. Observe the result and verify the full behavior: the upload is rejected.
**Expected Result:** The upload is rejected — the format is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-007 — Rule: an asset exceeding the size limit is rejected
**Type:** Negative
**Covers:** 2.1 → Rule: an asset exceeding the size limit for its type is rejected
**Preconditions:** A Super Admin account is active; the logo limit is 2MB; a 5MB file is prepared.
**Steps:**
1. As a Super Admin, attempt to upload the 5MB logo.
2. Observe the result and verify the full behavior: the upload is rejected with a size error.
**Expected Result:** The upload is rejected — the size limit is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-008 — Rule: an asset in use cannot be deleted
**Type:** Negative
**Covers:** 2.1 → Rule: an asset in use cannot be deleted; it must be replaced first
**Preconditions:** A Super Admin account is active; the logo is in use.
**Steps:**
1. As a Super Admin, attempt to delete the in-use logo.
2. Observe the result and verify the full behavior: the deletion is blocked.
**Expected Result:** The deletion is blocked — the in-use protection is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-009 — Rule: an asset is scoped to the institute
**Type:** Positive
**Covers:** 2.1 → Rule: an asset is scoped to the institute that uploaded it
**Preconditions:** A Super Admin account is active; institute A uploads a logo.
**Steps:**
1. As a Super Admin, view institute B's assets.
2. Observe the result and verify the full behavior: institute A's logo is not visible.
**Expected Result:** The scoping is enforced — the asset is not visible to other institutes, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-010 — Rule: upload actions are audit-logged
**Type:** Positive
**Covers:** 2.1 → Audit logging of logo and asset upload
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, upload an asset.
2. Open the audit log.
3. Observe the result and verify the full behavior: the action is recorded with the actor and timestamp.
**Expected Result:** The action is audit-logged — the actor and timestamp are recorded, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-011 — Palette definition
**Type:** Positive
**Covers:** 2.2 → Palette definition: the definition of the brand color palette
**Preconditions:** A Super Admin account is active.
**Steps:**
1. As a Super Admin, define the palette colors and save.
2. Observe the result and verify the full behavior: the palette is saved and shown.
**Expected Result:** The palette is defined — the colors are saved, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-012 — Palette roles
**Type:** Positive
**Covers:** 2.2 → Palette roles: the role per color
**Preconditions:** A Super Admin account is active; the palette is defined.
**Steps:**
1. As a Super Admin, assign roles (primary, secondary, accent) to the colors and save.
2. Observe the result and verify the full behavior: the roles are applied.
**Expected Result:** The roles are applied — each color has its role, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-013 — Palette preview
**Type:** Positive
**Covers:** 2.2 → Palette preview: the preview of the palette on sample surfaces
**Preconditions:** A Super Admin account is active; the palette is defined.
**Steps:**
1. As a Super Admin, open the palette preview.
2. Observe the result and verify the full behavior: the colors are rendered on sample UI elements.
**Expected Result:** The preview is shown — the colors are rendered, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-014 — Palette import
**Type:** Positive
**Covers:** 2.2 → Palette import: the import of a palette from a file
**Preconditions:** A Super Admin account is active; a palette file is prepared.
**Steps:**
1. As a Super Admin, import the palette file.
2. Observe the result and verify the full behavior: the palette is imported and shown.
**Expected Result:** The import works — the palette is imported, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-015 — Palette export
**Type:** Positive
**Covers:** 2.2 → Palette export: the export of the palette for reuse
**Preconditions:** A Super Admin account is active; the palette is defined.
**Steps:**
1. As a Super Admin, export the palette.
2. Observe the result and verify the full behavior: a palette file is produced.
**Expected Result:** The export works — the file is produced, delivered exactly as documented.
**Priority:** Low

### TC-SA-WL-02-016 — Rule: a role must be assigned to exactly one color
**Type:** Negative
**Covers:** 2.2 → Rule: a palette role must be assigned to exactly one color
**Preconditions:** A Super Admin account is active; two colors are assigned the primary role.
**Steps:**
1. As a Super Admin, attempt to save the palette.
2. Observe the result and verify the full behavior: the save is blocked with a validation error.
**Expected Result:** The save is blocked — the role uniqueness is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-017 — Rule: an import must match the expected schema
**Type:** Negative
**Covers:** 2.2 → Rule: a palette import must match the expected schema
**Preconditions:** A Super Admin account is active; a malformed palette file is prepared.
**Steps:**
1. As a Super Admin, attempt to import the malformed file.
2. Observe the result and verify the full behavior: the import is rejected with a schema error.
**Expected Result:** The import is rejected — the schema is enforced, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-018 — Rule: a palette change applies on next load
**Type:** Positive
**Covers:** 2.2 → Rule: a palette change applies to all branded surfaces on the next load
**Preconditions:** A Super Admin account is active; the palette is changed.
**Steps:**
1. As a Super Admin, change the palette and save.
2. As a learner, reload the platform.
3. Observe the result and verify the full behavior: the new palette is applied.
**Expected Result:** The new palette is applied — the change is visible on next load, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-019 — Rule: palette changes are audit-logged
**Type:** Positive
**Covers:** 2.2 → Audit logging of color palette management
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, change the palette and save.
2. Open the audit log.
3. Observe the result and verify the full behavior: the change is recorded with the actor and timestamp.
**Expected Result:** The change is audit-logged — the actor and timestamp are recorded, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-020 — Font family
**Type:** Positive
**Covers:** 2.3 → Font family: the primary and secondary font families
**Preconditions:** A Super Admin account is active; an allowed font is available.
**Steps:**
1. As a Super Admin, set the primary font family and save.
2. Observe the result and verify the full behavior: the font is applied to branded surfaces.
**Expected Result:** The font is applied — the family is visible, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-021 — Font weights
**Type:** Positive
**Covers:** 2.3 → Font weights: the font weights available
**Preconditions:** A Super Admin account is active; the font family is set.
**Steps:**
1. As a Super Admin, set the font weights and save.
2. Observe the result and verify the full behavior: the weights are applied.
**Expected Result:** The weights are applied — the font renders at the weights, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-022 — Font sizes
**Type:** Positive
**Covers:** 2.3 → Font sizes: the base font size and scale
**Preconditions:** A Super Admin account is active.
**Steps:**
1. As a Super Admin, set the base font size and save.
2. Observe the result and verify the full behavior: the size scale is derived and applied.
**Expected Result:** The sizes are applied — the scale is visible, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-023 — Line height
**Type:** Positive
**Covers:** 2.3 → Line height: the line height for body text
**Preconditions:** A Super Admin account is active.
**Steps:**
1. As a Super Admin, set the line height and save.
2. Observe the result and verify the full behavior: the line height is applied to body text.
**Expected Result:** The line height is applied — the text spacing is visible, delivered exactly as documented.
**Priority:** Low

### TC-SA-WL-02-024 — Typography preview
**Type:** Positive
**Covers:** 2.3 → Typography preview: the preview of the typography on sample text
**Preconditions:** A Super Admin account is active; the typography is set.
**Steps:**
1. As a Super Admin, open the typography preview.
2. Observe the result and verify the full behavior: the settings are rendered on sample text.
**Expected Result:** The preview is shown — the typography is rendered, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-025 — Rule: a font family must be allowed or uploaded
**Type:** Negative
**Covers:** 2.3 → Rule: a font family must be an allowed or uploaded font
**Preconditions:** A Super Admin account is active; a disallowed font is entered.
**Steps:**
1. As a Super Admin, attempt to set a disallowed font family and save.
2. Observe the result and verify the full behavior: the save is blocked.
**Expected Result:** The save is blocked — the font allowlist is enforced, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-026 — Rule: a font not loaded falls back to the system default
**Type:** Positive
**Covers:** 2.3 → Rule: a font not loaded falls back to the system default
**Preconditions:** A Super Admin account is active; a font fails to load.
**Steps:**
1. As a learner, view a branded surface with the failing font.
2. Observe the result and verify the full behavior: the system default font is used.
**Expected Result:** The fallback is applied — the system default is used, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-027 — Rule: configuration changes are audit-logged
**Type:** Positive
**Covers:** 2.3 → Audit logging of font and typography settings
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, change the font family and save.
2. Open the audit log.
3. Observe the result and verify the full behavior: the change is recorded with the actor and timestamp.
**Expected Result:** The change is audit-logged — the actor and timestamp are recorded, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-028 — Asset versioning
**Type:** Positive
**Covers:** 2.4 → Asset versioning: the version history per asset
**Preconditions:** A Super Admin account is active; an asset has been replaced twice.
**Steps:**
1. As a Super Admin, open the version history for the asset.
2. Observe the result and verify the full behavior: the versions are listed.
**Expected Result:** The versioning is shown — the history is visible, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-029 — Version restore
**Type:** Positive
**Covers:** 2.4 → Version restore: the restore of a previous asset version
**Preconditions:** A Super Admin account is active; an asset has multiple versions.
**Steps:**
1. As a Super Admin, restore a previous version.
2. Observe the result and verify the full behavior: the asset is set to the selected version.
**Expected Result:** The restore works — the asset is at the selected version, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-030 — Asset preview
**Type:** Positive
**Covers:** 2.4 → Asset preview: the preview of an asset in its branded context
**Preconditions:** A Super Admin account is active; an asset exists.
**Steps:**
1. As a Super Admin, open the asset preview.
2. Observe the result and verify the full behavior: the asset is shown in its branded context.
**Expected Result:** The preview is shown — the asset is in context, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-031 — Version comparison
**Type:** Positive
**Covers:** 2.4 → Version comparison: the comparison of two asset versions
**Preconditions:** A Super Admin account is active; an asset has two versions.
**Steps:**
1. As a Super Admin, compare the two versions.
2. Observe the result and verify the full behavior: the differences are shown.
**Expected Result:** The comparison is shown — the differences are visible, delivered exactly as documented.
**Priority:** Low

### TC-SA-WL-02-032 — Version retention
**Type:** Positive
**Covers:** 2.4 → Version retention: the retention of historical versions
**Preconditions:** A Super Admin account is active; the retention is 5 versions.
**Steps:**
1. As a Super Admin, check the version count for an asset with 7 versions.
2. Observe the result and verify the full behavior: only the latest 5 versions are retained.
**Expected Result:** The retention is applied — the count is within the limit, delivered exactly as documented.
**Priority:** Low

### TC-SA-WL-02-033 — Rule: a version is created on each replacement
**Type:** Positive
**Covers:** 2.4 → Rule: an asset version is created on each replacement
**Preconditions:** A Super Admin account is active; an asset exists.
**Steps:**
1. As a Super Admin, replace the asset.
2. Check the version history.
3. Observe the result and verify the full behavior: a new version is created.
**Expected Result:** The version is created — the history is updated, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-02-034 — Rule: a version restore is recorded as a new version
**Type:** Positive
**Covers:** 2.4 → Rule: a version restore is itself recorded as a new version
**Preconditions:** A Super Admin account is active; an asset has versions.
**Steps:**
1. As a Super Admin, restore a previous version.
2. Check the version history.
3. Observe the result and verify the full behavior: a new version entry is created.
**Expected Result:** The new version is created — the restore is recorded, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-02-035 — Rule: a version beyond retention is pruned
**Type:** Positive
**Covers:** 2.4 → Rule: a version beyond the retention count is pruned
**Preconditions:** A Super Admin account is active; the retention is 5; an asset has 7 versions.
**Steps:**
1. As a Super Admin, check the version history.
2. Observe the result and verify the full behavior: the oldest 2 versions are pruned.
**Expected Result:** The pruning is applied — the oldest versions are removed, delivered exactly as documented.
**Priority:** Low

### TC-SA-WL-02-036 — Rule: versioning actions are audit-logged
**Type:** Positive
**Covers:** 2.4 → Audit logging of asset versioning and preview
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, restore an asset version.
2. Open the audit log.
3. Observe the result and verify the full behavior: the action is recorded with the actor and timestamp.
**Expected Result:** The action is audit-logged — the actor and timestamp are recorded, delivered exactly as documented.
**Priority:** High
