From dae638b2f03ecc0785f16f22072dc9aaf59becf6 Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Sat, 21 Mar 2026 14:14:34 -0700 Subject: [PATCH] fix(test): update internal user test to match new create flow Internal users can now see the create modal (with a team selection prompt). Updated the test from asserting the modal is hidden to asserting the team selection prompt is shown. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/components/mcp_tools/create_mcp_server.test.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx index 210e684da37..052720677cd 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/create_mcp_server.test.tsx @@ -110,10 +110,12 @@ describe("CreateMCPServer", () => { expect(screen.getByText("Add New MCP Server")).toBeInTheDocument(); }); - it("should not render when user is not an admin", () => { + it("should render for internal users with team selection prompt", () => { render(); - expect(screen.queryByText("Add New MCP Server")).not.toBeInTheDocument(); + expect(screen.getByText("Add New MCP Server")).toBeInTheDocument(); + // Internal users without a selected team see a prompt + expect(screen.getByText("Select a team to create an MCP server for your team.")).toBeInTheDocument(); }); it("should show transport type options", async () => {