Skip to content

Acceptance Criteria — Web Portal, Manage Advertisements (WPAD)

User Story

As a Web Portal Admin I want to choose between Advertisement type (the existing scheduled banner/video shown on the Damage page) and Banner type (upload a banner and assign it to one or more specific pages), with only the fields relevant to the chosen type shown So that I can target promotional banners to specific app pages while keeping the existing Damage-page advertisement scheduling behavior intact

Scenario-based AC — Given / When / Then

AC ID Scenario Jira Type Criticality Given (context) When (action / trigger) Then (expected outcome) Linked TCs Status
AC-WPAD-01 Add/Edit form offers exactly two Ad type options RC-115 Happy 🔴 Critical Admin has the Add New (or Edit) advertisement form open Admin opens the Ad type dropdown Exactly two options are offered: Advertisement and Banner TC-WPAD-001 Draft
AC-WPAD-02 Ad type "Advertisement" retains the existing schedule-based fields RC-115 Happy 🔴 Critical Admin selects Advertisement as the Ad type Admin views the rest of the form The form shows Kind (Banner/Video), Time duration, and Displayable — the same fields as the pre-existing Advertisement behavior TC-WPAD-002 Draft
AC-WPAD-03 Ad type "Banner" reveals the Target Pages field RC-115 Happy 🔴 Critical Admin has the Add New (or Edit) form open Admin selects Banner as the Ad type A Target Pages field (multi-select) becomes available on the form TC-WPAD-003 Draft
AC-WPAD-04 Time duration is not shown when Ad type is Banner RC-115 Negative 🟠 High Admin has the Add New (or Edit) form open Admin selects Banner as the Ad type The Time duration field is not shown/applicable on the form TC-WPAD-004 Draft
AC-WPAD-05 Admin assigns a single banner to multiple pages at once RC-115 Happy 🔴 Critical Ad type is Banner and the Target Pages field is open Admin selects more than one page (e.g. Home Page and My Vehicles) and saves The banner is saved with all selected pages assigned
And the banner appears on every one of those pages
TC-WPAD-005 Draft
AC-WPAD-06 Target Pages lists exactly the 8 defined page options RC-115 Happy 🟠 High Ad type is Banner Admin opens the Target Pages dropdown Exactly these 8 options are listed: Home Page, My Vehicles, My Accidents, Notifications, Saved Vouchers, Lawyers, Expert, Report Accident TC-WPAD-006 Draft
AC-WPAD-07 Assigning a new banner to a page replaces the page's currently displayed banner RC-115 Happy 🟠 High A page (e.g. My Vehicles) already has an active, Displayable banner assigned Admin uploads and assigns a different banner to that same page, and saves The new banner displays on that page
And the previously assigned banner no longer displays there
TC-WPAD-007 Draft
AC-WPAD-08 Admin uploads a file in each supported format RC-115 Happy 🔴 Critical Admin has the media upload field open on the Add/Edit form Admin uploads a file with one of: .png, .jpeg, .jpg, .gif, .mp4, .heic, .heif The file is accepted and attached to the record TC-WPAD-008 Draft
AC-WPAD-09 Uploading an unsupported file type is rejected RC-115 Negative 🟠 High Admin has the media upload field open Admin attempts to upload a file with an unsupported extension (e.g. .pdf, .docx) The upload is rejected before saving
And an error message states the accepted formats
TC-WPAD-009 Draft
AC-WPAD-10 An uploaded HEIC/HEIF file renders as a visible photo RC-115 Negative 🟠 High Admin uploads a .heic or .heif file Admin views the upload preview and the saved record's media The photo renders and displays correctly — it is not blank/broken in either the upload preview or the saved record TC-WPAD-010 Draft
AC-WPAD-11 Unchecking Displayable hides an Advertisement-type ad from the web app RC-115 Negative 🔴 Critical An Advertisement-type ad exists with Displayable unchecked Admin (or an end user) views the Damage page on the web app The ad does not display on the Damage page TC-WPAD-012 Draft
AC-WPAD-12 Checking Displayable shows the ad/banner on its target surface RC-115 Happy 🔴 Critical An Advertisement-type ad (Damage page) or a Banner-type ad (its assigned Target Pages) has Displayable checked Admin (or an end user) views the relevant page(s) on the web app The ad/banner displays on the Damage page (Advertisement) or on every assigned Target Page (Banner) TC-WPAD-013 Draft
AC-WPAD-13 A Banner-type image displays in full on its assigned page RC-115 Negative 🟠 High A Banner-type ad with an image is assigned to a page and Displayable End user views that assigned page The full banner image is shown — not cropped or partially cut off TC-WPAD-014 Draft
AC-WPAD-14 A Banner-type media item is positioned at the end of its assigned page RC-115 Negative 🟡 Medium A Banner-type ad (photo or video) is assigned to a page and Displayable End user scrolls through that assigned page The banner media (photo or video) is positioned at the end of the page's content, not interleaved elsewhere TC-WPAD-015 Draft
AC-WPAD-15 Admin successfully adds a new advertisement/banner RC-115 Happy 🔴 Critical Admin selects Add New on Manage Advertisements Admin fills the required fields for the chosen Ad type and media, then saves A new record is created and appears in the Manage Advertisements list with the entered data TC-WPAD-016 Draft
AC-WPAD-16 Opening Edit pre-fills the record's current saved data RC-115 Happy 🟠 High An existing advertisement/banner record has known saved field values Admin selects Edit for that record The Edit panel opens pre-filled with that record's saved Name, Ad type, Kind and/or Target Pages (per Ad type), Displayable state, and media — no field is blank or stale TC-WPAD-017 Draft
AC-WPAD-17 Saving an edit updates the record and takes effect immediately RC-115 Happy 🟠 High Admin has the Edit panel open and changes one or more fields Admin selects Save The record is updated
And the Manage Advertisements list, and the record's effect on the web app, reflect the new values
TC-WPAD-018 Draft
AC-WPAD-18 Admin uploads a video for a Banner-type ad RC-115 Happy 🔴 Critical Admin has the Add New (or Edit) form open with Ad type = Banner and Kind = Video Admin uploads a .mp4 file and saves The video is accepted and saved to the record
And the video plays on every page assigned to that banner
TC-WPAD-011 Draft

