Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

test(ui/team): fix guardrails overview test for new component

Ryan Crabbe2d14e4a4ed61
diff --git a/ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx b/ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx
index f24b4e77e16..b5cc6005c9c 100644
--- a/ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx
+++ b/ui/litellm-dashboard/src/components/team/TeamInfo.test.tsx
@@ -276,15 +276,17 @@ describe("TeamInfoView", () => {
it("should display guardrails in overview when present", async () => {
vi.mocked(networking.teamInfoCall).mockResolvedValue(
createMockTeamData({
- guardrails: ["guardrail1", "guardrail2"],
+ metadata: { guardrails: ["guardrail1", "guardrail2"] },
})
);
renderWithProviders(<TeamInfoView {...defaultProps} />);
await waitFor(() => {
- expect(screen.getByText("Guardrails")).toBeInTheDocument();
+ expect(screen.getByText("Guardrails Settings")).toBeInTheDocument();
});
+ expect(screen.getByText("guardrail1")).toBeInTheDocument();
+ expect(screen.getByText("guardrail2")).toBeInTheDocument();
});
it("should display policies in overview when present", async () => {