Skip to content

Increase test coverage of explorer and search#1934

Merged
axelboc merged 1 commit into
mainfrom
cov-explorer-search
Dec 22, 2025
Merged

Increase test coverage of explorer and search#1934
axelboc merged 1 commit into
mainfrom
cov-explorer-search

Conversation

@axelboc

@axelboc axelboc commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

The search wasn't tested at all, and in the explorer, we weren't testing the keyboard navigation.

Both the search and explorer folders now have 100% test coverage, which adds two percentage points overall. We're now on 62.66%.

While testing the keyboard navigation in the explorer, I noticed a subtle bug: when pressing the right arrow key on an already expanded empty group, the focus would move to the sibling of the group instead of remaining on the group. Below is a screen recording of the bug where I press the right arrow key five times in a row:

Screencast.from.2025-12-22.16-08-08.webm

Now the focus remains on the group — here I press the right arrow key 10 times:

Screencast.from.2025-12-22.16-10-22.webm

}
if (isExpanded) {
focusNext(e);
focusNext(evt, true);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The fix starts here; I pass true to focusNext to restrict the search of the next button to focus to the children only.

Comment on lines -41 to -43
if (!path) {
return;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

If the data-path attribute is not present on an explorer button, it's a bug, so replace with an assertion.

@axelboc axelboc merged commit e877670 into main Dec 22, 2025
13 checks passed
@axelboc axelboc deleted the cov-explorer-search branch December 22, 2025 15:17
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.

1 participant