litellm/ui/litellm-dashboard/tests
ryan-crabbe-berri 7d63b86e00
fix(ui): forward refs through ui primitives and fail tests on swallowed refs (#32401)
* fix(ui): forward refs through ui primitives and fail tests on swallowed refs

Under React 18 a ref passed to a plain function component is dropped
with only a dev console warning, so Base UI render-prop triggers
composed over our shadcn-style primitives silently stop working (the
tooltip just never opens; ui/badge.tsx hit exactly this on the shared
DataTable branch). Label, Separator, Skeleton, UiLoadingSpinner and the
Table family now use React.forwardRef like Button and Input already
did, a contract test pins ref delivery for each, and setupTests turns
React's ref warning into a test failure so the next primitive that
swallows a ref fails CI instead of shipping a dead tooltip

* fix(ui): include captured ref warnings in the tripwire error

The afterEach tripwire threw a fixed message and discarded the collected
React warnings, so a failure never said which component swallowed the ref.
Append the captured warnings (component name + stack) to the thrown error.
2026-07-09 11:59:16 -07:00
..
eslint-rules feat(ui): add eslint rules for nested ternaries, large inline object args, and long condition chains (#32415) 2026-07-08 21:32:16 +00:00
CreateKeyPage.expiredToken.test.tsx refactor(ui): colocate users page into route-level _components (#31897) 2026-07-01 20:14:07 -07:00
fetch-location-rule.test.ts refactor(ui): shared HTTP client + location-pinned fetch() lint rule (#29723) 2026-06-04 20:27:58 -07:00
lint-budget-lib.test.ts feat(ui): track frontend lint counts in a committed snapshot (#31157) 2026-06-24 11:35:32 -07:00
setupTests.ts fix(ui): forward refs through ui primitives and fail tests on swallowed refs (#32401) 2026-07-09 11:59:16 -07:00
test-utils.tsx Migrate MCP servers to react query 2025-12-22 14:33:38 -08:00
top_key_view.test.tsx rename 2025-12-11 16:33:23 -08:00