# 1. Custom Branding Configuration — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: custom_branding_configuration.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 Institute Logo and Colors | Logo upload | TC-SA-WL-01-001 |
| 1.1 Institute Logo and Colors | Primary color | TC-SA-WL-01-002 |
| 1.1 Institute Logo and Colors | Secondary color | TC-SA-WL-01-003 |
| 1.1 Institute Logo and Colors | Accent color | TC-SA-WL-01-004 |
| 1.1 Institute Logo and Colors | Background color | TC-SA-WL-01-005 |
| 1.1 Institute Logo and Colors | Text color | TC-SA-WL-01-006 |
| 1.1 Institute Logo and Colors | Rule: a logo must be in an allowed format | TC-SA-WL-01-007 |
| 1.1 Institute Logo and Colors | Rule: a primary color is required | TC-SA-WL-01-008 |
| 1.1 Institute Logo and Colors | Rule: a low contrast ratio raises a warning | TC-SA-WL-01-009 |
| 1.1 Institute Logo and Colors | Rule: a logo change applies on next load | TC-SA-WL-01-010 |
| 1.1 Institute Logo and Colors | Rule: configuration changes are audit-logged | TC-SA-WL-01-011 |
| 1.2 Custom Domain | Domain assignment | TC-SA-WL-01-012 |
| 1.2 Custom Domain | DNS verification | TC-SA-WL-01-013 |
| 1.2 Custom Domain | SSL provisioning | TC-SA-WL-01-014 |
| 1.2 Custom Domain | Domain status | TC-SA-WL-01-015 |
| 1.2 Custom Domain | Domain fallback | TC-SA-WL-01-016 |
| 1.2 Custom Domain | Rule: a domain must be unique across institutes | TC-SA-WL-01-017 |
| 1.2 Custom Domain | Rule: a domain is active only after verification and SSL | TC-SA-WL-01-018 |
| 1.2 Custom Domain | Rule: a failed domain serves the fallback | TC-SA-WL-01-019 |
| 1.2 Custom Domain | Rule: a domain removal reverts to the platform domain | TC-SA-WL-01-020 |
| 1.2 Custom Domain | Rule: configuration changes are audit-logged | TC-SA-WL-01-021 |
| 1.3 Branded Certificates | Certificate template | TC-SA-WL-01-022 |
| 1.3 Branded Certificates | Certificate logo | TC-SA-WL-01-023 |
| 1.3 Branded Certificates | Certificate colors | TC-SA-WL-01-024 |
| 1.3 Branded Certificates | Certificate text | TC-SA-WL-01-025 |
| 1.3 Branded Certificates | Certificate enablement | TC-SA-WL-01-026 |
| 1.3 Branded Certificates | Rule: a certificate is issued only when enabled | TC-SA-WL-01-027 |
| 1.3 Branded Certificates | Rule: a certificate is immutable once issued | TC-SA-WL-01-028 |
| 1.3 Branded Certificates | Rule: a certificate with no template uses the default | TC-SA-WL-01-029 |
| 1.3 Branded Certificates | Rule: configuration changes are audit-logged | TC-SA-WL-01-030 |
| 1.4 Customized Email Templates | Email template selection | TC-SA-WL-01-031 |
| 1.4 Customized Email Templates | Email branding | TC-SA-WL-01-032 |
| 1.4 Customized Email Templates | Email sender | TC-SA-WL-01-033 |
| 1.4 Customized Email Templates | Email content | TC-SA-WL-01-034 |
| 1.4 Customized Email Templates | Email preview | TC-SA-WL-01-035 |
| 1.4 Customized Email Templates | Rule: a sender must be a verified address | TC-SA-WL-01-036 |
| 1.4 Customized Email Templates | Rule: an email with no template uses the platform default | TC-SA-WL-01-037 |
| 1.4 Customized Email Templates | Rule: configuration changes are audit-logged | TC-SA-WL-01-038 |

### TC-SA-WL-01-001 — Logo upload
**Type:** Positive
**Covers:** 1.1 → Logo upload: the institute logo uploaded for the platform
**Preconditions:** A Super Admin account is active; an institute exists.
**Steps:**
1. As a Super Admin, upload the institute logo (PNG).
2. Save the configuration.
3. Observe the result and verify the full behavior: the logo is displayed on the platform.
**Expected Result:** The logo upload works — the logo is displayed, delivered exactly as documented.
**Priority:** Critical

