mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
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 <krrish-berri-2@users.noreply.github.com>
This commit is contained in:
parent
09889e1986
commit
0eddde3af7
1 changed files with 1 additions and 2 deletions
|
|
@ -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([]));
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue