diff --git a/apps/desktop/src/app/shell/gateway-menu-panel.test.tsx b/apps/desktop/src/app/shell/gateway-menu-panel.test.tsx index b33e6291f9..f0241883ac 100644 --- a/apps/desktop/src/app/shell/gateway-menu-panel.test.tsx +++ b/apps/desktop/src/app/shell/gateway-menu-panel.test.tsx @@ -71,7 +71,7 @@ describe('GatewayMenuPanel reconnect action', () => { afterEach(() => cleanup()) - it('shows reconnect only while disconnected and disables it in flight', async () => { + it('shows reconnect while disconnected and disables it in flight', async () => { let finish: (() => void) | undefined mocks.reconnectGateway.mockImplementation( () => @@ -92,10 +92,12 @@ describe('GatewayMenuPanel reconnect action', () => { await act(async () => finish?.()) }) - it('hides reconnect while the socket is open', async () => { + it('allows recovery when an open socket stops delivering', async () => { renderPanel('open') await act(async () => undefined) - expect(screen.queryByRole('button', { name: 'Reconnect gateway' })).toBeNull() + const reconnect = screen.getByRole('button', { name: 'Reconnect gateway' }) + await act(async () => fireEvent.click(reconnect)) + expect(mocks.reconnectGateway).toHaveBeenCalledOnce() }) }) diff --git a/apps/desktop/src/app/shell/gateway-menu-panel.tsx b/apps/desktop/src/app/shell/gateway-menu-panel.tsx index ff61fe6c26..e7367c560e 100644 --- a/apps/desktop/src/app/shell/gateway-menu-panel.tsx +++ b/apps/desktop/src/app/shell/gateway-menu-panel.tsx @@ -171,20 +171,19 @@ export function GatewayMenuPanel({