diff --git a/frontend-modern/src/components/AI/Chat/__tests__/ModelSelector.test.tsx b/frontend-modern/src/components/AI/Chat/__tests__/ModelSelector.test.tsx index e4a52f9ee0..c921292d31 100644 --- a/frontend-modern/src/components/AI/Chat/__tests__/ModelSelector.test.tsx +++ b/frontend-modern/src/components/AI/Chat/__tests__/ModelSelector.test.tsx @@ -754,7 +754,7 @@ describe('ModelSelector', () => { // --- Model name display --- - it('falls back to model ID segment when name is not provided', () => { + it('falls back to a humanized provider route label when name is not provided', () => { const models = [makeModel({ id: 'anthropic:claude-test', name: '', notable: true })]; render(() => ( { /> )); - // selectedLabel should use id.split(':').pop() when name is empty but match exists - // Actually, empty name returns falsy, so it falls to id.split(':').pop() - expect(screen.getByText('claude-test')).toBeInTheDocument(); + expect(screen.getByText('Anthropic: Claude Test')).toBeInTheDocument(); }); // --- Empty models list --- diff --git a/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx b/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx index b6e6bb1556..fbc9da620b 100644 --- a/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx +++ b/frontend-modern/src/components/Workloads/__tests__/WorkloadsSurface.performance.contract.test.tsx @@ -1263,7 +1263,7 @@ describe('Workloads performance contract', () => { expect(guestDrawerStateSource).not.toContain('buildInfrastructureHrefForWorkload'); expect(guestDrawerStateSource).not.toContain("from '@/routing/resourceLinks'"); expect(guestDrawerStateSource).toContain("from '@/hooks/createNonSuspendingQuery'"); - expect(guestDrawerStateSource).toContain('createNonSuspendingQuery { expect(k8sDeploymentsDrawerSource).not.toContain( "const normalize = (value?: string | null) => (value || '').trim();", ); - expect(messageItemSource).toContain('formatIdentifierLabel'); - expect(toolExecutionBlockSource).toContain('formatIdentifierLabel'); + expect(activeTurnStatusSource).toContain('formatIdentifierLabel'); + expect(toolPresentationSource).toContain('formatIdentifierLabel'); expect(aiChatSource).toContain('formatIdentifierLabel'); expect(patrolStatusBarSource).toContain('formatTriggerReason'); expect(findingsPanelSource).toContain('formatIdentifierLabel'); @@ -3718,7 +3721,8 @@ describe('frontend resource type boundaries', () => { expect(aiCostPresentationSource).toContain( 'export function getAICostExportHistoryErrorMessage', ); - expect(modelSelectorSource).toContain('AI_CHAT_MODEL_SELECTOR_EMPTY_STATE'); + expect(aiModelPickerSource).toContain('AI_CHAT_MODEL_SELECTOR_EMPTY_STATE'); + expect(aiModelPickerSource).not.toContain('No matching models.'); expect(modelSelectorSource).not.toContain('No matching models.'); expect(aiChatPresentationSource).toContain('export const AI_CHAT_MODEL_SELECTOR_EMPTY_STATE'); expect(aiChatPresentationSource).toContain('export const AI_CHAT_SESSION_EMPTY_STATE');