The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(ui): scope the remaining e2e nav lookups to the new sidebar
Yuneng Jiang50f002048e92
diff --git a/ui/litellm-dashboard/e2e_tests/tests/login/internalUserIdentity.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/login/internalUserIdentity.spec.tsindex 6008049a2aa..569908c5f75 100644--- a/ui/litellm-dashboard/e2e_tests/tests/login/internalUserIdentity.spec.ts+++ b/ui/litellm-dashboard/e2e_tests/tests/login/internalUserIdentity.spec.ts@@ -14,7 +14,8 @@ test.describe("Navbar identity scoping", () => {test("Internal user navbar dropdown shows their own role and user id, not the admin's", async ({ page }) => {await page.goto("/ui");- await expect(page.getByText("Virtual Keys")).toBeVisible({ timeout: 10_000 });+ // Scope to the sidebar; the top-bar breadcrumb also shows "Virtual Keys".+ await expect(page.getByRole("complementary").getByText("Virtual Keys")).toBeVisible({ timeout: 10_000 });// The account menu button carries the user's role and email/id in its// aria-label (see UserDropdown.tsx). Match by partial role.diff --git a/ui/litellm-dashboard/e2e_tests/tests/login/login.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/login/login.spec.tsindex d1b64f37156..11febf0ed48 100644--- a/ui/litellm-dashboard/e2e_tests/tests/login/login.spec.ts+++ b/ui/litellm-dashboard/e2e_tests/tests/login/login.spec.ts@@ -9,7 +9,8 @@ test("user can log in", async ({ page }) => {const loginButton = page.getByRole("button", { name: "Login", exact: true });await expect(loginButton).toBeEnabled();await loginButton.click();- await expect(page.getByText("Virtual Keys")).toBeVisible();+ // Scope to the sidebar; the top-bar breadcrumb also shows "Virtual Keys".+ await expect(page.getByRole("complementary").getByText("Virtual Keys")).toBeVisible();// Match the navbar account button by its stable aria-label (UserDropdown.tsx// emits "Account menu — <role> — signed in as <email|id>"). Earlier this useddiff --git a/ui/litellm-dashboard/e2e_tests/tests/settings/adminSettings.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/settings/adminSettings.spec.tsindex f61532b05a5..c4a14a891d4 100644--- a/ui/litellm-dashboard/e2e_tests/tests/settings/adminSettings.spec.ts+++ b/ui/litellm-dashboard/e2e_tests/tests/settings/adminSettings.spec.ts@@ -6,8 +6,11 @@ test.describe("Add Model", () => {test("admin settings test", async ({ page }) => {await page.goto("/ui");- await page.getByRole("menuitem", { name: /Settings/ }).click();- await page.getByRole("menuitem", { name: /Admin Settings/ }).click();+ // "Settings" is a collapsible group (button) in the sidebar; expand it, then+ // click the "Admin Settings" child link. Scope to the complementary landmark.+ const sidebar = page.getByRole("complementary");+ await sidebar.getByRole("button", { name: /Settings/ }).click();+ await sidebar.getByRole("link", { name: /Admin Settings/ }).click();await page.getByRole("tab", { name: "UI Settings" }).click();await expect(page.getByText("Configuration for UI-specific")).toBeVisible();});