From e3d3177ff1e1197cb3bf93d027b2463aa63b5bdf Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Sat, 8 Aug 2026 21:12:27 -0700 Subject: [PATCH] style(ui): drop narration comments from the usage gating tests Both restated what the test name and the surrounding setup already say, so they were maintenance cost without explanatory value. The reasoning they carried lives in the commit that added the gates. --- .../usage/_components/components/UsagePageView.test.tsx | 2 -- .../components/UsageViewSelect/UsageViewSelect.test.tsx | 2 -- 2 files changed, 4 deletions(-) diff --git a/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/UsagePageView.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/UsagePageView.test.tsx index 841f0fda573..9085cf961a9 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/UsagePageView.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/UsagePageView.test.tsx @@ -863,8 +863,6 @@ describe("UsagePage", () => { }); }); - // The select hides both views from a non-admin, so this drives the section - // gate directly through the mocked select, which always offers every option. it.each(["organization", "agent"])("should not render the %s usage view for an internal user", async (usageView) => { mockUseAuthorized.mockReturnValue(nonAdminSession); diff --git a/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/UsageViewSelect/UsageViewSelect.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/UsageViewSelect/UsageViewSelect.test.tsx index 9bc4bd81302..dcc0ce06673 100644 --- a/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/UsageViewSelect/UsageViewSelect.test.tsx +++ b/ui/litellm-dashboard/src/app/(dashboard)/usage/_components/components/UsageViewSelect/UsageViewSelect.test.tsx @@ -127,8 +127,6 @@ describe("UsageViewSelect", () => { expect(screen.getByRole("option", { name: optionName })).toBeInTheDocument(); }); - // Neither /organization/daily/activity nor /agent/daily/activity admits an - // internal user, so the option that fires them must not be selectable. it.each(["Organization Usage", "Agent Usage (A2A)"])("should hide %s from an internal user", (optionName) => { render();