Skip to content

Certificates - QA Test Plan

The Certificates app enables instructors to design certificate templates using HTML/CSS, issue certificates to students with unique verification codes, and manage the lifecycle of issued certificates. Routes are under /business/apps/certificates/.

  • {{student_name}} — Full name of the student
  • {{course_name}} — Name of the course
  • {{completion_date}} — Date of completion
  • {{certificate_code}} — Unique certificate code
  • {{instructor_name}} — Instructor full name
  • active — Template can be used to issue certificates
  • inactive — Template is in draft / deactivated state
  • active — Certificate is valid and verifiable
  • revoked — Certificate has been revoked
  • expired — Certificate has expired

IDDescriptionPreconditionsStepsExpected ResultPriority
CT-001Dashboard loads with statsUser is logged in as instructorNavigate to /business/apps/certificatesPage shows Templates count and Issued count stat cardsP0
CT-002Nav cards link correctlyUser is logged inView dashboard”Templates” and “Issued Certificates” nav cards are visible and link to correct routesP0
CT-003Recent templates displayTemplates existView dashboardUp to 5 templates shown with title, description, and status badgeP1
CT-004Template status badges render correctlyTemplates with active/inactive status existView dashboardActive templates show default badge; inactive show destructive badgeP1
CT-005Empty state when no templatesNo templates existView dashboard”No templates yet” message shownP1
CT-006Template links navigate to detailTemplates existClick on a template rowNavigates to /business/apps/certificates/templates/{id}P0

IDDescriptionPreconditionsStepsExpected ResultPriority
CT-010Template list page loadsUser is logged inNavigate to /business/apps/certificates/templatesHeader with back arrow, title, and “New Template” button; list of templatesP0
CT-011Create template via dialogUser is logged in1. Click “New Template” 2. Enter title and optional description 3. Click “Create Template”Template is created; user is redirected to template detail page with ?new=1 paramP0
CT-012Create template - title requiredUser is logged inOpen dialog, leave title empty, submitValidation error on title fieldP0
CT-013Delete template with confirmationTemplate exists, no issued certs1. Click trash icon on a template 2. Confirm in dialogTemplate is deleted; toast success; list refreshesP0
CT-014Delete template with issued certsTemplate has issued certificatesClick trash icon, confirm deletionTemplate is deactivated instead of deleted (per UI warning)P1
CT-015Cancel delete dialogDelete confirmation shownClick “Cancel” in delete dialogDialog closes; template remainsP2
CT-016Empty state shows CTANo templates existView templates page”No templates yet” message with “Create Template” buttonP1

IDDescriptionPreconditionsStepsExpected ResultPriority
CT-020Template detail page loadsTemplate exists, user is ownerNavigate to /business/apps/certificates/templates/{id}Page shows title, status badge, edit form with title, description, orientation, background image, body HTML, and CSS fieldsP0
CT-021New template toast on creationRedirected with ?new=1Navigate to template detail with ?new=1Success toast “Template created!” appears on mountP1
CT-022Update template detailsTemplate existsEdit title, description, and body HTML; click “Save Template”Template is updated; success toast appearsP0
CT-023Set orientation to landscapeTemplate existsSelect “Landscape” in orientation dropdownOrientation field updates; preview iframe uses landscape height (360px)P1
CT-024Set orientation to portraitTemplate existsSelect “Portrait” in orientation dropdownOrientation field updates; preview iframe uses portrait height (500px)P1
CT-025Edit Body HTML fieldTemplate existsEnter valid HTML in Body HTML textareaContent is saved; HTML accepts template variable placeholdersP0
CT-026Edit Custom CSS fieldTemplate existsEnter CSS styles in CSS textareaCSS is applied in preview; saved on updateP1
CT-027Available variables are listedTemplate detail page loadedScroll to variables sectionAll 5 variables displayed with descriptions: student_name, course_name, completion_date, certificate_code, instructor_nameP0

