From 04e4f64a6e1b0fa7f02c093624e2bfdbe659831b Mon Sep 17 00:00:00 2001 From: rcourtman <8825017+rcourtman@users.noreply.github.com> Date: Wed, 7 Oct 2026 08:49:00 +0100 Subject: [PATCH] Pin the per-change presentation wrapper in the resource type guard The moved-alert change routes the resource change summary and the drawer timeline through getResourceChangePresentation, which wraps getResourceChangeKindPresentation so an alert close that was not a recovery reads as a move. The raw-source boundary guard still required the summary component to name the kind helper, so the required Frontend check failed on that one assertion. The guard now pins the wrapper call in both readers, keeps the summary off the bare kind call, and requires the shared module to export the wrapper. --- .../__tests__/frontendResourceTypeBoundaries.test.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts index dd056e05e3..95d18b5412 100644 --- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts +++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts @@ -2143,12 +2143,22 @@ describe('frontend resource type boundaries', () => { expect(resourceDetailDrawerSource).toContain('getResourceChangeKindPresentation'); expect(resourceDetailDrawerSource).toContain('getResourceChangeSourceTypePresentation'); expect(resourceDetailDrawerSource).toContain('getResourceChangeSourceAdapterPresentation'); - expect(resourceChangeSummarySource).toContain('getResourceChangeKindPresentation'); + // Per-change rows read getResourceChangePresentation, which wraps the + // kind presentation so an alert close that was not a recovery reads as + // a move. + expect(resourceDetailDrawerSource).toContain('getResourceChangePresentation(change)'); + expect(resourceChangeSummarySource).toContain('getResourceChangePresentation(change)'); + expect(resourceChangeSummarySource).not.toContain( + 'getResourceChangeKindPresentation(change.kind)', + ); expect(resourceChangeSummarySource).toContain('getResourceChangeSourceTypePresentation'); expect(resourceChangeSummarySource).toContain('getResourceChangeSourceAdapterPresentation'); expect(resourceDetailDrawerSource).not.toContain('healthToneClass('); expect(resourceDetailDrawerSource).not.toContain('normalizeHealthLabel('); expect(resourceChangePresentationSource).toContain('getResourceChangeKindPresentation'); + expect(resourceChangePresentationSource).toContain( + 'export function getResourceChangePresentation', + ); expect(resourceChangePresentationSource).toContain('getResourceChangeSourceTypePresentation'); expect(resourceChangePresentationSource).toContain( 'getResourceChangeSourceAdapterPresentation',