Skip to content

test: added test cases ui components 4 test files (popover, radio-group, scroll-area, resizable ui files)

ashritha kunjeti requested to merge test/ui2 into test_cases

Description:

radio-group.test.tsx

Added unit tests for the RadioGroup and RadioGroupItem components covering rendering, default selected value handling, user interaction for selection changes, checked/unchecked state validation, custom class name application, mocked indicator rendering, and ref forwarding.

popover.test.tsx

Added unit tests for the Popover, PopoverTrigger, and PopoverContent components covering rendering, click-based content visibility, controlled open state, custom class name application, alignment and sideOffset prop handling, ref forwarding, and required DOM API mocks for stable Radix UI behavior.

scroll-area.test.tsx

Added unit tests for the ScrollArea and ScrollBar components covering rendering with children, custom class name application, horizontal and vertical orientation, ref forwarding, and integration with Radix UI mocks (ResizeObserver).

resizable.test.tsx

Added unit tests for ResizablePanelGroup, ResizablePanel, and ResizableHandle components covering horizontal and vertical layouts, default panel sizes, rendering of handle icons, custom class name application, and ref/attribute validation. Mocked GripVertical icon from lucide-react for handle testing.

Type of Change:

  • Bug Fix
  • Feature Development
  • Documentation

Testing:

  • Tested on desktop
  • Tested on mobile
  • Tested in different browsers

Screenshots (if applicable): image Checklist:

  • Code follows project style guidelines
  • Self-review completed
  • No console errors
  • TypeScript types are correct

*Closes #274 (closed)

Edited by ashritha kunjeti

Merge request reports

Loading