fix(ui): stub useIsOrgAdmin in 3 role-gate integration tests - #36573
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix(ui): stub useIsOrgAdmin in 3 role-gate integration tests#36573cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
f306927 moved useIsOrgAdmin into useCan, so useCan now reaches useOrganizations (react-query) and fires a real fetch to /organization/list. The Workflows / Memory / Guardrails Monitor role-gate tests spy on global fetch and assert nothing was called for a non-admin, so that leg pushes each of them to 12 failed cases across the suite. Apply the same stub PR #36565 landed on UsageTab: force the org-admin leg to false so role gating still flows through hasCapability with the varied userRole, and the fetch-not-called invariant these tests are asserting holds again. Co-authored-by: Krrish Dholakia <krrish-berri-2@users.noreply.github.com>
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Problem this solves:
How it solves it:
User Flow
Not applicable, this PR only changes test scaffolding, no runtime behavior change for any end user
Relevant issues
Linear ticket
Pre-Submission checklist
Screenshots / Proof of Fix
Before the fix, on 422d925 (tip of litellm_internal_staging), the UI Unit Tests job at https://github.com/BerriAI/litellm/actions/runs/31530611197 reports:
After the fix, the same three files run clean locally on the fix commit:
Type
✅ Test
Caveats (if any)
Final Attestation