### TC-SA-WL-01-002 — Primary color
**Type:** Positive
**Covers:** 1.1 → Primary color: the primary brand color
**Preconditions:** A Super Admin account is active.
**Steps:**
1. As a Super Admin, set the primary color to #1A5F9E and save.
2. Observe the result and verify the full behavior: the primary color is applied to branded surfaces.
**Expected Result:** The primary color is applied — the brand color is visible, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-003 — Secondary color
**Type:** Positive
**Covers:** 1.1 → Secondary color: the secondary brand color
**Preconditions:** A Super Admin account is active.
**Steps:**
1. As a Super Admin, set the secondary color and save.
2. Observe the result and verify the full behavior: the secondary color is applied.
**Expected Result:** The secondary color is applied — the color is visible, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-004 — Accent color
**Type:** Positive
**Covers:** 1.1 → Accent color: the accent color for calls to action
**Preconditions:** A Super Admin account is active.
**Steps:**
1. As a Super Admin, set the accent color and save.
2. Observe the result and verify the full behavior: the accent color is applied to calls to action.
**Expected Result:** The accent color is applied — the CTAs use the color, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-005 — Background color
**Type:** Positive
**Covers:** 1.1 → Background color: the background color for branded surfaces
**Preconditions:** A Super Admin account is active.
**Steps:**
1. As a Super Admin, set the background color and save.
2. Observe the result and verify the full behavior: the background color is applied.
**Expected Result:** The background color is applied — the surface uses the color, delivered exactly as documented.
**Priority:** Low

### TC-SA-WL-01-006 — Text color
**Type:** Positive
**Covers:** 1.1 → Text color: the text color for branded surfaces
**Preconditions:** A Super Admin account is active.
**Steps:**
1. As a Super Admin, set the text color and save.
2. Observe the result and verify the full behavior: the text color is applied.
**Expected Result:** The text color is applied — the text uses the color, delivered exactly as documented.
**Priority:** Low

### TC-SA-WL-01-007 — Rule: a logo must be in an allowed format
**Type:** Negative
**Covers:** 1.1 → Rule: a logo must be in an allowed format (PNG, SVG) and within the size limit
**Preconditions:** A Super Admin account is active; a BMP file is prepared.
**Steps:**
1. As a Super Admin, attempt to upload the BMP logo.
2. Observe the result and verify the full behavior: the upload is rejected with a format error.
**Expected Result:** The upload is rejected — the format is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-008 — Rule: a primary color is required
**Type:** Negative
**Covers:** 1.1 → Rule: a primary color is required; the other colors have sensible defaults
**Preconditions:** A Super Admin account is active; the primary color is empty.
**Steps:**
1. As a Super Admin, attempt to save without a primary color.
2. Observe the result and verify the full behavior: the save is blocked with a validation error.
**Expected Result:** The save is blocked — the required field is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-009 — Rule: a low contrast ratio raises a warning
**Type:** Positive
**Covers:** 1.1 → Rule: a contrast ratio below the accessibility threshold raises a warning
**Preconditions:** A Super Admin account is active; a low-contrast color pair is set.
**Steps:**
1. As a Super Admin, set a text and background color with low contrast and save.
2. Observe the result and verify the full behavior: a contrast warning is shown.
**Expected Result:** The warning is shown — the contrast issue is flagged, delivered exactly as documented.
**Priority:** Medium

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

### TC-SA-WL-01-011 — Rule: configuration changes are audit-logged
**Type:** Positive
**Covers:** 1.1 → Audit logging of institute logo and colors
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, change the primary color 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-01-012 — Domain assignment
**Type:** Positive
**Covers:** 1.2 → Domain assignment: the custom domain assigned to the institute
**Preconditions:** A Super Admin account is active; an institute exists.
**Steps:**
1. As a Super Admin, assign learn.institutename.com to the institute and save.
2. Observe the result and verify the full behavior: the domain is assigned and shown as pending.
**Expected Result:** The domain is assigned — it is shown as pending, delivered exactly as documented.
**Priority:** Critical

