test(claimflow): fix broken tests and add focus-visible coverage (#585)#671
Merged
greatest0fallt1me merged 1 commit intoJul 26, 2026
Merged
Conversation
|
@Israel-light is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Israel-light Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add focus-visible outline on ClaimFlow (v7) — closes #585
Summary
Before making changes, I verified the current state of
mainagainst theissue's suggested paths (
src/pages/ClaimFlow.tsx,src/styles/focus.css)and found they don't match the repo — this is a Next.js App Router project
with no
src/pagesorsrc/stylesdirectory.Investigating further, the underlying work described in the issue is
already implemented and wired up on
main:app/styles/focus.css— a full:focus-visiblelayer (3px outline,2px offset, dark-mode adjustment, inset variant for clipped containers,
skip-link handling), already imported globally via
app/globals.css.src/pages/ClaimFlow.tsx— already built, responsive, witharia-liveannouncements and semantic headings.
app/__tests__/focus-visible.test.js— already covers the CSS layeritself and passes.
What was actually broken:
src/pages/ClaimFlow.test.tsxwas failing2/2 on
main. The component gates its data behind a 1200ms delay unlessprefers-reduced-motionis on, but the existing tests queriedsynchronously / raced a real timer against
findByRole's default 1000mstimeout — so the acceptance criterion "tests added and passing" wasn't
actually true.
Changes
src/pages/ClaimFlow.test.tsx:useReducedMotion→trueso tests observe the loaded statedeterministically instead of racing the component's internal timer.
"Successfully claimed…" text (which gets overwritten by a separate,
pre-existing effect a tick later — out of scope to change here) with
stable assertions on the toast call and the list update.
interactive controls, since the existing
focus-visible.test.jsonlyasserts the CSS layer exists, not that ClaimFlow's own buttons use it:
focus-visible:ring-*utility class.focus-visible:ring-*class.No changes to
focus.cssorClaimFlow.tsx— the a11y implementationitself already meets WCAG 2.1 AA (verified: 3px outline / 2px offset
exceeds the 3:1 non-text contrast minimum in SC 1.4.11) and doesn't need
edits.
Testing
npx eslint src/pages/ClaimFlow.test.tsx— clean.Note: the full repo suite (
npx jest) has ~95 pre-existing failuresacross ~19 unrelated files (e.g.
app/a11y-audit/page.test.tsxassertingstale counts). Those predate this change and are out of scope here.
Docs / visible changes
None — this is test-only. No API or visual changes.