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(e2e): measure the clipped popup and assert the table's empty state
Yuneng Jiangabd8beec018e
diff --git a/tests/e2e/ui/tests/modelsPage/autoRouterTemplateSelect.spec.ts b/tests/e2e/ui/tests/modelsPage/autoRouterTemplateSelect.spec.tsindex 7fc20104f20..51df50a2e68 100644--- a/tests/e2e/ui/tests/modelsPage/autoRouterTemplateSelect.spec.ts+++ b/tests/e2e/ui/tests/modelsPage/autoRouterTemplateSelect.spec.ts@@ -23,6 +23,8 @@ async function boxes(trigger: Locator, options: Locator) {return triggerBox && optionsBox ? { triggerBox, optionsBox } : null;}+const clippedPopup = (page: PlaywrightPage) => page.locator('[data-slot="select-content"]');+function pollOptionsOpenBelowTrigger(trigger: Locator, options: Locator) {return expect.poll(async () => {const box = await boxes(trigger, options);@@ -50,10 +52,9 @@ test.describe("Auto Router template select anchoring", () => {await trigger.scrollIntoViewIfNeeded();await trigger.click();- const options = page.getByRole("listbox");- await expect(options).toBeVisible();+ await expect(page.getByRole("listbox")).toBeVisible();- await pollOptionsOpenBelowTrigger(trigger, options).toBe(true);+ await pollOptionsOpenBelowTrigger(trigger, clippedPopup(page)).toBe(true);});test("keeps the trigger uncovered when the options open with no room below it", async ({ page }) => {@@ -62,9 +63,8 @@ test.describe("Auto Router template select anchoring", () => {await trigger.scrollIntoViewIfNeeded();await trigger.click();- const options = page.getByRole("listbox");- await expect(options).toBeVisible();+ await expect(page.getByRole("listbox")).toBeVisible();- await pollOptionsCoverTrigger(trigger, options).toBe(false);+ await pollOptionsCoverTrigger(trigger, clippedPopup(page)).toBe(false);});});diff --git a/tests/e2e/ui/tests/users/searchUsers.spec.ts b/tests/e2e/ui/tests/users/searchUsers.spec.tsindex 5e7e3e35b91..ee1a3f18f69 100644--- a/tests/e2e/ui/tests/users/searchUsers.spec.ts+++ b/tests/e2e/ui/tests/users/searchUsers.spec.ts@@ -46,6 +46,6 @@ test.describe("Internal Users Search", () => {await page.getByTestId("users-filter-sso-id").fill("e2e-sso-id-that-matches-nobody");await page.getByTestId("filter-drawer-apply").click();- await expect(userRows(page)).toHaveCount(0, { timeout: 30_000 });+ await expect(page.getByRole("row").filter({ hasText: "No results" })).toBeVisible({ timeout: 30_000 });});});