# 5. Communication Templates — Test Cases

User Type: **Super Administrator**
Source: *Mi Digital Academy - Education CRM Features Document*
Spec: communication_templates.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 |
|---------|--------------------|----------|
| 5.1 Email Templates for Outreach | Template: the template (the template, the subject, the body, the variables) | TC-SA-20-05-001 |
| 5.1 Email Templates for Outreach | Template subject: the subject (the subject of the template, the text) | TC-SA-20-05-002 |
| 5.1 Email Templates for Outreach | Template body: the body (the body of the template, the text, the variables) | TC-SA-20-05-003 |
| 5.1 Email Templates for Outreach | Template variables: the variables (the variables of the template, e.g., the name, the course) | TC-SA-20-05-004 |
| 5.1 Email Templates for Outreach | Template type: the type (the type of the template, e.g., the welcome, the reminder, the offer) | TC-SA-20-05-005 |
| 5.1 Email Templates for Outreach | Template status: the status (the active, the inactive) | TC-SA-20-05-006 |
| 5.1 Email Templates for Outreach | Template view: the view (the templates, the subjects, the bodies, the variables) | TC-SA-20-05-007 |
| 5.1 Email Templates for Outreach | Audit logging of the template creation | TC-SA-20-05-008 |
| 5.1 Email Templates for Outreach | Rule: the template is the reuse (the template, the subject, the body, the variables); the template is the pattern | TC-SA-20-05-001 |
| 5.1 Email Templates for Outreach | Rule: the template subject is the headline (the subject of the template, the text); the subject is the title | TC-SA-20-05-002 |
| 5.1 Email Templates for Outreach | Rule: the template body is the message (the body of the template, the text, the variables); the body is the content | TC-SA-20-05-003 |
| 5.1 Email Templates for Outreach | Rule: the template variables are the placeholders (the variables of the template, e.g., the name, the course); the variables are the dynamic parts | TC-SA-20-05-004 |
| 5.1 Email Templates for Outreach | Rule: the template is created (the templates, the subjects, the bodies, the variables); the reuse is managed | TC-SA-20-05-007 |
| 5.1 Email Templates for Outreach | Rule: template creation is audit-logged with the template, type, and timestamp | TC-SA-20-05-008 |
| 5.2 Branded Communication Templates | Template: the template (the template, the brand, the logo, the colors, the footer) | TC-SA-20-05-009 |
| 5.2 Branded Communication Templates | Brand: the brand (the brand of the template, the name) | TC-SA-20-05-010 |
| 5.2 Branded Communication Templates | Logo: the logo (the logo of the template, the image) | TC-SA-20-05-011 |
| 5.2 Branded Communication Templates | Colors: the colors (the colors of the template, the palette) | TC-SA-20-05-012 |
| 5.2 Branded Communication Templates | Footer: the footer (the footer of the template, the text, the links) | TC-SA-20-05-013 |
| 5.2 Branded Communication Templates | Template status: the status (the active, the inactive) | TC-SA-20-05-014 |
| 5.2 Branded Communication Templates | Template view: the view (the templates, the brands, the logos, the colors, the footers) | TC-SA-20-05-015 |
| 5.2 Branded Communication Templates | Audit logging of the branded template creation | TC-SA-20-05-016 |
| 5.2 Branded Communication Templates | Rule: the template is the pattern (the template, the brand, the logo, the colors, the footer); the template is the reuse | TC-SA-20-05-009 |
| 5.2 Branded Communication Templates | Rule: the brand is the identity (the brand of the template, the name); the brand is the name | TC-SA-20-05-010 |
| 5.2 Branded Communication Templates | Rule: the logo is the mark (the logo of the template, the image); the logo is the symbol | TC-SA-20-05-011 |
| 5.2 Branded Communication Templates | Rule: the footer is the base (the footer of the template, the text, the links); the footer is the closing | TC-SA-20-05-013 |
| 5.2 Branded Communication Templates | Rule: the template is branded (the templates, the brands, the logos, the colors, the footers); the identity is managed | TC-SA-20-05-015 |
| 5.2 Branded Communication Templates | Rule: branded template creation is audit-logged with the template, brand, and timestamp | TC-SA-20-05-016 |
| 5.3 Template Versioning | Version: the version (the version, the template, the change, the date) | TC-SA-20-05-017 |
| 5.3 Template Versioning | Template: the template (the template, the subject, the body, the variables) | TC-SA-20-05-018 |
| 5.3 Template Versioning | Version change: the change (the change of the version, the edit, the note) | TC-SA-20-05-019 |
| 5.3 Template Versioning | Version date: the date (the date of the version, the time) | TC-SA-20-05-020 |
| 5.3 Template Versioning | Version number: the number (the number of the version, the sequence) | TC-SA-20-05-021 |
| 5.3 Template Versioning | Version status: the status (the active, the archived) | TC-SA-20-05-022 |
| 5.3 Template Versioning | Version view: the view (the versions, the templates, the changes, the dates) | TC-SA-20-05-023 |
| 5.3 Template Versioning | Audit logging of the template versioning | TC-SA-20-05-024 |
| 5.3 Template Versioning | Rule: the version is the history (the version, the template, the change, the date); the version is the record | TC-SA-20-05-017 |
| 5.3 Template Versioning | Rule: the template is the pattern (the template, the subject, the body, the variables); the template is the reuse | TC-SA-20-05-018 |
| 5.3 Template Versioning | Rule: the version change is the edit (the change of the version, the edit, the note); the change is the modification | TC-SA-20-05-019 |
| 5.3 Template Versioning | Rule: the version number is the sequence (the number of the version, the sequence); the number is the order | TC-SA-20-05-021 |
| 5.3 Template Versioning | Rule: the template is versioned (the versions, the templates, the changes, the dates); the history is managed | TC-SA-20-05-023 |
| 5.3 Template Versioning | Rule: template versioning is audit-logged with the version, template, and timestamp | TC-SA-20-05-024 |

