Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(control-ui): cover the rejected-state registry-connect banner
Jose Ramirezfe1764af2cc3
diff --git a/control-ui/components/__tests__/RegistryCatalog.test.tsx b/control-ui/components/__tests__/RegistryCatalog.test.tsxindex 6c43ee2a4..7af356f12 100644--- a/control-ui/components/__tests__/RegistryCatalog.test.tsx+++ b/control-ui/components/__tests__/RegistryCatalog.test.tsx@@ -930,6 +930,18 @@ describe('RegistryCatalog - connect discoverability (Fix 1)', () => {expect(mockPush).toHaveBeenCalledWith('/registry/connect')})+ it('self-hosted + rejected → shows connect banner and header Connect button', async () => {+ mockApiSuccess()+ vi.mocked(api.getRegistryConnection).mockResolvedValue({ state: 'rejected' })+ render(<RegistryCatalog />)+ await waitFor(() => expect(screen.getByText('brave-search')).toBeInTheDocument())++ expect(+ screen.getByText(/This deployment isn't connected to a registry/i)+ ).toBeInTheDocument()+ expect(screen.getByRole('button', { name: 'Connect' })).toBeInTheDocument()+ })+it('self-hosted + connected → no banner, header Connect button present', async () => {mockApiSuccess()vi.mocked(api.getRegistryConnection).mockResolvedValue({ state: 'connected' })