Skip to content

Host browser tests: open Settings submenus and choose their items by keyboard - #136

Open
agorischek wants to merge 1 commit into
mainfrom
choose-setting-keyboard
Open

agorischek wants to merge 1 commit into
mainfrom
choose-setting-keyboard

Conversation

@agorischek

Copy link
Copy Markdown
Collaborator

Follow-up to #129, before it flakes. chooseSetting and openSettingsSubmenu in packages/host/core/browser/harness.ts clicked 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. expectSetting opens submenus through the same helper.

…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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 benefiting expectSetting through the shared helper.
  • Selects Settings items with Enter instead 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

No deployments
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.

2 participants