## 5.1 Email Templates for Outreach

### TC-SA-20-05-001 — Template: the template (the template, the subject, the body, the variables); the template is the pattern
**Type:** Positive
**Covers:** 5.1 → Template: the template (the template, the subject, the body, the variables); Rule: the template is the reuse (the template, the subject, the body, the variables); the template is the pattern
**Preconditions:** Super Admin is logged in.
**Steps:**
1. Open Marketing & Communication → Communication Templates → Email Templates for Outreach.
2. Create the template: the template (the template, the subject, the body, the variables) — verify the template is the reuse.
3. Verify the template shows the subject, the body, and the variables.
4. Save the template — verify it appears in the template list and can be reused in a campaign.
**Expected Result:** The template is created — the template, the subject, the body, and the variables are the pattern.
**Priority:** Critical

### TC-SA-20-05-002 — Template subject: the subject (the subject of the template, the text); the subject is the title
**Type:** Positive
**Covers:** 5.1 → Template subject: the subject (the subject of the template, the text); Rule: the template subject is the headline (the subject of the template, the text); the subject is the title
**Preconditions:** A template is being created.
**Steps:**
1. Set the template subject: the subject (the subject of the template, the text) — verify the template subject is the headline.
2. Verify the subject text is shown in the template.
3. Verify the subject is used when the template is applied to an email.
**Expected Result:** The template subject is set — the subject of the template and the text are the title.
**Priority:** High

### TC-SA-20-05-003 — Template body: the body (the body of the template, the text, the variables); the body is the content
**Type:** Positive
**Covers:** 5.1 → Template body: the body (the body of the template, the text, the variables); Rule: the template body is the message (the body of the template, the text, the variables); the body is the content
**Preconditions:** A template is being created.
**Steps:**
1. Create the template body: the body (the body of the template, the text, the variables) — verify the template body is the message.
2. Verify the body shows the text and the variables.
3. Verify the body renders correctly when the template is applied.
**Expected Result:** The template body is created — the body of the template, the text, and the variables are the content.
**Priority:** High

### TC-SA-20-05-004 — Template variables: the variables (the variables of the template, e.g., the name, the course); the variables are the dynamic parts
**Type:** Edge
**Covers:** 5.1 → Template variables: the variables (the variables of the template, e.g., the name, the course); Rule: the template variables are the placeholders (the variables of the template, e.g., the name, the course); the variables are the dynamic parts
**Preconditions:** A template with variables (name, course) exists; a recipient whose variable data is missing (missing-data edge) is also prepared.
**Steps:**
1. Set the template variables: the variables (the variables of the template, e.g., the name, the course) — verify the template variables are the placeholders.
2. Apply the template to a recipient with full data — verify each variable is replaced with the recipient's value.
3. Apply the template to the recipient with missing data — verify the missing variable is handled (fallback text or blank, no raw placeholder leaked to the recipient).
**Expected Result:** The template variables work — the variables of the template (the name, the course) are the dynamic parts; missing data is handled without leaking placeholders.
**Priority:** High