IDDescriptionPreconditionsStepsExpected ResultPriority
CT-030Toggle preview onTemplate has body HTMLClick “Preview” buttonForm is hidden; preview iframe renders with placeholder data (Jane Doe, Sample Course, etc.)P0
CT-031Toggle preview offPreview is visibleClick “Hide Preview” buttonPreview is hidden; edit form is shown againP0
CT-032Preview replaces variables with sample dataTemplate body contains variablesOpen preview{{student_name}} replaced with “Jane Doe”, {{course_name}} with “Sample Course”, {{completion_date}} with current date, {{certificate_code}} with “CERT-PREVIEW-001”, {{instructor_name}} with “John Smith”P0
CT-033Preview applies custom CSSTemplate has CSSOpen previewCSS is injected into iframe <style> tag and applied to contentP1
CT-034Empty body shows placeholder messageBody HTML is emptyOpen preview”Add HTML content to see a preview” message displayed instead of iframeP1
CT-035Preview iframe is sandboxedPreview is openInspect iframe elementIframe has sandbox="allow-same-origin" attributeP2

IDDescriptionPreconditionsStepsExpected ResultPriority
CT-040Activate inactive templateTemplate status is inactiveClick “Activate” buttonTemplate status changes to active; toast success; page refreshesP0
CT-041Deactivate active templateTemplate status is activeClick “Set to Draft” buttonTemplate status changes to inactive; toast success; page refreshesP0
CT-042Delete template from detail pageTemplate existsClick trash icon, confirm in dialogTemplate is deleted; user redirected to templates listP0
CT-043Delete with issued certs warningTemplate has issued certsView delete confirmation dialogWarning text mentions deactivation if certificates have been issuedP1
CT-044Activation shows loading stateUser clicks ActivateObserve button during actionButton shows spinner and is disabled during the requestP2

IDDescriptionPreconditionsStepsExpected ResultPriority
CT-050Issue certificate via dialogTemplate is active1. Click “Issue” button 2. Enter valid user ID 3. Click “Issue”Certificate is issued; success toast; issued list refreshesP0
CT-051Issue certificate - user ID requiredIssue dialog is openLeave user ID empty, click “Issue”Issue button is disabled when user ID is emptyP0
CT-052Issued certificates table displaysCertificates have been issuedView template detail pageTable shows Student name, certificate Code (linked to verify route), Issued date, and Status badgeP0
CT-053Certificate code links to verify pageCertificate is issuedClick certificate code linkNavigates to /verify/{certificate_code}P1
CT-054Issue failure shows error toastServer error during issuanceAttempt to issue (simulated failure)Error toast “Failed to issue certificate” appearsP1

IDDescriptionPreconditionsStepsExpected ResultPriority
CT-060Issued certificates page loadsUser is instructor with issued certsNavigate to /business/apps/certificates/issuedTable displays all issued certificates with Student (avatar + name), Code, Issued date, and Status columnsP0
CT-061Revoke active certificateCertificate status is active1. Click revoke (ban) icon 2. Confirm in dialogCertificate status changes to revoked; toast success; table refreshesP0
CT-062Revoke button hidden for non-activeCertificate status is revoked or expiredView rowNo revoke button is shown for that certificateP1
CT-063Cancel revoke dialogRevoke confirmation shownClick “Cancel”Dialog closes; certificate status unchangedP2
CT-064Empty state when no issued certsNo certificates issuedView issued page”No certificates have been issued yet” message with iconP1
CT-065Student avatar renders when availableCertificate user has avatar_urlView issued tableStudent column shows avatar image next to nameP2

IDDescriptionPreconditionsStepsExpected ResultPriority
CT-070Unauthenticated user gets 401User is not logged inNavigate to templates or issued page401 error thrownP0
CT-071Non-owner cannot view template detailLogged in as different instructorNavigate to another instructor’s template403 error thrownP0
CT-072Non-existent template returns 404Invalid template IDNavigate to /business/apps/certificates/templates/nonexistent404 “Template not found” errorP1