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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(test): update agents.test.tsx for AgentsPanel table refactor
yuneng-jiang81b223138aaf
diff --git a/ui/litellm-dashboard/src/components/agents.test.tsx b/ui/litellm-dashboard/src/components/agents.test.tsxindex 8914f8ad6bc..3b0f4341da8 100644--- a/ui/litellm-dashboard/src/components/agents.test.tsx+++ b/ui/litellm-dashboard/src/components/agents.test.tsx@@ -20,6 +20,8 @@ vi.mock("./agents/agent_card_grid", () => ({),}));+// Note: agents.tsx no longer uses AgentCardGrid — it renders a Table directly.+vi.mock("./agents/agent_info", () => ({default: () => <div data-testid="agent-info" />,}));@@ -54,19 +56,19 @@ describe("AgentsPanel", () => {expect(screen.queryByText("+ Add New Agent")).not.toBeInTheDocument();});- it("should pass isAdmin=true to AgentCardGrid for admin role", async () => {+ it("should show Actions column header for admin role", async () => {render(<AgentsPanel accessToken="test-token" userRole="Admin" />);await waitFor(() => {- const grid = screen.getByTestId("agent-card-grid");- expect(grid).toHaveAttribute("data-is-admin", "true");+ expect(screen.getByRole("columnheader", { name: /actions/i })).toBeInTheDocument();});});- it("should pass isAdmin=false to AgentCardGrid for internal user role", async () => {+ it("should not show Actions column header for internal user role", async () => {render(<AgentsPanel accessToken="test-token" userRole="Internal User" />);await waitFor(() => {- const grid = screen.getByTestId("agent-card-grid");- expect(grid).toHaveAttribute("data-is-admin", "false");+ expect(screen.queryByRole("columnheader", { name: /actions/i })).not.toBeInTheDocument();+ // confirm table is rendered (not still loading)+ expect(screen.getByRole("table")).toBeInTheDocument();});});