fix(campaign): use stable aggregate status filters

This commit is contained in:
2026-07-22 09:11:14 +02:00
parent 4eb651c6ac
commit ac3329cafe
2 changed files with 43 additions and 1 deletions

View File

@@ -23,6 +23,28 @@ assert(!page.includes("localStorage"), "the aggregate page does not persist repo
assert(!page.includes("sessionStorage"), "the aggregate page does not persist report data in session storage");
assert(page.includes("TableActionGroup"), "campaign selection uses the central icon-only table action group");
assert(page.includes("disabled: campaign.id === selectedFromUrl"), "the selected row action stays visible and disabled");
assert(page.includes('columnType: "from-list"'), "campaign status uses the stable shared list-filter model");
const expectedCampaignStatuses = [
"draft",
"validated",
"needs_review",
"ready_to_queue",
"queued",
"sending",
"sent",
"partially_completed",
"outcome_unknown",
"failed",
"cancelled",
"archived"
];
for (const status of expectedCampaignStatuses) {
assert(page.includes(`{ value: "${status}", label:`), `the aggregate list declares the ${status} status explicitly`);
}
const outcomeCardsStart = page.indexOf("Aggregate outcome cards are deliberately not filter shortcuts");
const outcomeCardsEnd = page.indexOf('<Card title="i18n:govoplan-campaign.population_and_exclusions', outcomeCardsStart);
assert(outcomeCardsStart >= 0 && outcomeCardsEnd > outcomeCardsStart, "the aggregate privacy boundary is documented beside the outcome cards");
assert(!page.slice(outcomeCardsStart, outcomeCardsEnd).includes("onClick"), "aggregate outcome cards cannot create unsuppressed filtered subgroups");
assert(!page.includes("{report.population.denominator_definition}"), "the known denominator contract uses a localized UI explanation");
assert(!page.includes("{report.privacy.rule}"), "the known privacy contract uses a localized UI explanation");
assert(page.includes("all_persisted_recipient_delivery_jobs_for_the_se.208e90cc"), "the denominator explanation is bilingual");