Admin CRM — Setting Email Test Cases

A. Document controlA. Kiểm soát tài liệu

Doc IDCPG-TC-CPG-CRM_Setting_Email_TestCases
VersionPhiên bản1.0
StatusTrạng tháiDraft
OwnerCPG BA / Architecture
AudienceĐối tượngQA, Product, Backend, Frontend
ClassificationPhân loạiInternal
Effective dateNgày hiệu lực01/12/2026
Related docs CRM Setting Email UC · CRM Setting Email FSD

B. Version historyB. Lịch sử phiên bản

Version Date Author ChangesThay đổi
1.0 01/12/2026 Khoa Trinh Version 1.0

C. Table of contentsC. Mục lục

D. ContentD. Nội dung

Index

Test ID Test name BR UC Category
ET-LIST-01 Load Email Template list 3.1.1 UC-ET-01 Function
ET-LIST-02 Display template metadata 3.1.1 UC-ET-01 Function
ET-LIST-03 Search template by name 3.1.1 UC-ET-02 Function
ET-LIST-04 Empty search result 3.1.1 UC-ET-02 Validation
ET-PREV-01 Open email preview 3.1.3 UC-ET-03 Function
ET-PREV-02 Render HTML content 3.1.3 UC-ET-03 Function
ET-PREV-03 Variable placeholders display 3.1.3 UC-ET-03 Function
ET-PREV-04 Close preview modal 3.1.3 UC-ET-03 Function
ET-PREV-05 Preview long content 3.1.3 UC-ET-03 Function
ET-EDIT-01 Open edit template modal 3.1.4 UC-ET-04 Function
ET-EDIT-02 Load existing subject 3.1.4 UC-ET-04 Function
ET-EDIT-03 Load HTML content 3.1.4 UC-ET-04 Function
ET-EDIT-04 Modify email subject 3.1.4 UC-ET-04 Function
ET-EDIT-05 Modify HTML content 3.1.4 UC-ET-04 Function
ET-EDIT-06 Cancel edit 3.1.4 UC-ET-04 Function
ET-EDIT-07 Scroll HTML editor 3.1.4 UC-ET-04 Function
ET-VAR-01 Display available variables 3.1.5 UC-ET-05 Function
ET-VAR-02 Copy variable to clipboard 3.1.5 UC-ET-05 Function
ET-VAR-03 Insert variable manually 3.1.5 UC-ET-05 Function
ET-VAR-04 Invalid variable handling 3.1.5 UC-ET-05 Validation
ET-VAR-05 Multiple variables usage 3.1.5 UC-ET-05 Function
ET-SAVE-01 Save template successfully 3.1.6 UC-ET-04 Function
ET-SAVE-02 Required subject empty 3.1.6 UC-ET-04 Validation
ET-SAVE-03 Empty email body 3.1.6 UC-ET-04 Validation
ET-SAVE-04 HTML syntax tolerance 3.1.6 UC-ET-04 Function
ET-SAVE-05 Save button loading 3.1.6 UC-ET-04 Function
ET-SEC-01 Admin can edit templates 3.1.7 UC-ET-01 Security
ET-SEC-02 Non-admin access restriction 3.1.7 UC-ET-07 Security
ET-SEC-03 Audit logging 3.1.7 UC-ET-07 Audit

Test cases

ET-LIST-01

Field Value
Test ID ET-LIST-01
Business Requirement ID 3.1.1
Category Function
Use Case ID UC-ET-01
Test name Load Email Template list
Preconditions User logged in with admin permission
Data —
Steps Navigate to Settings -> Email Templates
Expected result Email template cards are displayed correctly

ET-LIST-02

Field Value
Test ID ET-LIST-02
Business Requirement ID 3.1.1
Category Function
Use Case ID UC-ET-01
Test name Display template metadata
Preconditions Email templates exist
Data —
Steps View any template card
Expected result Subject, category, variables, and actions are visible

ET-LIST-03

Field Value
Test ID ET-LIST-03
Business Requirement ID 3.1.1
Category Function
Use Case ID UC-ET-02
Test name Search template by name
Preconditions Templates available
Data —
Steps Enter keyword in search box
Expected result Only matching templates are displayed

ET-LIST-04

Field Value
Test ID ET-LIST-04
Business Requirement ID 3.1.1
Category Validation
Use Case ID UC-ET-02
Test name Empty search result
Preconditions No template matches keyword
Data —
Steps Search with random keyword
Expected result Empty state message displayed

ET-PREV-01

Field Value
Test ID ET-PREV-01
Business Requirement ID 3.1.3
Category Function
Use Case ID UC-ET-03
Test name Open email preview
Preconditions Template exists
Data —
Steps Click "Preview" button
Expected result Preview modal opens

ET-PREV-02

Field Value
Test ID ET-PREV-02
Business Requirement ID 3.1.3
Category Function
Use Case ID UC-ET-03
Test name Render HTML content
Preconditions HTML body exists
Data —
Steps View preview
Expected result Email renders correctly with styles

ET-PREV-03

Field Value
Test ID ET-PREV-03
Business Requirement ID 3.1.3
Category Function
Use Case ID UC-ET-03
Test name Variable placeholders display
Preconditions Template contains variables
Data —
Steps View preview
Expected result Variables appear as placeholders

ET-PREV-04

Field Value
Test ID ET-PREV-04
Business Requirement ID 3.1.3
Category Function
Use Case ID UC-ET-03
Test name Close preview modal
Preconditions Preview open
Data —
Steps Click close (X) or Cancel
Expected result Modal closes without changes

ET-PREV-05

Field Value
Test ID ET-PREV-05
Business Requirement ID 3.1.3
Category Function
Use Case ID UC-ET-03
Test name Preview long content
Preconditions Large email body
Data —
Steps Scroll preview
Expected result Content scrolls smoothly

