Skip to content

Wait for focus to return in the project dialog tests - #828

Merged
czpython merged 1 commit into
mainfrom
claude/nostalgic-varahamihira-93d091
Oct 4, 2026
Merged

czpython merged 1 commit into
mainfrom
claude/nostalgic-varahamihira-93d091

Conversation

@czpython

@czpython czpython commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Two tests in ProjectsPage.test.tsx asserted document.activeElement immediately after the dialog left the DOM. ProjectDialog returns focus to its opener in an effect cleanup, and React runs that cleanup after it removes the dialog. The assertion could run while focus was still on <body>, and the test then failed.

Both assertions now wait for focus:

  • renames from the project actions and retains the draft on failure
  • returns focus to the project actions when the opener unmounts

No product code changes.

@czpython
czpython merged commit f066d75 into main Oct 4, 2026
4 checks passed
@czpython
czpython deleted the claude/nostalgic-varahamihira-93d091 branch October 4, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant