Repository navigation
test(combobox-web): add keyboard, multi selection and a11y e2e specs - #2501
Merged
Merged
Conversation
Covers behaviour that only a real browser shows and that the upcoming UI rewrite could break silently: arrow key and Enter selection, Home/End, typing into a closed combobox, Tab and click-outside closing, the no-options placeholder, Space/Enter toggling and the clear button in multi selection, row click chips, the unavailable placeholder, starts-with filtering, custom option content, filtering switched off, the select-all header, the menu footer, the ARIA attributes of the combobox pattern and an axe scan. The page object now addresses the filter input by role (a bare input locator also matches the option checkboxes), names the clear and remove controls by their accessible names, and waits for the first option after opening because keys pressed while the first lazy load is in flight are lost. One test is pinned as fixme: clearing a boxes style multi selection while the menu is open loses the click at the default viewport, because the filter input collapses on blur and the row reflows under the cursor.
Contributor
AI Code Review
What was reviewed
Skipped (out of scope): none CI: pending: Run code quality check, Plan E2E matrix, sigridci · unrelated failures: security/snyk (external scanner, and no widget code changed) Positives
|
leonardomendix
approved these changes
Oct 29, 2026
gjulivan
approved these changes
Oct 29, 2026
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.
Pull request type
Test related change (New E2E test, test automation, etc.)
Description
Widens the combobox E2E safety net before the UI rewrite (see #2499 for the unit-level net). The existing suite checked each data source family with screenshots, chip keyboard handling, onChange and menu positioning, but selected options only by mouse click and asserted no ARIA state. The rewrite will replace the rendering, so the behaviour that only a real browser shows needed to be pinned first.
New specs, 28 → 55 cases, all green locally against the
combobox-web-atlas4test project (run twice in a row):ComboboxKeyboardNavigation.spec.js(single select): ArrowDown/ArrowUp/Enter, Home/End, typing into a closed combobox, Tab and click-outside closing with the filter text dropped and the selection kept, the no-options placeholder, the clear button.ComboboxMultiSelection.spec.js: opening with no highlight, Space and Enter toggling with the menu kept open, option clicks, the clear button, row click mode moving options to chips and back, accessible remove buttons.ComboboxMenuFeatures.spec.js(City overview, data view driven by grid selection): the unavailable placeholder until a row is selected, starts-with filtering, custom option content, filtering switched off, the select-all header with its mixed state, and the menu footer keeping the menu open.ComboboxAccessibility.spec.js: the combobox pattern attributes (role,aria-expanded,aria-controls,aria-labelledby,aria-activedescendant,aria-selected), accessible names of the clear and remove controls, the disabled read-only state, and an axe scan closed and open.Page object changes (
e2e/utils/Combobox.pageObject.js, API used byOnChange.spec.jskept):role=combobox: a bareinputlocator also matches the checkbox inside every option once a multi-select menu is open.open()clicks the arrow (the earlier.widget-comboboxclick did not open the popup widgets) and waits for the first option, because keys pressed during the first lazy load are lost.Widget issues found while writing these specs (not fixed here)
test.fixmeinComboboxMultiSelection.spec.js). At the default 1280px viewport two chips push the focused filter input onto a second line. Pressing the mouse on the clear button blurs the input, the input collapses to 0px (max-width: 0while empty and unfocused), the row reflows, the button shrinks under the cursor and the mouseup lands on the input container. The click then toggles the menu instead of clearing. Users see a clear button that needs two clicks.Not covered because the test project lacks the configuration: lazy-load paging (every datasource has 6 objects), validation feedback, on enter/leave and filter-input change actions, clearable switched off, database multi selection with boxes.
What should be covered while testing?
Run
pnpm e2einpackages/pluggableWidgets/combobox-web. No widget code changes.