diff --git a/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/page.integration.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/page.integration.test.tsx index d4c68841299..f9ad62d7f5b 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/page.integration.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/guardrails-monitor/page.integration.test.tsx @@ -46,7 +46,9 @@ describe("Guardrails Monitor page access by role", () => { renderAs(userRole); expect(await screen.findByText("Guardrails Monitor is only available to admin users.")).toBeInTheDocument(); - await waitFor(() => expect(fetchMock).not.toHaveBeenCalled()); + // Scoped to this page's own endpoint, not every request. Resolving whether a caller is an org + // admin goes through /organization/list for every role, so a blanket "no fetch at all" would + // fail on a request that has nothing to do with this page's gate. expect(requestedUrls().filter((url) => url.includes("/guardrails/usage"))).toEqual([]); }, ); diff --git a/ui/litellm-dashboard/src/app/(dashboard)/memory/page.integration.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/memory/page.integration.test.tsx index 8d15bb59187..4bd95b51063 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/memory/page.integration.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/memory/page.integration.test.tsx @@ -46,7 +46,9 @@ describe("Memory page access by role", () => { renderAs(userRole); expect(await screen.findByText("Memory is only available to admin users.")).toBeInTheDocument(); - await waitFor(() => expect(fetchMock).not.toHaveBeenCalled()); + // Scoped to this page's own endpoint, not every request. Resolving whether a caller is an org + // admin goes through /organization/list for every role, so a blanket "no fetch at all" would + // fail on a request that has nothing to do with this page's gate. expect(requestedUrls().filter((url) => url.includes("/v1/memory"))).toEqual([]); }, ); diff --git a/ui/litellm-dashboard/src/app/(dashboard)/workflows/page.integration.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/workflows/page.integration.test.tsx index 6b332faf704..035261e8220 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/workflows/page.integration.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/workflows/page.integration.test.tsx @@ -46,7 +46,9 @@ describe("Workflows page access by role", () => { renderAs(userRole); expect(await screen.findByText("Workflow Runs is only available to admin users.")).toBeInTheDocument(); - await waitFor(() => expect(fetchMock).not.toHaveBeenCalled()); + // Scoped to this page's own endpoint, not every request. Resolving whether a caller is an org + // admin goes through /organization/list for every role, so a blanket "no fetch at all" would + // fail on a request that has nothing to do with this page's gate. expect(requestedUrls().filter((url) => url.includes("/v1/workflows"))).toEqual([]); }, );