Skip to content

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]

test(ui-e2e): update usage page selectors after the #45221 redesign (#45347)

devin-ai-integration[bot]8bae65e0b6b1
diff --git a/tests/e2e/ui/fixtures/migratedPages.ts b/tests/e2e/ui/fixtures/migratedPages.ts
index d44dfc625aa..5fa1f9d2444 100644
--- a/tests/e2e/ui/fixtures/migratedPages.ts
+++ b/tests/e2e/ui/fixtures/migratedPages.ts
@@ -117,7 +117,7 @@ export const MIGRATED_E2E_PAGES: Readonly<Record<string, MigratedPage>> = {
linkName: "AI Hub",
content: { role: "heading", name: "AI Hub" },
},
- new_usage: { segment: "usage", linkName: "Usage", content: { role: "heading", name: "Usage View" } },
+ new_usage: { segment: "usage", linkName: "Usage", content: { role: "heading", name: "Usage" } },
usage: {
segment: "old-usage",
linkName: "Old Usage",
diff --git a/tests/e2e/ui/tests/usage/usagePage.spec.ts b/tests/e2e/ui/tests/usage/usagePage.spec.ts
index 3d057cfa2c9..d532042c7af 100644
--- a/tests/e2e/ui/tests/usage/usagePage.spec.ts
+++ b/tests/e2e/ui/tests/usage/usagePage.spec.ts
@@ -13,9 +13,8 @@ import {
/** Covers /ui/usage. The legacy /ui/old-usage view is deprecated and deliberately not covered. */
-/** Stepping up from the title is exact; the page renders several other tables. */
const topKeysCard = (page: PlaywrightPage): Locator =>
- page.getByText("Top Virtual Keys", { exact: true }).locator("xpath=..");
+ page.locator("section").filter({ has: page.getByRole("heading", { name: "Top Virtual Keys", exact: true }) });
async function openUsage(page: PlaywrightPage): Promise<Locator> {
await navigateToPage(page, Page.NewUsage);