From e7060bfcd1f9055fe14c89bc655aa2ca5e6c4291 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Fri, 8 May 2026 21:05:46 +0100 Subject: [PATCH] Sweep three more stale test assertions to match canonical state - recoveryCanonicalVocabulary: relax 'platform-first' iterator assertion from the expression-body callback shape '(platform) => (' to just '(platform) =>'. Both recovery sections now use block-body callbacks because they need a local for badge resolution. The guardrail's real intent is the 'platform' name over legacy 'provider', not a specific callback shape. - SuggestProfileModal: Settings Preview now interpolates getSourcePlatformLabel('docker') into the KNOWN_SETTINGS label, yielding 'Enable Docker / Podman monitoring' instead of the older 'Enable Docker Monitoring'. - UnifiedResourceTable.workloads-link: the Service Infrastructure dual-table renders in compact layoutMode in the test environment. Update column header expectations to compact equivalents: Datastores -> Stores, Action -> Open, Deferred -> Def. --- .../UnifiedResourceTable.workloads-link.test.tsx | 9 ++++++--- .../Settings/__tests__/SuggestProfileModal.test.tsx | 4 +++- .../__tests__/recoveryCanonicalVocabulary.test.ts | 13 +++++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.workloads-link.test.tsx b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.workloads-link.test.tsx index d45bd357b..dc1092740 100644 --- a/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.workloads-link.test.tsx +++ b/frontend-modern/src/components/Infrastructure/__tests__/UnifiedResourceTable.workloads-link.test.tsx @@ -252,11 +252,14 @@ describe('UnifiedResourceTable workloads links', () => { expect(getByText('Service Infrastructure')).toBeInTheDocument(); expect(getByText('PBS Services')).toBeInTheDocument(); expect(getByText('PMG Services')).toBeInTheDocument(); - expect(getByText('Datastores')).toBeInTheDocument(); + // Service Infrastructure dual-table renders the compact column label. + expect(getByText('Stores')).toBeInTheDocument(); expect(getByText('Activity')).toBeInTheDocument(); - expect(getAllByText('Action').length).toBeGreaterThan(0); + // Compact layout uses 'Open' for the action column. + expect(getAllByText('Open').length).toBeGreaterThan(0); expect(getByText('Queue')).toBeInTheDocument(); - expect(getByText('Deferred')).toBeInTheDocument(); + // Compact layout abbreviates Deferred to 'Def'. + expect(getByText('Def')).toBeInTheDocument(); expect(getByText('Hold')).toBeInTheDocument(); expect(getByText('Nodes')).toBeInTheDocument(); diff --git a/frontend-modern/src/components/Settings/__tests__/SuggestProfileModal.test.tsx b/frontend-modern/src/components/Settings/__tests__/SuggestProfileModal.test.tsx index 1e8687787..c152f12ec 100644 --- a/frontend-modern/src/components/Settings/__tests__/SuggestProfileModal.test.tsx +++ b/frontend-modern/src/components/Settings/__tests__/SuggestProfileModal.test.tsx @@ -140,7 +140,9 @@ describe('SuggestProfileModal', () => { expect(await screen.findByText('Production Servers')).toBeInTheDocument(); expect(screen.getByText('Settings Preview')).toBeInTheDocument(); - expect(screen.getByText('Enable Docker Monitoring')).toBeInTheDocument(); + // KNOWN_SETTINGS now interpolates getSourcePlatformLabel('docker'), + // which resolves to 'Docker / Podman'. + expect(screen.getByText('Enable Docker / Podman monitoring')).toBeInTheDocument(); expect(screen.getByText('Reporting Interval')).toBeInTheDocument(); expect(screen.getByText('Unknown (ignored)')).toBeInTheDocument(); diff --git a/frontend-modern/src/utils/__tests__/recoveryCanonicalVocabulary.test.ts b/frontend-modern/src/utils/__tests__/recoveryCanonicalVocabulary.test.ts index 6249b1ea8..1ca61fb40 100644 --- a/frontend-modern/src/utils/__tests__/recoveryCanonicalVocabulary.test.ts +++ b/frontend-modern/src/utils/__tests__/recoveryCanonicalVocabulary.test.ts @@ -17,10 +17,15 @@ describe('recovery canonical vocabulary', () => { }); it('keeps recovery platform filter iterators platform-first', () => { - expect(recoveryProtectedInventorySectionSource).toContain('{(platform) => ('); - expect(recoveryHistorySectionSource).toContain('{(platform) => ('); - expect(recoveryProtectedInventorySectionSource).not.toContain('{(provider) => ('); - expect(recoveryHistorySectionSource).not.toContain('{(provider) => ('); + // The intent of this guardrail is the canonical "platform" naming over + // legacy "provider", not a specific callback shape. Both files now use + // block-body callbacks (`(platform) => { const badge = ...; return ... }`) + // because they need a local for the badge resolution, so the original + // expression-body pattern `(platform) => (` no longer matches. + expect(recoveryProtectedInventorySectionSource).toContain('(platform) =>'); + expect(recoveryHistorySectionSource).toContain('(platform) =>'); + expect(recoveryProtectedInventorySectionSource).not.toContain('(provider) =>'); + expect(recoveryHistorySectionSource).not.toContain('(provider) =>'); }); it('keeps recovery activity focus labels item-first', () => {