### TC-SA-WL-01-013 — DNS verification
**Type:** Positive
**Covers:** 1.2 → DNS verification: the verification of the domain's DNS records
**Preconditions:** A Super Admin account is active; a domain is assigned; DNS records are set.
**Steps:**
1. As a Super Admin, run the DNS verification.
2. Observe the result and verify the full behavior: the verification succeeds and the status updates.
**Expected Result:** The verification works — the status updates, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-014 — SSL provisioning
**Type:** Positive
**Covers:** 1.2 → SSL provisioning: the SSL certificate provisioning for the domain
**Preconditions:** A Super Admin account is active; DNS verification succeeded.
**Steps:**
1. As a Super Admin, provision SSL for the domain.
2. Observe the result and verify the full behavior: the SSL certificate is provisioned.
**Expected Result:** The SSL is provisioned — the certificate is active, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-015 — Domain status
**Type:** Positive
**Covers:** 1.2 → Domain status: the status of the custom domain
**Preconditions:** A Super Admin account is active; a domain is in a known state.
**Steps:**
1. As a Super Admin, open the domain status view.
2. Observe the result and verify the full behavior: the status (pending, active, failed) is shown.
**Expected Result:** The status is shown — the state is visible, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-016 — Domain fallback
**Type:** Positive
**Covers:** 1.2 → Domain fallback: the fallback to the platform domain on failure
**Preconditions:** A Super Admin account is active; a domain is in pending status.
**Steps:**
1. As a learner, access the platform via the custom domain.
2. Observe the result and verify the full behavior: the platform domain serves as fallback.
**Expected Result:** The fallback works — the platform domain serves, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-017 — Rule: a domain must be unique across institutes
**Type:** Negative
**Covers:** 1.2 → Rule: a custom domain must be unique across institutes
**Preconditions:** A Super Admin account is active; a domain is assigned to institute A.
**Steps:**
1. As a Super Admin, attempt to assign the same domain to institute B.
2. Observe the result and verify the full behavior: the assignment is rejected.
**Expected Result:** The assignment is rejected — the uniqueness is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-018 — Rule: a domain is active only after verification and SSL
**Type:** Positive
**Covers:** 1.2 → Rule: a domain is active only after DNS verification and SSL provisioning succeed
**Preconditions:** A Super Admin account is active; a domain is assigned but not verified.
**Steps:**
1. As a Super Admin, check the domain status before verification.
2. Observe the result and verify the full behavior: the domain is not active.
**Expected Result:** The domain is not active — the precondition is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-019 — Rule: a failed domain serves the fallback
**Type:** Positive
**Covers:** 1.2 → Rule: a domain in failed status shows the failure reason and serves the fallback
**Preconditions:** A Super Admin account is active; a domain is in failed status.
**Steps:**
1. As a Super Admin, open the domain status.
2. Observe the result and verify the full behavior: the failure reason is shown and the fallback serves.
**Expected Result:** The failure is shown — the reason is visible and the fallback serves, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-020 — Rule: a domain removal reverts to the platform domain
**Type:** Positive
**Covers:** 1.2 → Rule: a domain removal reverts the institute to the platform domain
**Preconditions:** A Super Admin account is active; an institute has a custom domain.
**Steps:**
1. As a Super Admin, remove the custom domain.
2. As a learner, access the platform.
3. Observe the result and verify the full behavior: the platform domain serves.
**Expected Result:** The revert works — the platform domain serves, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-021 — Rule: configuration changes are audit-logged
**Type:** Positive
**Covers:** 1.2 → Audit logging of custom domain
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, assign a custom domain 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-01-022 — Certificate template
**Type:** Positive
**Covers:** 1.3 → Certificate template: the certificate template with institute branding
**Preconditions:** A Super Admin account is active; a template exists.
**Steps:**
1. As a Super Admin, select the certificate template and save.
2. Observe the result and verify the full behavior: the template is applied to issued certificates.
**Expected Result:** The template is applied — the certificate uses it, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-023 — Certificate logo
**Type:** Positive
**Covers:** 1.3 → Certificate logo: the institute logo on the certificate
**Preconditions:** A Super Admin account is active; the institute logo is set.
**Steps:**
1. As a Super Admin, verify the certificate logo setting.
2. Issue a certificate.
3. Observe the result and verify the full behavior: the certificate carries the institute logo.
**Expected Result:** The logo is on the certificate — the branding is applied, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-024 — Certificate colors
**Type:** Positive
**Covers:** 1.3 → Certificate colors: the colors applied to the certificate
**Preconditions:** A Super Admin account is active; the institute colors are set.
**Steps:**
1. As a Super Admin, verify the certificate colors setting.
2. Issue a certificate.
3. Observe the result and verify the full behavior: the certificate uses the institute colors.
**Expected Result:** The colors are applied — the certificate uses them, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-025 — Certificate text
**Type:** Positive
**Covers:** 1.3 → Certificate text: the certificate text and issuer name
**Preconditions:** A Super Admin account is active; the certificate text is set.
**Steps:**
1. As a Super Admin, set the certificate text and issuer name and save.
2. Issue a certificate.
3. Observe the result and verify the full behavior: the certificate shows the text and issuer.
**Expected Result:** The text is shown — the certificate carries it, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-026 — Certificate enablement
**Type:** Positive
**Covers:** 1.3 → Certificate enablement: branded certificates toggled on or off
**Preconditions:** A Super Admin account is active; branded certificates are enabled.
**Steps:**
1. As a Super Admin, enable branded certificates and save.
2. Complete a course as a learner.
3. Observe the result and verify the full behavior: a branded certificate is issued.
**Expected Result:** The certificate is issued — the enablement works, delivered exactly as documented.
**Priority:** Critical