ET-EDIT-01

Field Value
Test ID ET-EDIT-01
Business Requirement ID 3.1.4
Category Function
Use Case ID UC-ET-04
Test name Open edit template modal
Preconditions Template exists
Data —
Steps Click "Edit"
Expected result Edit modal opens

ET-EDIT-02

Field Value
Test ID ET-EDIT-02
Business Requirement ID 3.1.4
Category Function
Use Case ID UC-ET-04
Test name Load existing subject
Preconditions Template exists
Data —
Steps Open edit modal
Expected result Subject field populated correctly

ET-EDIT-03

Field Value
Test ID ET-EDIT-03
Business Requirement ID 3.1.4
Category Function
Use Case ID UC-ET-04
Test name Load HTML content
Preconditions Template exists
Data —
Steps Scroll content editor
Expected result HTML content loads fully

ET-EDIT-04

Field Value
Test ID ET-EDIT-04
Business Requirement ID 3.1.4
Category Function
Use Case ID UC-ET-04
Test name Modify email subject
Preconditions Edit permission
Data —
Steps Change subject -> Save
Expected result Updated subject saved

ET-EDIT-05

Field Value
Test ID ET-EDIT-05
Business Requirement ID 3.1.4
Category Function
Use Case ID UC-ET-04
Test name Modify HTML content
Preconditions Edit permission
Data —
Steps Update content -> Save
Expected result Changes saved successfully

ET-EDIT-06

Field Value
Test ID ET-EDIT-06
Business Requirement ID 3.1.4
Category Function
Use Case ID UC-ET-04
Test name Cancel edit
Preconditions Edit modal open
Data —
Steps Click Cancel
Expected result No changes saved

ET-EDIT-07

Field Value
Test ID ET-EDIT-07
Business Requirement ID 3.1.4
Category Function
Use Case ID UC-ET-04
Test name Scroll HTML editor
Preconditions Long HTML content
Data —
Steps Scroll editor
Expected result Editor scrolls without UI break

ET-VAR-01

Field Value
Test ID ET-VAR-01
Business Requirement ID 3.1.5
Category Function
Use Case ID UC-ET-05
Test name Display available variables
Preconditions Template supports variables
Data —
Steps Open edit modal
Expected result Variable list displayed

ET-VAR-02

Field Value
Test ID ET-VAR-02
Business Requirement ID 3.1.5
Category Function
Use Case ID UC-ET-05
Test name Copy variable to clipboard
Preconditions Variables shown
Data —
Steps Click copy icon
Expected result Variable copied successfully

ET-VAR-03

Field Value
Test ID ET-VAR-03
Business Requirement ID 3.1.5
Category Function
Use Case ID UC-ET-05
Test name Insert variable manually
Preconditions HTML editor active
Data —
Steps Paste variable into content
Expected result Variable appears correctly

ET-VAR-04

Field Value
Test ID ET-VAR-04
Business Requirement ID 3.1.5
Category Validation
Use Case ID UC-ET-05
Test name Invalid variable handling
Preconditions Wrong variable added
Data —
Steps Save template
Expected result System allows save but variable unresolved

ET-VAR-05

Field Value
Test ID ET-VAR-05
Business Requirement ID 3.1.5
Category Function
Use Case ID UC-ET-05
Test name Multiple variables usage
Preconditions Multiple variables added
Data —
Steps Save and preview
Expected result All variables appear in preview

ET-SAVE-01

Field Value
Test ID ET-SAVE-01
Business Requirement ID 3.1.6
Category Function
Use Case ID UC-ET-04
Test name Save template successfully
Preconditions Valid content
Data —
Steps Click Save Changes
Expected result Success message shown

ET-SAVE-02

Field Value
Test ID ET-SAVE-02
Business Requirement ID 3.1.6
Category Validation
Use Case ID UC-ET-04
Test name Required subject empty
Preconditions Subject cleared
Data —
Steps Click Save
Expected result Validation error displayed

ET-SAVE-03

Field Value
Test ID ET-SAVE-03
Business Requirement ID 3.1.6
Category Validation
Use Case ID UC-ET-04
Test name Empty email body
Preconditions Body cleared
Data —
Steps Click Save
Expected result Validation error shown

ET-SAVE-04

Field Value
Test ID ET-SAVE-04
Business Requirement ID 3.1.6
Category Function
Use Case ID UC-ET-04
Test name HTML syntax tolerance
Preconditions Invalid HTML tags
Data —
Steps Save template
Expected result Template saved or warning shown

ET-SAVE-05

Field Value
Test ID ET-SAVE-05
Business Requirement ID 3.1.6
Category Function
Use Case ID UC-ET-04
Test name Save button loading
Preconditions Save initiated
Data —
Steps Observe button
Expected result Button shows loading state

ET-SEC-01

Field Value
Test ID ET-SEC-01
Business Requirement ID 3.1.7
Category Security
Use Case ID UC-ET-01
Test name Admin can edit templates
Preconditions Admin logged in
Data —
Steps Open edit modal
Expected result Edit allowed

ET-SEC-02

Field Value
Test ID ET-SEC-02
Business Requirement ID 3.1.7
Category Security
Use Case ID UC-ET-07
Test name Non-admin access restriction
Preconditions Limited role user
Data —
Steps Access Email Templates
Expected result Edit disabled or navigate to home page

ET-SEC-03

Field Value
Test ID ET-SEC-03
Business Requirement ID 3.1.7
Category Audit
Use Case ID UC-ET-07
Test name Audit logging
Preconditions Audit enabled
Data —
Steps Edit and save template
Expected result Audit log created

E. ReferencesE. Tham chiếu