diff --git a/web/src/components/cards/__tests__/EnterpriseComplianceCards.test.tsx b/web/src/components/cards/__tests__/EnterpriseComplianceCards.test.tsx index 16a8ae059c..4eb09f602d 100644 --- a/web/src/components/cards/__tests__/EnterpriseComplianceCards.test.tsx +++ b/web/src/components/cards/__tests__/EnterpriseComplianceCards.test.tsx @@ -60,7 +60,7 @@ describe('EnterpriseComplianceCards', () => { const loadingText = screen.getByText('Loading…'); expect(loadingText).toBeInTheDocument(); - expect(loadingText.className).toContain('text-gray-500'); + expect(loadingText.className).toContain('text-muted-foreground'); }); it('renders success state and navigates on click', async () => { diff --git a/web/src/components/namespaces/__tests__/CreateNamespaceModal.test.tsx b/web/src/components/namespaces/__tests__/CreateNamespaceModal.test.tsx index 63e6cc4cc1..42a6f242bb 100644 --- a/web/src/components/namespaces/__tests__/CreateNamespaceModal.test.tsx +++ b/web/src/components/namespaces/__tests__/CreateNamespaceModal.test.tsx @@ -63,7 +63,7 @@ describe('CreateNamespaceModal', () => { expect(screen.getAllByRole('combobox').length).toBeGreaterThan(0) }) - it('initializes with cluster placeholder selected', () => { + it('auto-selects first cluster on initialization', () => { render( { const comboboxes = screen.getAllByRole('combobox') expect(comboboxes.length).toBeGreaterThan(0) - expect((comboboxes[0] as HTMLSelectElement).value).toBe('') + expect((comboboxes[0] as HTMLSelectElement).value).toBe('cluster-1') }) it('allows cluster selection change', async () => { diff --git a/web/src/components/rbac/__tests__/CanIChecker.test.tsx b/web/src/components/rbac/__tests__/CanIChecker.test.tsx index 95cfaa7a8c..819463c17b 100644 --- a/web/src/components/rbac/__tests__/CanIChecker.test.tsx +++ b/web/src/components/rbac/__tests__/CanIChecker.test.tsx @@ -102,10 +102,9 @@ describe('CanIChecker — Initial Rendering', () => { const clusterSelect = screen.getByTestId('can-i-cluster') as HTMLSelectElement const options = Array.from(clusterSelect.options) - expect(options).toHaveLength(3) - expect(options[0].value).toBe('') - expect(options[1].value).toBe('cluster-a') - expect(options[2].value).toBe('cluster-b') + expect(options).toHaveLength(2) + expect(options[0].value).toBe('cluster-a') + expect(options[1].value).toBe('cluster-b') }) it('populates namespace dropdown with fetched namespaces', () => { @@ -120,11 +119,11 @@ describe('CanIChecker — Initial Rendering', () => { expect(options.some(opt => opt.value === 'kube-system')).toBe(true) }) - it('starts with no cluster selected', () => { + it('auto-selects first cluster on load', () => { render() const clusterSelect = screen.getByTestId('can-i-cluster') as HTMLSelectElement - expect(clusterSelect.value).toBe('') + expect(clusterSelect.value).toBe('cluster-a') }) it('defaults verb and resource to common values', () => {