Repository navigation
Host browser tests: open Settings submenus and choose their items by keyboard - #136
Open
agorischek wants to merge 1 commit into
Open
agorischek wants to merge 1 commit into
agorischek wants to merge 1 commit into
Conversation
…keyboard The harness's chooseSetting and openSettingsSubmenu clicked a submenu's trigger and then its item. Where a submenu opens to the left, the menu reads the pointer's jump into it as moving away from it, closes the submenu as the pointer leaves its trigger, and a click on the item lands only while it fades out: the race #129 fixed in the renderer harness's annotations.spec, where on a slow WebKit runner the click fell through to the renderer's frame. The helpers now open the submenu with Right Arrow and choose with Enter, which no pointer position can undo. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the keyboard-based Settings submenu and item-selection changes.
No open issues 🎉
What changed in this PR
Extends the keyboard-based fix from #129 to the host browser-test harness, avoiding pointer-triggered submenu closures that can cause clicks to fall through on slow runners.
Changes:
- Opens Settings submenus with
ArrowRight, also benefitingexpectSettingthrough the shared helper. - Selects Settings items with
Enterinstead of clicking and documents the reason for keyboard interaction.
| File | Description |
|---|---|
packages/host/core/browser/harness.ts |
Uses keyboard input to open Settings submenus and select items reliably. |
Review effort: Balanced
This branch has not been deployed
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.
Follow-up to #129, before it flakes.
chooseSettingandopenSettingsSubmenuinpackages/host/core/browser/harness.tsclicked a Settings submenu's trigger and then the item. When a submenu opens to the left, Radix reads the pointer's first jump into the menu as moving away from the submenu. It closes the submenu as the pointer leaves the trigger, so the click on the item lands only during the fade-out. On a slow WebKit runner the click instead falls through to whatever is behind the menu. That was the cause of the renderer harness's annotations.spec flake (14 jobs, Nov 17–20, 3 on main). host/core's suites haven't hit it yet, but every test that chooses a submenu setting through these helpers is exposed.The helpers now open the submenu with Right Arrow (Radix's SubTrigger open key) and choose the item with Enter, which no pointer position can undo.
expectSettingopens submenus through the same helper.