From cdbe9bc2f86f2cd7c909e7bf7c09a95ebcc271ef Mon Sep 17 00:00:00 2001 From: BigSimmo <87357024+BigSimmo@users.noreply.github.com> Date: Tue, 18 Aug 2026 18:52:25 +0800 Subject: [PATCH 1/2] test(tools): repair the three assertions the tools mockup spec had stale on main MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `tests/ui-tools-search-mode-mockup.spec.ts` failed on clean `main` with no PR applied — 2 failed | 14 passed — so the non-blocking Advisory UI lane was red for every UI PR in the repo regardless of its diff. Two unrelated changes had moved under it. - The seeded `Compare` query now matches two tools, not one: the Clinical Dictionary (#2096) lists "compare" among its keywords and sits in the evidence area, alongside Differentials in assess. Verified against the catalogue itself rather than assumed — `rankToolRecords("Compare")` returns Clinical Dictionary [reference] and Differentials [assessment]. The desktop count and the `All tools (n)` radio name follow. - The filter sheet reports " tools" since the catalogue toolbars were standardised (#2086); it no longer says " showing". Three assertions. - The sheet's confirm control is labelled from its live summary — "View 2 tools" — and only falls back to "Done" when there is no summary. It is now targeted by the stable `tools-search-filter-sheet-done` test id, so the assertion cannot break again when the result count changes. Every replacement value was read from the running page through a temporary probe (sheet inner text and each radio's accessible name), not inferred. Verified: `16 passed` for the whole spec in the chromium-mockups project. Co-Authored-By: Claude Opus 5 --- tests/ui-tools-search-mode-mockup.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/ui-tools-search-mode-mockup.spec.ts b/tests/ui-tools-search-mode-mockup.spec.ts index 6c96d50c45..7834a6fd8e 100644 --- a/tests/ui-tools-search-mode-mockup.spec.ts +++ b/tests/ui-tools-search-mode-mockup.spec.ts @@ -25,7 +25,7 @@ test.describe("Perfected Tools results mode mockup @mockup", () => { const mockup = await gotoMockup(page, 1440); await expect(mockup.getByRole("heading", { level: 1, name: "Compare" })).toBeVisible(); - await expect(mockup.getByText("1 tool", { exact: true })).toBeVisible(); + await expect(mockup.getByText("2 tools", { exact: true })).toBeVisible(); await expect(mockup.getByRole("heading", { level: 2, name: "Differentials" }).first()).toBeVisible(); const selectedResult = mockup.getByRole("article").filter({ hasText: "Differentials" }); await expect(selectedResult).toHaveAttribute("data-selected", "true"); @@ -39,7 +39,7 @@ test.describe("Perfected Tools results mode mockup @mockup", () => { await expect(mockup.getByText("Dose converter")).toHaveCount(0); const categoryRail = mockup.getByRole("radiogroup", { name: "Tool category" }); - const allToolsFilter = categoryRail.getByRole("radio", { name: "All tools (1)" }); + const allToolsFilter = categoryRail.getByRole("radio", { name: "All tools (2)" }); await allToolsFilter.focus(); await page.keyboard.press("ArrowRight"); await expect(categoryRail.getByRole("radio", { name: "Assess (1)" })).toHaveAttribute("aria-checked", "true"); @@ -195,15 +195,15 @@ test.describe("Perfected Tools results mode mockup @mockup", () => { await trigger.click(); const filterSheet = page.locator('[data-testid="tools-search-filter-sheet"]:visible'); await expect(filterSheet).toBeVisible(); - await expect(filterSheet.getByText("2 showing", { exact: true })).toBeVisible(); + await expect(filterSheet.getByText("2 tools", { exact: true })).toBeVisible(); await expect(filterSheet.getByRole("radio", { name: /Evidence/ })).toHaveAttribute("aria-disabled", "true"); const treatment = filterSheet.getByRole("radio", { name: /Treat/ }); await treatment.click(); await expect(treatment).toHaveAttribute("aria-checked", "true"); await expect(filterSheet).toBeVisible(); - await expect(filterSheet.getByText("2 showing", { exact: true })).toBeVisible(); - await filterSheet.getByRole("button", { name: "Done" }).click(); + await expect(filterSheet.getByText("2 tools", { exact: true })).toBeVisible(); + await filterSheet.getByTestId("tools-search-filter-sheet-done").click(); await expect(filterSheet).toHaveCount(0); await expect(trigger).toContainText("1"); @@ -211,7 +211,7 @@ test.describe("Perfected Tools results mode mockup @mockup", () => { await filterSheet.getByRole("button", { name: "Clear filters" }).click(); await expect(filterSheet).toBeVisible(); await expect(filterSheet.getByRole("radio", { name: /All tools/ })).toHaveAttribute("aria-checked", "true"); - await expect(filterSheet.getByText("2 showing", { exact: true })).toBeVisible(); + await expect(filterSheet.getByText("2 tools", { exact: true })).toBeVisible(); await expectNoHorizontalOverflow(page); }); From 12c312315cd61c09ed81628e9136566d21d71b18 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 18 Aug 2026 11:52:34 +0000 Subject: [PATCH 2/2] chore(ledger): record Run PR sweep review for PR #2115 Records the branch-sync-from-main action taken during the Run PR sweep (head d553b2c4 -> 5664a4f6). Unit coverage remains failing on both heads due to a pre-existing, diff-unrelated issue: an uncleared window.setTimeout in caring-contact-shell-frame.tsx fires after test teardown, unrelated to this PR's tools-mockup-spec diff. Co-Authored-By: Claude Sonnet 5 --- ...bf0c5a2f2840eccad03527562a9d96d800d1cdf6b970eaa126a.record.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/branch-review-records/9c83ebb18e9d5bf0c5a2f2840eccad03527562a9d96d800d1cdf6b970eaa126a.record.md diff --git a/docs/branch-review-records/9c83ebb18e9d5bf0c5a2f2840eccad03527562a9d96d800d1cdf6b970eaa126a.record.md b/docs/branch-review-records/9c83ebb18e9d5bf0c5a2f2840eccad03527562a9d96d800d1cdf6b970eaa126a.record.md new file mode 100644 index 0000000000..7b4d107809 --- /dev/null +++ b/docs/branch-review-records/9c83ebb18e9d5bf0c5a2f2840eccad03527562a9d96d800d1cdf6b970eaa126a.record.md @@ -0,0 +1 @@ +| 2026-08-18 | claude/advisory-tools-spec-repair (PR #2115) | 5664a4f6a861060693a8c0611ce5d8bfba487fe7 | Run PR sweep: CI fix + threads + drift | Synced behind branch to origin/main via GitHub update-branch (clean fast-mergeable, no conflicts); no code changes pushed. Pre-sync head d553b2c4 had PR required failing on Unit coverage; post-sync head 5664a4f6 reproduced the same Unit coverage failure (all 671 test files / 7173 tests pass; job fails on an unhandled post-teardown ReferenceError: document is not defined from an uncleared window.setTimeout in src/components/caring-contacts/mockups/caring-contact-shell-frame.tsx:92, triggered while tests/caring-contact-product-redesign.dom.test.tsx runs) -- confirmed unrelated to this PR's 6-line diff in tests/ui-tools-search-mode-mockup.spec.ts, left unfixed as out-of-scope and flagged for a human. 0 unresolved review threads at both heads, none to action. | GitHub-hosted CI only (no local reproduction attempted): Static PR checks pass, Safety and config checks pass, Production UI critical pass, PR policy/PR mergeability pass, Gitleaks/Semgrep/GitGuardian pass, Advisory UI pass (non-required); Unit coverage fails (pre-existing, diff-unrelated); PR required aggregate still failing as a result. No provider-backed checks run. |