Background
The confirmation dialog is a missing piece on the donor delight badge experiment.
This was falling between the gaps on the code optimization and focus on animation, TestKitchen setup and codebase.
Goal
Add the confirmation dialog.
Acceptance criteria for done
- For treatment group 'treatment-c-delightful' the "hide badge" chip shows. When clicked a confirmation dialog appears.
- For treatment group 'treatment-b-simple' the "hide badge" a hide link appears in the CdxPopOver. When clicked a confirmation dialog should appear.
- Ensure the confirmation dialog is shown and behaving appropriately.
- The confirmation dialog should only show when clicked.
- When I click "Keep it" the confirmation dialog is dismissed
- When I click "Yes, hide the badge" the badge is removed and does not reappear when I refresh the page.
BDD
Feature: Hide-badge confirmation dialog
Scenario: Open the dialog (treatment-b-simple)
Given I am a logged-out donor in treatment-b-simple with the badge visible
When I tap the badge and tap the "Remove badge" link in the popover
Then a confirmation dialog "Hide this badge?" appears
Scenario: Open the dialog (treatment-c-delightful)
Given I am a logged-out donor in treatment-c-delightful with the badge visible
When I tap the badge and tap the "Remove badge" chip
Then the same confirmation dialog appears
Scenario: Dialog actions
Given the confirmation dialog is open
When I click "Keep it"
Then the dialog is dismissed and the badge remains
When I instead click "Yes, hide the badge"
Then the badge is removed and does not reappear on refreshTest Plan
Test Case 1: Treatment-b-simple opens the dialog
AC1: Tap badge -> popover "Remove badge" link -> confirmation dialog "Hide this badge?" appears.
Test Case 2: Treatment-c-delightful opens the dialog
AC2: Tap badge -> "Remove badge" chip (#minerva-badge-button-remove) -> same confirmation dialog appears.
Test Case 3: Dialog only shows when clicked
AC3: Dialog is not present/shown until the remove control is clicked.
Test Case 4: Keep it
AC4: Click "Keep it" -> dialog dismissed, badge still visible, pref unchanged.
Test Case 5: Yes, hide the badge
AC5: Click "Yes, hide the badge" -> badge removed and stays hidden on refresh (see also T427311).
Test Case 6: Button styling
AC6: Primary action "Yes, hide the badge" is destructive (red); "Keep it" is the default action.
Test Results
| AC | Status | Details for test run T427966#12008076 |
|---|---|---|
| 1 | ✅ | treatment-b: popover "Remove badge" link -> dialog "Hide this badge?" — see T427966_beta_AC1_1.png |
| 2 | ✅ | treatment-c: "Remove badge" chip (#minerva-badge-button-remove, ext-wc-is-visible) -> same dialog — see T427966_beta_AC1_2.png |
| 3 | ✅ | dialog absent until the remove control is clicked (never auto-shown) |
| 4 | ✅ | "Keep it" -> dialog dismissed, badge still visible, minerva-badge clientpref still 1 |
| 5 | ✅ | "Yes, hide the badge" -> badge removed, stays hidden on refresh (cross-ref T427311) |
| 6 | ✅ | primary button cdx-button--action-destructive --weight-primary (red); "Keep it" action-default |


