Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(developer-options-panel): add test for gateway core mode display

Steven Enamakelaa308e8a4e36
diff --git a/app/src/components/settings/panels/__tests__/DeveloperOptionsPanel.test.tsx b/app/src/components/settings/panels/__tests__/DeveloperOptionsPanel.test.tsx
index 4d3516efc9..f77d6f0cd1 100644
--- a/app/src/components/settings/panels/__tests__/DeveloperOptionsPanel.test.tsx
+++ b/app/src/components/settings/panels/__tests__/DeveloperOptionsPanel.test.tsx
@@ -78,6 +78,20 @@ describe('DeveloperOptionsPanel — CoreModeBadge', () => {
expect(screen.getByText(/Embedded core sidecar/i)).toBeInTheDocument();
});
+ test('shows the gateway id, and no URL or token, when coreMode is a gateway', async () => {
+ // A provisioned gateway's URL and bearer are the shell's — minted per
+ // activation and never persisted here — so the id is all this panel has,
+ // and all a developer needs in order to find it in Settings.
+ const Panel = (await import('../DeveloperOptionsPanel')).default;
+
+ renderWithProviders(<Panel />, {
+ preloadedState: { coreMode: { mode: { kind: 'gateway', gatewayId: 'builder' } } },
+ });
+
+ expect(await screen.findByText('builder')).toBeInTheDocument();
+ expect(screen.queryByText(/^http/)).not.toBeInTheDocument();
+ });
+
test('shows "Cloud" pill plus URL and masked token tail when coreMode is cloud', async () => {
vi.resetModules();
const Panel = await importPanel();