test(frontend): de-brittle actionAudit verified-outcome assertion

The 'trusted action review workspace' change (e13abf84f) reworked the verified
verification-outcome copy, breaking a branchcov2 assertion that hard-coded the old
label/detail. Assert 'VERIFIED' normalises to the canonical 'verified' result
instead of exact copy, so the test stays focused on the toLowerCase branch.
This commit is contained in:
rcourtman
2026-07-12 03:18:07 +01:00
parent e77ab9518d
commit 1968ba210c
@@ -252,17 +252,19 @@ describe('actionAuditPresentation branch coverage (supplemental)', () => {
});
it('normalises uppercase status to the canonical map key via toLowerCase()', () => {
// 'VERIFIED' must lowercase to the canonical 'verified' key and resolve to
// the same presentation. Asserting equality against the canonical result
// (rather than hard-coded copy) keeps this focused on the normalisation
// branch and robust to label/detail wording changes.
const canonical = getActionAuditVerificationOutcomePresentation({
verificationOutcome: { status: 'verified' },
});
expect(canonical).toBeDefined();
expect(
getActionAuditVerificationOutcomePresentation({
verificationOutcome: { status: 'VERIFIED' },
}),
).toStrictEqual({
label: 'Verification confirmed',
detail: 'Pulse confirmed the intended state after execution.',
evidenceSummary: undefined,
className:
'border-emerald-200 bg-emerald-50 text-emerald-800 dark:border-emerald-800 dark:bg-emerald-950/40 dark:text-emerald-300',
});
).toStrictEqual(canonical);
});
it('collapses a whitespace-only evidenceSummary to undefined', () => {