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 flaky e2e tests by using regex selectors
yuneng-jiang08e2ec3412a0
diff --git a/ui/litellm-dashboard/e2e_tests/tests/auth/unauthenticatedRedirect.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/auth/unauthenticatedRedirect.spec.tsindex d8cc26f8642..4c6e11800ee 100644--- a/ui/litellm-dashboard/e2e_tests/tests/auth/unauthenticatedRedirect.spec.ts+++ b/ui/litellm-dashboard/e2e_tests/tests/auth/unauthenticatedRedirect.spec.ts@@ -3,9 +3,8 @@ import { test, expect } from "@playwright/test";test.describe("Authentication Checks", () => {test("should redirect unauthenticated user from a protected page", async ({ page }) => {const protectedPageUrl = "http://localhost:4000/ui?page=llm-playground";- const expectedRedirectUrl = "http://localhost:4000/ui/login/";await page.goto(protectedPageUrl, { waitUntil: "domcontentloaded" });- await expect(page).toHaveURL(expectedRedirectUrl);+ await expect(page).toHaveURL(/\/ui\/login/);await expect(page.getByRole("heading", { name: "Login" })).toBeVisible();});});diff --git a/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts b/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.tsindex 4343063b305..682d1a1b45f 100644--- a/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts+++ b/ui/litellm-dashboard/e2e_tests/tests/keys/createKey.spec.ts@@ -14,7 +14,7 @@ test.describe("Create Key", () => {await page.getByTestId("base-input").fill("e2eUITestingCreateKeyAllTeamModels");await page.locator(".ant-select-selection-overflow").click();await page.getByText("All Team Models").click();- await page.getByRole("combobox", { name: "* Models info-circle :" }).press("Escape");+ await page.getByRole("combobox", { name: /models/i }).press("Escape");await page.getByRole("button", { name: "Create Key" }).click();await page.keyboard.press("Escape");await expect(page.getByText("e2eUITestingCreateKeyAllTeamModels")).toBeVisible();