diff --git a/frontend/src/components/FleetView.tsx b/frontend/src/components/FleetView.tsx
index f2eb70b6..661fe3a9 100644
--- a/frontend/src/components/FleetView.tsx
+++ b/frontend/src/components/FleetView.tsx
@@ -1,5 +1,5 @@
import {
- RefreshCw, RefreshCcwDot, Camera, FileDown,
+ RefreshCw, Camera, FileDown,
Network, SlidersHorizontal,
Send, KeyRound, ArrowLeftRight, Wrench, Workflow,
} from 'lucide-react';
@@ -133,15 +133,6 @@ export function FleetView({ onNavigateToNode }: FleetViewProps) {
-
)}
+
+ {onCheckUpdates && (
+
+ )}
);
}
diff --git a/frontend/src/components/FleetView/__tests__/OverviewToolbar.test.tsx b/frontend/src/components/FleetView/__tests__/OverviewToolbar.test.tsx
index de4acf8b..8ea5cc5f 100644
--- a/frontend/src/components/FleetView/__tests__/OverviewToolbar.test.tsx
+++ b/frontend/src/components/FleetView/__tests__/OverviewToolbar.test.tsx
@@ -93,4 +93,21 @@ describe('OverviewToolbar', () => {
render();
expect(screen.queryByRole('button', { name: 'Add node' })).not.toBeInTheDocument();
});
+
+ it('renders the Check Updates button and fires onCheckUpdates when provided', () => {
+ const onCheckUpdates = vi.fn();
+ render();
+ fireEvent.click(screen.getByRole('button', { name: /Check Updates/ }));
+ expect(onCheckUpdates).toHaveBeenCalledTimes(1);
+ });
+
+ it('omits the Check Updates button when onCheckUpdates is not provided', () => {
+ render();
+ expect(screen.queryByRole('button', { name: /Check Updates/ })).not.toBeInTheDocument();
+ });
+
+ it('disables the Check Updates button while a check is in flight', () => {
+ render();
+ expect(screen.getByRole('button', { name: /Check Updates/ })).toBeDisabled();
+ });
});