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]

merge origin/main, resolve test file conflicts

yuneng-jiangb75266d2540d
diff --cc ui/litellm-dashboard/src/components/HelpLink.test.tsx
index 2e9b44a9e90,72033bd93a1..84a17a4e3a7
--- a/ui/litellm-dashboard/src/components/HelpLink.test.tsx
+++ b/ui/litellm-dashboard/src/components/HelpLink.test.tsx
@@@ -106,23 -114,4 +114,18 @@@ describe("DocsMenu", () =>
await user.click(button);
expect(button).toHaveAttribute("aria-expanded", "true");
});
+
+ it("should close menu when clicking outside", async () => {
+ const user = userEvent.setup();
- render(
++ renderWithProviders(
+ <div>
+ <DocsMenu items={items} />
+ <button>Outside</button>
+ </div>,
+ );
+ await user.click(screen.getByRole("button", { name: /docs/i }));
+ expect(screen.getByText("Custom pricing")).toBeInTheDocument();
+ await user.click(screen.getByRole("button", { name: /outside/i }));
+ expect(screen.queryByText("Custom pricing")).not.toBeInTheDocument();
+ });
-
- it("should display custom children text", () => {
- render(<DocsMenu items={items}>Help</DocsMenu>);
- expect(screen.getByText("Help")).toBeInTheDocument();
- });
});