Business Rules (rule-based AC)

Rule ID Business Rule Jira Rationale / Source Criticality Linked TCs Status
BR-WPAD-01 The Kind field (Banner/Video) applies regardless of Ad type; Time duration applies only when Ad type = Advertisement and must not be shown/applicable when Ad type = Banner. RC-115 Ticket comment (Ann, QA Bug Report, 2026-08-03), Issue 5: "Duration: apply for only Ad type: Advertisement, Should not show when Ad type: Banner". Confirmed by stakeholder (chat, 2026-08-11). 🟠 High TC-WPAD-004 Draft
BR-WPAD-02 The upload field accepts only .png, .jpeg, .jpg, .gif, .mp4, .heic, .heif; any other file type must be rejected before saving. RC-115 Ticket: "Ensure the upload field supports the following media formats..." 🟠 High TC-WPAD-008, TC-WPAD-009 Draft
BR-WPAD-03 Unchecking Displayable must fully hide the ad/banner from its target surface (Damage page for Advertisement, assigned Target Pages for Banner) — no partial or delayed hiding. RC-115 Ticket comment (Ann, QA Bug Report, 2026-08-03), Issue 3: "Uncheck 'Displayable' but the ad still displays" — regression guard 🔴 Critical TC-WPAD-012 Draft
BR-WPAD-04 A page may display at most one active banner at a time — assigning/uploading a new banner to a page replaces whichever banner is currently displayed there, it does not add a second one. RC-115 Ticket: "Uploading and assigning a new banner to a page will update/replace the banner currently displayed on that page" 🟠 High TC-WPAD-007 Draft
BR-WPAD-05 The combination Ad type = Banner with Kind = Video is fully supported — Admin can upload a video for a Banner-type ad, and it is assigned/displayed on the selected Target Pages the same as a photo Banner. RC-115 Stakeholder correction (chat, 2026-08-11): "hiện bình thường có thể upload video lên" (video upload currently works normally) — supersedes the ticket comment note "Not apply Ad type: Banner, Kind: Video yet" (Ann, QA Bug Report, 2026-08-03), which is now outdated 🟠 High TC-WPAD-011 Draft
BR-WPAD-08 Both photo and video Banner-type media display at the end of their assigned page's content — positioning is the same regardless of media kind. RC-115 Stakeholder confirmation (chat, 2026-08-11): "Các photo hoặc video đều hiện ở cuối trang" (photos and videos are all shown at the bottom of the page) 🟡 Medium TC-WPAD-015 Draft
BR-WPAD-06 Displaying an Advertisement-type ad on the web app's Damage page must work — a Displayable ad must not silently fail to render. RC-115 Ticket comment (Ann, 2026-07-23), Issue 1: "not Display advertisement on web app" — regression guard 🔴 Critical TC-WPAD-013 Draft
BR-WPAD-07 Adding a new advertisement/banner via Add New must succeed for valid input — the Add action must not silently fail. RC-115 Ticket comment (Ann, 2026-07-16): "Can't add new advertisements/banners" — regression guard 🔴 Critical TC-WPAD-016 Draft

Column Guide

Column Description Values / Format
AC ID Unique scenario id — TCs trace back to this AC-WPAD-NN
Rule ID Unique business-rule id — TCs trace back to this BR-WPAD-NN
Scenario Short title of the behaviour, start with an action verb Plain text
Jira The ticket this AC came from [RC-115](url)
Type Class of scenario Happy / Alternate / Negative / Edge / Permission
Criticality Impact if this AC fails — drives the verifying TC's priority 🔴 Critical / 🟠 High / 🟡 Medium / ⚪ Low
Given Precondition / context true before the action One state per clause; <br>And … to compound
When The single action or event that triggers behaviour One trigger
Then Observable, verifiable outcome — pass/fail must be objective Include error code / message / state where relevant
Linked TCs TCs in 01_Features/wp_advertisement/wp_advertisement_tc.md that verify this AC TC-WPAD-NNN, comma-separated
Status Review state of the criterion Draft / Reviewed / Approved

Traceability

Jira ticket  ──▶  AC-WPAD-NN / BR-WPAD-NN  ──▶  TC-WPAD-NNN
 (the why)         (the what — this file)              (the how to verify)
  • Upward: header SRS ref + each row's Jira column link the AC to its source (RC-115).
  • Downward: the Linked TCs column lists the test cases that verify each AC — to be filled by /gen-tc.
  • Coverage rule: every Critical and High AC and every business rule must have ≥1 Linked TC. Flag any such AC with zero TCs as a coverage gap. Conversely, every TC must name the AC it verifies — no orphan TCs.