mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
test(ui): drop redundant commentary from the team-list scoping tests
The removed comments restated the test names and the assertions directly below them. The reasoning they carried is already recorded in the commit that introduced the fix and in the pull request body.
This commit is contained in:
parent
8f0644e63f
commit
e7450b11ba
3 changed files with 0 additions and 9 deletions
|
|
@ -913,8 +913,6 @@ describe("useAllTeams", () => {
|
|||
|
||||
await waitFor(() => expect(result.current.isSuccess).toBe(true));
|
||||
|
||||
// A scoped call that comes back empty is the failure this guards against: the
|
||||
// 401 disappears but the page still shows no teams.
|
||||
expect(result.current.data).toEqual(mockTeams);
|
||||
expect(result.current.data?.length).toBeGreaterThan(0);
|
||||
expect(requestedUserId(fetchMock.mock.calls[0][0] as string)).toBe("member-7");
|
||||
|
|
|
|||
|
|
@ -210,8 +210,6 @@ describe("useLogFilterLogic", () => {
|
|||
|
||||
await waitFor(() => expect(fetchAllTeams).toHaveBeenCalled());
|
||||
expect(fetchAllTeams).toHaveBeenCalledWith("test-token", null, "member-7");
|
||||
// Without the scope the request 401s and the filter falls back to an empty
|
||||
// list, so the rows matter as much as the argument.
|
||||
await waitFor(() => expect(result.current.allTeams).toEqual(callerTeams));
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -242,8 +242,6 @@ describe("roles", () => {
|
|||
describe("teamListScopeUserId", () => {
|
||||
const SESSION_USER_ID = "user-1";
|
||||
|
||||
// The truth table is driven through effectiveSessionRole rather than hand-written
|
||||
// labels, so it keeps holding if the raw -> display mapping ever moves.
|
||||
it.each(["proxy_admin", "proxy_admin_viewer", "org_admin"])(
|
||||
"leaves %s unscoped so the endpoint keeps returning its broad list",
|
||||
(rawRole) => {
|
||||
|
|
@ -268,9 +266,6 @@ describe("roles", () => {
|
|||
});
|
||||
|
||||
it("keeps Org Admin broad even though all_admin_roles carries only the raw org_admin", () => {
|
||||
// all_admin_roles mixes display labels with raw role names, so isAdminRole is
|
||||
// false for the value useAuthorized actually supplies for an org admin. Relying
|
||||
// on it here would scope org admins down to their direct memberships.
|
||||
expect(all_admin_roles).not.toContain(effectiveSessionRole("org_admin"));
|
||||
expect(isAdminRole(effectiveSessionRole("org_admin"))).toBe(false);
|
||||
expect(teamListScopeUserId(effectiveSessionRole("org_admin"), SESSION_USER_ID)).toBeNull();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue