Repository navigation
test: walk the command reference's Tab loop to its Close button before Escape - #5791
Merged
Merged
Conversation
…e Escape The modal Tab-loop test pressed Tab a fixed number of times (the stop count plus two) and expected one Escape to close the reference. #5746 added the K command, one more row and stop, so the walk now ends on Close instead of the page body. Tab reads Close's preview, and a standing preview takes the first Escape (keyboard/AGENTS.md, "Escape"), so the reference stayed open. The walk now stops when Tab has come round to Close a second time, which still proves the loop wraps inside the dialog, and puts the preview away before the Escape under test. The protected behavior is unchanged: Tab stays inside the modal reference, and Escape closes it and returns focus to its door. Refs #3985
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_the_keyboard_reference_is_a_modal_tab_loop_and_returns_to_its_doorhas failed on every push run onmainsince #5746, starting with 42618688222. It fails withLocator expected to be hiddenafter the Escape.The test pressed Tab a fixed number of times, the stop count plus two, then pressed Escape once. #5746 added
K(preview.show), so the reference gained one row and one stop. That shifted where the fixed walk ends: on the commit before #5746 it ended on the page body, which has no preview, and now it ends on the Close button. Tab reads Close's preview, and under #5746's rule a standing preview takes the first Escape (browser/runtime/keyboard/AGENTS.md, "Escape"). So the reference stayed open. A probe confirmed that a second Escape closes it and returns focus to the door.The test now walks until Tab comes back to Close a second time. That still proves the loop wraps inside the dialog, and the walk ends at the same stop however many command rows there are. Before the Escape under test, it puts the preview away with
put_preview_away, which fails unless a preview was showing. The product is unchanged, and both #5746's intent and the behavior the test protects still hold. The test fails onmainatd2fb80d4cand passes with this change.Refs #3985 — automated triage