mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-24 04:33:17 +00:00
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.
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user