From 0eddde3af707b0bf86ef744adaf28bd0d70d90da Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 13 Aug 2026 14:30:40 +0000 Subject: [PATCH] test(ui): scope the workflows role-gate assertion to workflow URLs useCan grew a useIsOrgAdmin leg that runs useOrganizations, so every capability check issues GET /organization/list regardless of the role or capability. #35176 relaxed the memory and guardrails-monitor gate tests to only look at their own endpoints but missed the workflows one, leaving CI red on litellm_internal_staging. Match the neighbours: drop the fetchMock-not-called assertion and scope the waitFor to /v1/workflows URLs, which is what this test is actually protecting. Co-authored-by: Krrish Dholakia --- .../src/app/(dashboard)/workflows/page.integration.test.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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..5281ba626e1 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,8 +46,7 @@ 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()); - expect(requestedUrls().filter((url) => url.includes("/v1/workflows"))).toEqual([]); + await waitFor(() => expect(requestedUrls().filter((url) => url.includes("/v1/workflows"))).toEqual([])); }, );