Repository navigation
test: wait for the margin marker to be visible before focusing it in the seated-thread test - #6667
Merged
Merged
Conversation
test_a_user_on_a_thread_returning_to_the_diff_goes_with_it[marker] focused the marker right after told(page), which waits only through the state stage. The margin row the patch change brings stays visibility: hidden until layout gives it a place (annotation-theme.css), so under load focus() landed on a hidden marker, did nothing, and the focus assertion waited out its timeout. The test now waits for the marker to be visible first. No product behavior changes. Closes #6664
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.
test_a_user_on_a_thread_returning_to_the_diff_goes_with_it[marker]focused the margin marker straight aftertold(page), which waits only through the page'sstatestage. The margin row that the patch change brings in staysvisibility: hiddenuntil layout gives it a place (.lf-margin-cluster:not([data-lf-place]),browser/runtime/annotation-overlay/annotation-theme.css). Under load,focus()reached the marker while it was still hidden. That call did nothing, and Playwright doesn't retry it, so the focus assertion waited out its 120 s timeout. The test now waits for the marker to be visible before focusing it. The product doesn't change: a user can't Tab onto a row that hasn't been placed either. The test'scloseroute already waited, becauseclick()checks visibility first.Evidence on CI's Mac (
--workers 3 --load 2):f1d623be2(44922543784). In an instrumented copy of the base test, 6 of 36 failed (44925329166). In those copiesdocument.hasFocus()was true andactiveElementwas<body>, and nofocusinever reached a margin marker. So the page didn't lose focus as a whole;focus()simply never took.Cause of a failure tracked in #6659.
Closes #6664 — automated triage