# frontend/src/components/ui/__tests__
dir: frontend/src/components/ui/__tests__

index: frontend/src/components/ui/__tests__/.pi-map.index.md

## role
Test suite providing unit and integration tests for reusable UI components including Badge, DataTable, MobileCardRow, and SheetForm.
## files
- badge.test.tsx | Tests that the Badge component renders a success variant with the correct data attribute and CSS class using a Vitest testing harness. | dep: vitest, @testing-library/react, ../badge
- data-table.test.tsx | Tests a DataTable React component wrapper around TanStack Table, covering rendering, row selection, column visibility, row click events, empty states, and pagination. | dep: vitest, react, @testing-library/react, @testing-library/user-event, @tanstack/react-table, ../data-table
- mobile-card.test.tsx | Tests the MobileCardRow component for correct rendering of fields, click interactions, actions, and edge cases like empty rows and missing primary fields. | dep: vitest, @testing-library/react, @testing-library/user-event, ../mobile-card
- sheet-form.test.tsx | Tests the SheetForm component, verifying rendering, save/cancel callbacks, pending state, and dirty-state discard confirmation behavior. | dep: vitest, @testing-library/react, @testing-library/user-event, ../sheet-form
## arch
Vitest-based React Testing Library tests organized in a co-located `__tests__` directory, following a one-test-file-per-component convention with focus on rendering, user interactions, and edge cases.
## tags
@testing, library, react, vitest, tests, component, data, table
## symbols
-
## workflows
- update __tests__ tests
  read: badge.test.tsx, data-table.test.tsx, mobile-card.test.tsx
## dirty
-