### TC-SA-WL-01-027 — Rule: a certificate is issued only when enabled
**Type:** Negative
**Covers:** 1.3 → Rule: a branded certificate is issued only when enablement is on
**Preconditions:** A Super Admin account is active; branded certificates are disabled.
**Steps:**
1. As a learner, complete a course.
2. Observe the result and verify the full behavior: no branded certificate is issued.
**Expected Result:** No certificate is issued — the disablement is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-028 — Rule: a certificate is immutable once issued
**Type:** Positive
**Covers:** 1.3 → Rule: a certificate is immutable once issued; a re-issue creates a new certificate
**Preconditions:** A Super Admin account is active; a certificate is issued; the branding is then changed.
**Steps:**
1. As a Super Admin, change the branding.
2. Check the already-issued certificate.
3. Observe the result and verify the full behavior: the certificate is unchanged.
**Expected Result:** The certificate is unchanged — the immutability is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-029 — Rule: a certificate with no template uses the default
**Type:** Positive
**Covers:** 1.3 → Rule: a certificate with no template falls back to the default template
**Preconditions:** A Super Admin account is active; no template is selected.
**Steps:**
1. As a learner, complete a course.
2. Check the issued certificate.
3. Observe the result and verify the full behavior: the default template is used.
**Expected Result:** The default is used — the fallback is applied, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-030 — Rule: configuration changes are audit-logged
**Type:** Positive
**Covers:** 1.3 → Audit logging of branded certificates
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, change the certificate template 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-01-031 — Email template selection
**Type:** Positive
**Covers:** 1.4 → Email template selection: the email templates customized per event
**Preconditions:** A Super Admin account is active; event types exist.
**Steps:**
1. As a Super Admin, select the welcome email template to customize and save.
2. Observe the result and verify the full behavior: the template is marked customized.
**Expected Result:** The selection works — the template is customized, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-032 — Email branding
**Type:** Positive
**Covers:** 1.4 → Email branding: the logo and colors applied to emails
**Preconditions:** A Super Admin account is active; the institute branding is set.
**Steps:**
1. As a Super Admin, apply the branding to the email template and save.
2. Preview the email.
3. Observe the result and verify the full behavior: the email carries the logo and colors.
**Expected Result:** The branding is applied — the email is branded, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-033 — Email sender
**Type:** Positive
**Covers:** 1.4 → Email sender: the sender name and address per institute
**Preconditions:** A Super Admin account is active; a verified sender address exists.
**Steps:**
1. As a Super Admin, set the sender name and address and save.
2. Send a test email.
3. Observe the result and verify the full behavior: the email is from the institute sender.
**Expected Result:** The sender is applied — the email is from the institute, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-034 — Email content
**Type:** Positive
**Covers:** 1.4 → Email content: the email content customized per institute
**Preconditions:** A Super Admin account is active; the email content is customized.
**Steps:**
1. As a Super Admin, customize the email content and save.
2. Preview the email.
3. Observe the result and verify the full behavior: the email shows the customized content.
**Expected Result:** The content is shown — the customization is applied, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-035 — Email preview
**Type:** Positive
**Covers:** 1.4 → Email preview: the preview of the branded email
**Preconditions:** A Super Admin account is active; an email template is customized.
**Steps:**
1. As a Super Admin, open the email preview.
2. Observe the result and verify the full behavior: the preview reflects the current branding.
**Expected Result:** The preview is shown — it reflects the branding, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-036 — Rule: a sender must be a verified address
**Type:** Negative
**Covers:** 1.4 → Rule: an email sender must be a verified address for the institute
**Preconditions:** A Super Admin account is active; an unverified address is entered.
**Steps:**
1. As a Super Admin, set the sender to an unverified address and save.
2. Observe the result and verify the full behavior: the save is blocked with a verification error.
**Expected Result:** The save is blocked — the verification is enforced, delivered exactly as documented.
**Priority:** High

### TC-SA-WL-01-037 — Rule: an email with no template uses the platform default
**Type:** Positive
**Covers:** 1.4 → Rule: an email with no customized template falls back to the platform default
**Preconditions:** A Super Admin account is active; no template is customized for an event.
**Steps:**
1. As a learner, trigger the event email.
2. Check the received email.
3. Observe the result and verify the full behavior: the platform default template is used.
**Expected Result:** The default is used — the fallback is applied, delivered exactly as documented.
**Priority:** Medium

### TC-SA-WL-01-038 — Rule: configuration changes are audit-logged
**Type:** Positive
**Covers:** 1.4 → Audit logging of customized email templates
**Preconditions:** A Super Admin account is active; the audit log is accessible.
**Steps:**
1. As a Super Admin, customize an email template 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
