Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tests/ui-specifiers.spec.ts
Original file line number Diff line number Diff line change
@@ -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"]);
Expand Down Expand Up @@ -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 `<div hidden id="S:n">` at
// the end of <body> (see `(search-app)/loading.tsx`), so a page-level query
// resolves to the live badge plus that hidden twin and trips strict mode.
// Chromium reveals before this line; WebKit loses the race (#093).
await expect(visibleByText(page, "Top match", { exact: true })).toBeVisible();
// Below the sm breakpoint the results band swaps the desktop trigger for its phone twin.
const phoneWidth = (page.viewportSize()?.width ?? 1280) < 640;
const filterTrigger = page.getByTestId(
Expand Down
Loading