diff --git a/ui/litellm-dashboard/src/components/templates/key_info_view.test.tsx b/ui/litellm-dashboard/src/components/templates/key_info_view.test.tsx index 5fbcf3daafe..c6394fd98c1 100644 --- a/ui/litellm-dashboard/src/components/templates/key_info_view.test.tsx +++ b/ui/litellm-dashboard/src/components/templates/key_info_view.test.tsx @@ -176,9 +176,10 @@ describe("KeyInfoView", () => { />, ); - const scrollContainer = container.querySelector(".overflow-y-auto"); - expect(scrollContainer).not.toBeNull(); - expect(scrollContainer!.className).toContain("max-h-[85vh]"); + const boundedScrollContainers = Array.from(container.querySelectorAll(".overflow-y-auto")).filter((el) => + el.classList.contains("max-h-[85vh]"), + ); + expect(boundedScrollContainers).toHaveLength(1); }); it("should not render tags in metadata textarea", async () => {