### TC-SA-20-05-005 — Template type: the type (the type of the template, e.g., the welcome, the reminder, the offer); the type is the category
**Type:** Positive
**Covers:** 5.1 → Template type: the type (the type of the template, e.g., the welcome, the reminder, the offer)
**Preconditions:** Templates of welcome, reminder, and offer types exist.
**Steps:**
1. Set the template type: the type (the type of the template, e.g., the welcome, the reminder, the offer) — verify the template type is the category.
2. Verify each template shows its type.
3. Verify templates can be filtered by type.
**Expected Result:** The template type is set — the type of the template (the welcome, the reminder, the offer) is the category.
**Priority:** High

### TC-SA-20-05-006 — Template status: the status (the active, the inactive); the status is the state
**Type:** Positive
**Covers:** 5.1 → Template status: the status (the active, the inactive)
**Preconditions:** Templates with active and inactive statuses exist.
**Steps:**
1. View the template status: the status (the active, the inactive) — verify the template status is the state.
2. Deactivate a template — verify it cannot be used in new campaigns.
3. Reactivate it — verify it can be used again.
**Expected Result:** The template status is shown — the active and the inactive are the state.
**Priority:** High

### TC-SA-20-05-007 — Template view: the view (the templates, the subjects, the bodies, the variables); the reuse is managed
**Type:** Positive
**Covers:** 5.1 → Template view: the view (the templates, the subjects, the bodies, the variables); Rule: the template is created (the templates, the subjects, the bodies, the variables); the reuse is managed
**Preconditions:** Multiple templates exist.
**Steps:**
1. View the templates: the view (the templates, the subjects, the bodies, the variables) — verify the template is created.
2. Verify each template shows the subject, the body, and the variables.
3. Verify the reuse is managed (create, edit, deactivate, reuse in campaigns).
**Expected Result:** The templates are viewed — the templates, the subjects, the bodies, and the variables are visible; the reuse is managed.
**Priority:** High

### TC-SA-20-05-008 — Template creation is audit-logged with the template, type, and timestamp
**Type:** Positive
**Covers:** 5.1 → Audit logging of the template creation; Rule: template creation is audit-logged with the template, type, and timestamp
**Preconditions:** Super Admin has created a template.
**Steps:**
1. Open the audit trail and filter by "template".
2. Verify entries show the template, the type, and the timestamp.
**Expected Result:** The template creation is audit-logged with the template, type, and timestamp.
**Priority:** Critical

## 5.2 Branded Communication Templates

### TC-SA-20-05-009 — Template: the template (the template, the brand, the logo, the colors, the footer); the template is the reuse
**Type:** Positive
**Covers:** 5.2 → Template: the template (the template, the brand, the logo, the colors, the footer); Rule: the template is the pattern (the template, the brand, the logo, the colors, the footer); the template is the reuse
**Preconditions:** Super Admin is logged in; brand assets are available.
**Steps:**
1. Open Marketing & Communication → Communication Templates → Branded Communication Templates.
2. Create the branded template: the template (the template, the brand, the logo, the colors, the footer) — verify the template is the pattern.
3. Verify the template shows the brand, the logo, the colors, and the footer.
4. Save the template — verify it appears in the branded template list.
**Expected Result:** The branded template is created — the template, the brand, the logo, the colors, and the footer are the reuse.
**Priority:** Critical

### TC-SA-20-05-010 — Brand: the brand (the brand of the template, the name); the brand is the name
**Type:** Positive
**Covers:** 5.2 → Brand: the brand (the brand of the template, the name); Rule: the brand is the identity (the brand of the template, the name); the brand is the name
**Preconditions:** A branded template is being created; brand names are available.
**Steps:**
1. Select the brand: the brand (the brand of the template, the name) — verify the brand is the identity.
2. Verify the brand name is shown on the template.
3. Verify the brand is applied consistently across the template.
**Expected Result:** The brand is selected — the brand of the template and the name are the identity.
**Priority:** High

