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

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

* test(ui-e2e): drop the top keys locator comment

---------

Co-authored-by: yuneng <yuneng@berri.ai>
This commit is contained in:
devin-ai-integration[bot] 2026-10-08 15:55:22 -07:00 • committed by GitHub
parent 308c42a4a2
commit 8bae65e0b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View file

@ -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",

View file

@ -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);