From 01002eda9021c0087eada5c4834a2a771e4071e1 Mon Sep 17 00:00:00 2001 From: yucheng-berriai Date: Tue, 23 Jun 2026 23:22:15 -0700 Subject: [PATCH] test(ui): align LoggingCallbacksTable scope tests with shipped ScopeCell MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two scope tests passed access={...} and expected the original plan's 'N teams · M orgs' summary, but ScopeCell reads record.resolvedScope (computed at the page level) and renders individual '{kind}: {label}' tags. Pass resolvedScope and assert the rendered team:/org: tags so the test matches the component that shipped. --- .../LoggingCallbacks/LoggingCallbacksTable.test.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ui/litellm-dashboard/src/components/Settings/LoggingAndAlerts/LoggingCallbacks/LoggingCallbacksTable.test.tsx b/ui/litellm-dashboard/src/components/Settings/LoggingAndAlerts/LoggingCallbacks/LoggingCallbacksTable.test.tsx index 63ad4f47cfe..c71a2cccb5e 100644 --- a/ui/litellm-dashboard/src/components/Settings/LoggingAndAlerts/LoggingCallbacks/LoggingCallbacksTable.test.tsx +++ b/ui/litellm-dashboard/src/components/Settings/LoggingAndAlerts/LoggingCallbacks/LoggingCallbacksTable.test.tsx @@ -99,7 +99,7 @@ describe("LoggingCallbacksTable", () => { OPENMETER_API_KEY: null, }; - it("summarizes a global destination's access as Global with no mode badge", () => { + it("renders a global destination's scope as a Global tag with no mode badge", () => { const { getByText, queryByText } = render( { variables: NO_VARS, credentialName: "langfuse-eu", access: { global: true }, + resolvedScope: { global: true, teams: [], orgs: [] }, }, ]} availableCallbacks={{}} @@ -118,7 +119,7 @@ describe("LoggingCallbacksTable", () => { expect(queryByText("Success")).not.toBeInTheDocument(); }); - it("summarizes team/org counts for a scoped destination", () => { + it("renders a scoped destination's resolved teams and orgs as labeled tags", () => { const { getByText } = render( { variables: NO_VARS, credentialName: "arize-eu", access: { teams: ["t1", "t2"], orgs: ["o1"] }, + resolvedScope: { global: false, teams: ["t1", "t2"], orgs: ["o1"] }, }, ]} availableCallbacks={{}} />, ); - expect(getByText("2 teams · 1 org")).toBeInTheDocument(); + expect(getByText("team: t1")).toBeInTheDocument(); + expect(getByText("team: t2")).toBeInTheDocument(); + expect(getByText("org: o1")).toBeInTheDocument(); }); it("a destination row fires onEditAccess and onDelete, never onTest", () => {