Skip to content

Unit suite fails on main: walkthrough test queries the pre-rename button label #1865

Open

Description

@gdevenyi

What

The unit suite fails on main. apps/web/src/providers/__tests__/WalkthroughProvider.test.tsx queries the walkthrough's skip button with the old casing:

screen.getByRole('button', { name: "Don't show again" })

but 5fa1391a2 ("style: adjust style of walkthrough") renamed the label to "Don't Show Again" in apps/web/src/providers/WalkthroughProvider.tsx. getByRole name matching with a string is case-sensitive, so the query finds nothing:

  • WalkthroughProvider.test.tsx:306 — getByRole throws, test fails.
  • WalkthroughProvider.test.tsx:329 — queryByRole with the old name returns null, so the absence assertion passes vacuously and no longer tests the new label.

Evidence

  • Reproduced on a clean checkout of d6eeabcaa (current main) in an isolated worktree: 1 failed / 30 passed in that file; full pnpm test:coverage reports 1 failed test file on main's tree.
  • pnpm test:coverage is CI's unit gate (.github/workflows/ci.yaml, step 4), so every pull request off current main fails lint-and-test on this test, regardless of its own changes.

Fix

One-line change in apps/web/src/providers/__tests__/WalkthroughProvider.test.tsx: query "Don't Show Again" on both lines 306 and 329. Verified green: 31/31 in the file, and full coverage at 100% on the branches that carry it (#1855, #1822, commit test(web): match walkthrough button label casing).

Related

Activity

  1. added
    BugType: existing behavior is wrong
    Priority: HighSignificant or frequently hit user impact; target the next release or two
    Difficulty: LowIsolated change, about 2 hours or less
    Area: Webapps/web (clinician-facing React SPA)
    on Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Webapps/web (clinician-facing React SPA)BugType: existing behavior is wrongDifficulty: LowIsolated change, about 2 hours or lessPriority: HighSignificant or frequently hit user impact; target the next release or two

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions