Add specs for experimental aria abstract base classes - #654
Open
fpigeonjr wants to merge 1 commit into
Open
Conversation
Raises unit-test coverage for src/ui-kit/experimental/aria/ from 0% (abstract-grid, abstract-combobox, abstract-row, utils/events) and 2.08% (abstract-cell) via minimal DOM fixtures / a hand-rolled popup stub exercising each class's public keyboard/focus-management contract. Coverage: abstract-grid.ts 0% -> 89.6%, abstract-combobox.ts 0% -> 69.49%, abstract-row.ts 0% -> 100%, abstract-cell.ts 2.08% -> 92%, utils/events.ts 0% -> 94.28%. Overall statements 53.56% -> 56.97%. Closes #635
There was a problem hiding this comment.
Pull request overview
Adds Vitest/JSDOM unit specs to significantly increase coverage for the experimental ARIA abstract base classes under src/ui-kit/experimental/aria/, exercising behavior via minimal DOM fixtures and a lightweight popup stub for the combobox path.
Changes:
- Added unit tests for
EventDispatcher(registration, dispatch, disconnect behavior, invalid-event guards). - Added unit tests for
AbstractCell,AbstractRow, andAbstractGrid(role parsing, focus/tab-order management, click/keydown handling, navigation and config flags). - Added unit tests for
AbstractCombobox(value proxying, search/change dispatch, arrow-key selection and commit behavior via a fake popup).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ui-kit/experimental/aria/utils/events.spec.ts | Adds coverage for the event dispatcher utility used by the ARIA base classes. |
| src/ui-kit/experimental/aria/abstract-grid/abstract-cell.spec.ts | Adds focused tests around cell parsing, focus target selection, and event dispatch wiring. |
| src/ui-kit/experimental/aria/abstract-grid/abstract-row.spec.ts | Adds tests for row cell discovery and addCell behavior. |
| src/ui-kit/experimental/aria/abstract-grid/abstract-grid.spec.ts | Adds tests for grid discovery, initial focus, navigation, and default click/keydown behaviors. |
| src/ui-kit/experimental/aria/abstract-combobox/abstract-combobox.spec.ts | Adds tests for combobox value/search/change behavior and popup-driven selection/commit flows. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This was referenced Aug 28, 2026
fpigeonjr
marked this pull request as ready for review
August 28, 2026 18:10
divyabairavarasu
approved these changes
Aug 28, 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.
Description
Adds unit-test specs for the experimental ARIA grid/combobox abstract base classes in
src/ui-kit/experimental/aria/, which previously had little to no coverage. Each class is exercised through its public interface using minimal DOM fixtures (or, forAbstractCombobox, a hand-rolledFakePopupstub matchingAbstractGrid's public surface) rather than reaching into private state.New spec files:
utils/events.spec.ts—EventDispatcher: on/dispatch/disconnect/disconnectAll, invalid-event guards, duplicate-callback dedupabstract-grid/abstract-cell.spec.ts—AbstractCell: role/key/value parsing, focus-target resolution, tab-order toggling, click/keydown dispatchabstract-grid/abstract-row.spec.ts—AbstractRow: cell discovery by role,addCellabstract-grid/abstract-grid.spec.ts—AbstractGrid: grid discovery, initial focus, arrow-key navigation with edge clamping, click delegation, config flags (disableFocus,useDefaultKeydownEvents,useDefaultClickEvents)abstract-combobox/abstract-combobox.spec.ts—AbstractCombobox: value proxy, search/change dispatch, arrow-key delegation to a popup, Enter-to-commit, popup-click-to-commitNo production source files were changed — this is spec-only, per the parent issue's scope.
Motivation and Context
Closes #635
Part of the coverage-improvement work tracked under #576 (angular-upgrade epic).
Type of Change (Select One and Apply Label)
bugfixlabelenhancementlabelbreakinglabelmaintenancelabelHow to Test
npm ci && npm ci --prefix test-appnpm --prefix test-app test— all 707 specs pass (was 667); coverage summary printed at the endnpm run coverage:check— confirms the ratcheting coverage floor still passes (overall statements moved 53.56% → 56.97%)npm run lint:baseline— confirms no new ESLint warnings beyond the recorded baselinenpm run format:check— confirms Prettier formattingcd test-app && npm run build— confirms the app still buildsExpected result: all specs pass, coverage for the five target files rises from 0%/2.08% baselines to 89.6% (
abstract-grid.ts), 69.49% (abstract-combobox.ts), 100% (abstract-row.ts), 92% (abstract-cell.ts), and 94.28% (utils/events.ts); no lint/format regressions.Screenshots (if appropriate)
N/A — test-only changes, no UI impact.
Checklist
gh-<number>-<slug>)format:checkpasses (npm run format:check)lintpasses (npm run lint)buildpasses (cd test-app && npm run build)cd test-app && npm test)