diff --git a/tests/ui-specifiers.spec.ts b/tests/ui-specifiers.spec.ts index e09c967f1d..2dcbd9414f 100644 --- a/tests/ui-specifiers.spec.ts +++ b/tests/ui-specifiers.spec.ts @@ -1,6 +1,6 @@ import AxeBuilder from "@axe-core/playwright"; import { expect, test, type Locator, type Page, type TestInfo } from "playwright/test"; -import { clickWhenSettled, expectSingleSettledOwner } from "./playwright-settlement"; +import { clickWhenSettled, expectSingleSettledOwner, visibleByText } from "./playwright-settlement"; const axeWcagTags = ["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"]; const axeBlockingImpacts = new Set(["critical", "serious"]); @@ -141,7 +141,12 @@ test("searches clinical language without provenance fields and carries a result await page.goto(guidesUrl.toString()); } await expect(page).toHaveURL(/scope=guides/); - await expect(page.getByText("Top match", { exact: true })).toBeVisible(); + // `visibleByText`, not a bare getByText: until React's `$RV` reveal runs, the + // streamed copy of this route is still parked in a `