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> = { 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 { await navigateToPage(page, Page.NewUsage);