From 2c94616afa54ca0b3065c62b3d597a6a968cdce6 Mon Sep 17 00:00:00 2001 From: findthelorax Date: Sun, 19 Apr 2026 23:07:26 -0400 Subject: [PATCH] cleanup path examples --- frontend/src/components/panels/DetailPanel.tsx | 2 +- .../components/panels/__tests__/DetailPanel.test.tsx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/panels/DetailPanel.tsx b/frontend/src/components/panels/DetailPanel.tsx index ce2499e..86ad5be 100644 --- a/frontend/src/components/panels/DetailPanel.tsx +++ b/frontend/src/components/panels/DetailPanel.tsx @@ -516,7 +516,7 @@ function ServiceForm({ form, onChange, onConfirm, onCancel, confirmLabel, autoFo - onChange({ ...form, path: e.target.value })} placeholder="Path (/dashboard)" className="bg-[#21262d] border-[#30363d] font-mono text-xs h-7" onKeyDown={(e) => e.key === 'Enter' && onConfirm()} /> + onChange({ ...form, path: e.target.value })} placeholder="Path (/admin)" className="bg-[#21262d] border-[#30363d] font-mono text-xs h-7" onKeyDown={(e) => e.key === 'Enter' && onConfirm()} />
diff --git a/frontend/src/components/panels/__tests__/DetailPanel.test.tsx b/frontend/src/components/panels/__tests__/DetailPanel.test.tsx index 8bef56f..2761655 100644 --- a/frontend/src/components/panels/__tests__/DetailPanel.test.tsx +++ b/frontend/src/components/panels/__tests__/DetailPanel.test.tsx @@ -316,7 +316,7 @@ describe('DetailPanel', () => { const addHeaders = screen.getAllByText('Add') fireEvent.click(addHeaders[addHeaders.length - 1]) fireEvent.change(screen.getByPlaceholderText('Service name'), { target: { value: 'health' } }) - fireEvent.change(screen.getByPlaceholderText('Path (/dashboard)'), { target: { value: 'healthz' } }) + fireEvent.change(screen.getByPlaceholderText('Path (/admin)'), { target: { value: 'healthz' } }) fireEvent.click(screen.getAllByRole('button', { name: 'Add' }).at(-1) as HTMLButtonElement) expect(updateNode).toHaveBeenCalledOnce() @@ -365,9 +365,9 @@ describe('DetailPanel', () => { fireEvent.click(editBtn) const nameInput = screen.getByPlaceholderText('Service name') as HTMLInputElement expect(nameInput.value).toBe('nginx') - const portInput = screen.getByPlaceholderText('Port (/dashboard)') as HTMLInputElement + const portInput = screen.getByPlaceholderText('Port (/admin)') as HTMLInputElement expect(portInput.value).toBe('80') - const pathInput = screen.getByPlaceholderText('Path (/dashboard)') as HTMLInputElement + const pathInput = screen.getByPlaceholderText('Path (/admin)') as HTMLInputElement expect(pathInput.value).toBe('/admin') }) @@ -387,13 +387,13 @@ describe('DetailPanel', () => { const nameInput = screen.getByPlaceholderText('Service name') fireEvent.change(nameInput, { target: { value: 'apache' } }) - fireEvent.change(screen.getByPlaceholderText('Path (/dashboard)'), { target: { value: '/ui' } }) + fireEvent.change(screen.getByPlaceholderText('Path (/admin)'), { target: { value: '/admin' } }) fireEvent.click(screen.getByRole('button', { name: 'Save' })) expect(updateNode).toHaveBeenCalledOnce() expect(updateNode.mock.calls[0][1].services[0].service_name).toBe('apache') expect(updateNode.mock.calls[0][1].services[0].port).toBe(80) - expect(updateNode.mock.calls[0][1].services[0].path).toBe('/ui') + expect(updateNode.mock.calls[0][1].services[0].path).toBe('admin') }) it('cancels edit without updating', () => {