test: added test cases for command and contextmenu
Description:
Added unit tests for reusable UI components to improve coverage and ensure consistent behavior across the application.
-
command.test.tsx (64 tests): Covers Command UI elements including Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, and CommandSeparator. Tests include rendering, user interactions, keyboard navigation, callbacks, accessibility, and edge cases.
-
context-menu.test.tsx (68 tests): Covers Context Menu UI elements including ContextMenu, Trigger, Content, Item, CheckboxItem, RadioItem, Label, Separator, Shortcut, Group, Portal, Submenus, and RadioGroup. Tests include right-click interactions, menu open/close behavior, item selection, checkbox/radio states, submenu handling, keyboard navigation, accessibility, and edge cases.
These tests ensure stability and reliability of shared UI primitives.
Type of Change:
-
Bug Fix -
Feature Development -
Documentation
Testing:
-
Tested on desktop -
Tested on mobile -
Tested in different browsers
Screenshots (if applicable):
Checklist:
-
Code follows project style guidelines -
Self-review completed -
No console errors -
TypeScript types are correct
closes #266 (closed)
