Skip to content

Add test coverage for inline search functionality in SInputDropdown#667

Merged
brc-dd merged 5 commits into
feat/inline-search-dropdownfrom
copilot/sub-pr-661
Dec 8, 2025
Merged

Add test coverage for inline search functionality in SInputDropdown#667
brc-dd merged 5 commits into
feat/inline-search-dropdownfrom
copilot/sub-pr-661

Conversation

Copy link
Copy Markdown

Copilot AI commented Dec 8, 2025

Test Coverage for Inline Search Functionality

Branch updated: Merged latest changes from pr-661 (feat/inline-search-dropdown) to incorporate Escape key handling and insertOnSpace features.

  • Add tests for Fuse.js filtering behavior
    • Test filtering with search query
    • Test filtering with empty query returns all options
    • Test filtering with no matches
    • Test excluding disabled options from filtering
  • Add tests for keyboard navigation
    • Test ArrowDown navigation
    • Test ArrowUp navigation
    • Test Enter key selection
    • Test Tab key selection
    • Test Backspace key to remove last selected item
    • Test wrapping navigation (top to bottom, bottom to top)
    • Test disabled state prevents navigation
  • Add tests for selection behavior
    • Test selecting active item with Enter
    • Test selecting active item with Tab
    • Test selection in multi-select mode
    • Test deselection in multi-select mode
    • Test selection in single-select mode
    • Test replacing selection in single-select mode
    • Test selecting first filtered option with query
  • Add tests for reset behavior
    • Test query reset after selection
    • Test active index reset after selection
  • Add tests for chip rendering in multi-select mode
    • Test chip rendering for selected items
    • Test chip removal via close button
    • Test chip rendering for avatar type items
    • Test internationalized aria-labels on close buttons
  • Add tests for focus management
    • Test focus on inline input when box is clicked
    • Test refocus after selection
    • Test disabled state prevents focus
  • Fix TypeScript type errors
  • Fix linting issues
  • Update branch with latest pr-661 changes

Total tests: 36 (33 from this PR + 3 Escape key tests from pr-661)
No duplicate tests found

All tests passing ✅
Type checking: ✅ passing
Linting: ✅ passing


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: brc-dd <40380293+brc-dd@users.noreply.github.com>
Copilot AI changed the title [WIP] Update inline search functionality in input-dropdown feature Add test coverage for inline search functionality in SInputDropdown Dec 8, 2025
Copilot AI requested a review from brc-dd December 8, 2025 02:46
@brc-dd
Copy link
Copy Markdown
Member

brc-dd commented Dec 8, 2025

@copilot pnpm run type is failing

Co-authored-by: brc-dd <40380293+brc-dd@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Dec 8, 2025

@copilot pnpm run type is failing

Fixed in 7760aa4. The issue was that input.element.value wasn't properly typed - I've added type assertions to cast the elements to HTMLInputElement where needed. Type checking now passes.

@brc-dd brc-dd marked this pull request as ready for review December 8, 2025 02:53
@brc-dd brc-dd requested a review from kiaking as a code owner December 8, 2025 02:53
@brc-dd
Copy link
Copy Markdown
Member

brc-dd commented Dec 8, 2025

@copilot run pnpm lint too

Co-authored-by: brc-dd <40380293+brc-dd@users.noreply.github.com>
Copy link
Copy Markdown
Author

Copilot AI commented Dec 8, 2025

@copilot run pnpm lint too

Linting passes. Fixed some trailing whitespace issues in 9c684f1.

@brc-dd
Copy link
Copy Markdown
Member

brc-dd commented Dec 8, 2025

@copilot Update the branch and remove any duplicate tests.

Copy link
Copy Markdown
Author

Copilot AI commented Dec 8, 2025

@copilot Update the branch and remove any duplicate tests.

Branch updated in beb9ad9. Merged latest changes from pr-661 (feat/inline-search-dropdown) which added Escape key handling and insertOnSpace features.

Verified: 36 tests total (33 from this PR + 3 from pr-661), no duplicates found. All tests, type checking, and linting pass.

@brc-dd brc-dd merged commit 9fb0d9e into feat/inline-search-dropdown Dec 8, 2025
1 check passed
@brc-dd brc-dd deleted the copilot/sub-pr-661 branch December 8, 2025 03:14
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