### TC-SA-20-05-011 — Logo: the logo (the logo of the template, the image); the logo is the symbol
**Type:** Positive
**Covers:** 5.2 → Logo: the logo (the logo of the template, the image); Rule: the logo is the mark (the logo of the template, the image); the logo is the symbol
**Preconditions:** A branded template is being created; logo images are available.
**Steps:**
1. Set the logo: the logo (the logo of the template, the image) — verify the logo is the mark.
2. Verify the logo image is shown on the template.
3. Verify the logo renders correctly (not distorted, correct size) in the output.
**Expected Result:** The logo is set — the logo of the template and the image are the symbol.
**Priority:** High

### TC-SA-20-05-012 — Colors: the colors (the colors of the template, the palette); the colors are the theme
**Type:** Positive
**Covers:** 5.2 → Colors: the colors (the colors of the template, the palette)
**Preconditions:** A branded template is being created; color palettes are available.
**Steps:**
1. Set the colors: the colors (the colors of the template, the palette) — verify the colors are the theme.
2. Verify the palette is applied to the template (headers, buttons, accents).
3. Verify the colors render correctly in the output.
**Expected Result:** The colors are set — the colors of the template and the palette are the theme.
**Priority:** High

### TC-SA-20-05-013 — Footer: the footer (the footer of the template, the text, the links); the footer is the closing
**Type:** Positive
**Covers:** 5.2 → Footer: the footer (the footer of the template, the text, the links); Rule: the footer is the base (the footer of the template, the text, the links); the footer is the closing
**Preconditions:** A branded template is being created.
**Steps:**
1. Set the footer: the footer (the footer of the template, the text, the links) — verify the footer is the base.
2. Verify the footer shows the text and the links.
3. Click a footer link in the rendered output — verify it navigates to the correct destination.
**Expected Result:** The footer is set — the footer of the template, the text, and the links are the closing.
**Priority:** High

### TC-SA-20-05-014 — Template status: the status (the active, the inactive); the status is the state
**Type:** Positive
**Covers:** 5.2 → Template status: the status (the active, the inactive)
**Preconditions:** Branded templates with active and inactive statuses exist.
**Steps:**
1. View the template status: the status (the active, the inactive) — verify the template status is the state.
2. Deactivate a branded template — verify it cannot be used in new communications.
3. Reactivate it — verify it can be used again.
**Expected Result:** The template status is shown — the active and the inactive are the state.
**Priority:** High

### TC-SA-20-05-015 — Template view: the view (the templates, the brands, the logos, the colors, the footers); the identity is managed
**Type:** Positive
**Covers:** 5.2 → Template view: the view (the templates, the brands, the logos, the colors, the footers); Rule: the template is branded (the templates, the brands, the logos, the colors, the footers); the identity is managed
**Preconditions:** Multiple branded templates exist.
**Steps:**
1. View the branded templates: the view (the templates, the brands, the logos, the colors, the footers) — verify the template is branded.
2. Verify each template shows the brand, the logo, the colors, and the footer.
3. Verify the identity is managed (create, edit, deactivate).
**Expected Result:** The branded templates are viewed — the templates, the brands, the logos, the colors, and the footers are visible; the identity is managed.
**Priority:** High

### TC-SA-20-05-016 — Branded template creation is audit-logged with the template, brand, and timestamp
**Type:** Positive
**Covers:** 5.2 → Audit logging of the branded template creation; Rule: branded template creation is audit-logged with the template, brand, and timestamp
**Preconditions:** Super Admin has created a branded template.
**Steps:**
1. Open the audit trail and filter by "branded template".
2. Verify entries show the template, the brand, and the timestamp.
**Expected Result:** The branded template creation is audit-logged with the template, brand, and timestamp.
**Priority:** Critical

## 5.3 Template Versioning

### TC-SA-20-05-017 — Version: the version (the version, the template, the change, the date); the version is the record
**Type:** Positive
**Covers:** 5.3 → Version: the version (the version, the template, the change, the date); Rule: the version is the history (the version, the template, the change, the date); the version is the record
**Preconditions:** Super Admin is logged in; a template exists.
**Steps:**
1. Open Marketing & Communication → Communication Templates → Template Versioning.
2. Version the template: the version (the version, the template, the change, the date) — verify the version is the history.
3. Verify the version shows the template, the change, and the date.
4. Edit the template — verify a new version is created automatically.
**Expected Result:** The version is created — the version, the template, the change, and the date are the record.
**Priority:** Critical

