From 2e9326523a7fbb62dcb7f14a3979e1881669be5c Mon Sep 17 00:00:00 2001 From: Cesar Garcia <128240629+Chesars@users.noreply.github.com> Date: Wed, 4 Mar 2026 18:01:28 -0300 Subject: [PATCH] Update ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.test.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .../ModelsAndEndpointsView.test.tsx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.test.tsx index 74cfd45ac0b..e1b3b358300 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/models-and-endpoints/ModelsAndEndpointsView.test.tsx @@ -172,15 +172,14 @@ describe("ModelsAndEndpointsView", () => { // Find and click dismiss button (X button) const dismissButton = container.querySelector('button[aria-label="Dismiss banner"]'); - if (dismissButton) { - fireEvent.click(dismissButton); + expect(dismissButton).not.toBeNull(); + fireEvent.click(dismissButton!); - // Banner should be hidden - expect(queryByText("Missing a provider?")).not.toBeInTheDocument(); + // Banner should be hidden + expect(queryByText("Missing a provider?")).not.toBeInTheDocument(); - // LocalStorage should be updated - expect(localStorageMock.getItem("hideMissingProviderBanner")).toBe("true"); - } + // LocalStorage should be updated + expect(localStorageMock.getItem("hideMissingProviderBanner")).toBe("true"); }, 15000); it("should show compact Request Provider button when banner is dismissed", async () => {