TEST Fix dialog focus flakiness - #2645
Open
Roman Lutz (romanlutz) wants to merge 1 commit into
Open
Conversation
Provide a display-aware JSDOM layout shim so Fluent UI focuses a dialog control before Tabster's deferred accessibility update. Add the 250 ms regression, remove timeout workarounds, and wait for accessible navigation after modal cleanup. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Description
Addresses intermittent Configuration dialog failures such as this Frontend Tests run, without increasing timeouts or querying hidden dialogs.
The dialog is already mounted when it becomes inaccessible. JSDOM's missing layout prevents Fluent UI from finding a focusable input, so it focuses the dialog surface. When Tabster registers the modal after that focus event, it misses activation because focus is on the surface rather than a descendant. Its deferred 250 ms update then sets
aria-hidden="true"on the open dialog. Waiting longer cannot recover it.userEvent.Production UI, dependencies, scorer behavior, and coverage thresholds are unchanged.
Tests and Documentation
npm run test:coverageruns each passed all 1,432 tests across 72 suites. Coverage: statements 93.11%, branches 85.89%, functions 91.57%, lines 94.45%.npm run type-checkandnpm run lintpassed.Validation used Node v22.23.2 on Windows, not a new Ubuntu Actions run. The uncontrolled Configuration failure did not recur in eight baseline file runs; the failure mechanism was reproduced with the controlled timer regression.
JupyText: N/A (frontend test-only changes).