Fix UnifiedAgents test missing Router wrapper

UnifiedAgents calls useNavigate() which requires a Router context.
The test was rendering the component without one, breaking CI.
This commit is contained in:
rcourtman
2026-02-04 12:49:40 +00:00
parent 8ddcbf8c62
commit 5ccf8ac7bc
@@ -1,6 +1,7 @@
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
import { render, fireEvent, screen, waitFor, cleanup, within } from '@solidjs/testing-library';
import { createStore } from 'solid-js/store';
import { Router, Route } from '@solidjs/router';
import { UnifiedAgents } from '../UnifiedAgents';
import type { Host, DockerHost, KubernetesCluster, RemovedDockerHost, RemovedKubernetesCluster } from '@/types/api';
@@ -155,7 +156,11 @@ const setupComponent = (
activeAlerts: [],
};
return render(() => <UnifiedAgents />);
return render(() => (
<Router>
<Route path="/" component={() => <UnifiedAgents />} />
</Router>
));
};
beforeEach(() => {