### TC-SA-20-05-018 — Template: the template (the template, the subject, the body, the variables); the template is the reuse
**Type:** Positive
**Covers:** 5.3 → Template: the template (the template, the subject, the body, the variables); Rule: the template is the pattern (the template, the subject, the body, the variables); the template is the reuse
**Preconditions:** Multiple templates exist.
**Steps:**
1. Select the template: the template (the template, the subject, the body, the variables) — verify the template is the pattern.
2. Verify the template shows the subject, the body, and the variables.
3. Verify versioning is tracked per template.
**Expected Result:** The template is selected — the template, the subject, the body, and the variables are the reuse.
**Priority:** High

### TC-SA-20-05-019 — Version change: the change (the change of the version, the edit, the note); the change is the modification
**Type:** Positive
**Covers:** 5.3 → Version change: the change (the change of the version, the edit, the note); Rule: the version change is the edit (the change of the version, the edit, the note); the change is the modification
**Preconditions:** A template has been edited, creating a new version.
**Steps:**
1. View the version change: the change (the change of the version, the edit, the note) — verify the version change is the edit.
2. Verify the change shows the edit and the note.
3. Verify the change accurately describes what was modified between versions.
**Expected Result:** The version change is shown — the change of the version, the edit, and the note are the modification.
**Priority:** High

### TC-SA-20-05-020 — Version date: the date (the date of the version, the time); the date is the moment
**Type:** Positive
**Covers:** 5.3 → Version date: the date (the date of the version, the time)
**Preconditions:** A template has multiple versions.
**Steps:**
1. View the version date: the date (the date of the version, the time) — verify the version date is the moment.
2. Verify each version shows its date and time.
3. Verify the dates are in chronological order matching when the edits were made.
**Expected Result:** The version date is shown — the date of the version and the time are the moment.
**Priority:** High

### TC-SA-20-05-021 — Version number: the number (the number of the version, the sequence); the number is the order
**Type:** Edge
**Covers:** 5.3 → Version number: the number (the number of the version, the sequence); Rule: the version number is the sequence (the number of the version, the sequence); the number is the order
**Preconditions:** A template with multiple versions exists; a template that will receive many rapid successive edits (sequence edge) is also prepared.
**Steps:**
1. View the version number: the number (the number of the version, the sequence) — verify the version number is the sequence.
2. Verify version numbers increment correctly (1, 2, 3, …) with no gaps or duplicates.
3. Make 5 rapid successive edits — verify each creates a distinct, correctly sequenced version number.
**Expected Result:** The version number is shown — the number of the version and the sequence are the order; rapid edits never skip or duplicate numbers.
**Priority:** High

### TC-SA-20-05-022 — Version status: the status (the active, the archived); the status is the state
**Type:** Positive
**Covers:** 5.3 → Version status: the status (the active, the archived)
**Preconditions:** Template versions with active and archived statuses exist.
**Steps:**
1. View the version status: the status (the active, the archived) — verify the version status is the state.
2. Verify the latest version is active and older versions are archived.
3. Archive the active version — verify it is no longer used for new sends; restore it — verify it becomes active again.
**Expected Result:** The version status is shown — the active and the archived are the state.
**Priority:** High

### TC-SA-20-05-023 — Version view: the view (the versions, the templates, the changes, the dates); the history is managed
**Type:** Positive
**Covers:** 5.3 → Version view: the view (the versions, the templates, the changes, the dates); Rule: the template is versioned (the versions, the templates, the changes, the dates); the history is managed
**Preconditions:** Multiple templates with multiple versions exist.
**Steps:**
1. View the versions: the view (the versions, the templates, the changes, the dates) — verify the template is versioned.
2. Verify each version shows the template, the change, and the date.
3. Verify the history is managed (view, compare, restore).
**Expected Result:** The versions are viewed — the versions, the templates, the changes, and the dates are visible; the history is managed.
**Priority:** High

### TC-SA-20-05-024 — Template versioning is audit-logged with the version, template, and timestamp
**Type:** Positive
**Covers:** 5.3 → Audit logging of the template versioning; Rule: template versioning is audit-logged with the version, template, and timestamp
**Preconditions:** Super Admin has versioned a template.
**Steps:**
1. Open the audit trail and filter by "template version".
2. Verify entries show the version, the template, and the timestamp.
**Expected Result:** The template versioning is audit-logged with the version, template, and timestamp.
**Priority:** Critical
