litellm/ui/litellm-dashboard/tests
ryan-crabbe-berri 2dc49a913c
refactor(ui): replace hand-rolled query-param routing with nuqs (#35871)
* refactor(ui): replace hand-rolled query-param routing with nuqs

The dashboard carried five copies of the same pushState-based detail
routing hook plus a shared navigateWithParams helper, each with its own
plumbing test and a copy-pasted reactive useSearchParams mock in
component tests. nuqs provides the same shallow history-API routing
behind useQueryState/useQueryStates, so the key, team and org hooks are
deleted in favor of inline useQueryState at their single consumers,
while the models and logs hooks keep their interfaces but drop their
hand-rolled internals. Component tests now mount NuqsTestingAdapter
(via renderWithProviders or locally) instead of patching window.history,
and URL assertions go through onUrlUpdate spies that can additionally
distinguish push from replace, which the old window.location checks
could not

* test(ui): assert browser back closes the log drawer after in-drawer selection

Greptile flagged that the nuqs port of the switching-logs test stopped
at asserting emitted push and replace modes. The test now replays those
recorded modes against a history stack and performs the back step, so a
regression to push-on-select or broken URL-derived drawer state fails
the test instead of passing silently
2026-08-05 13:29:58 -07:00
..
eslint-rules chore(ui): add filename, size, JSX-handler, prefer-const, and antd lint rules (#34341) 2026-07-22 19:34:35 -07:00
CreateKeyPage.expiredToken.test.tsx fix(ui): navigate to /ui/login/ with trailing slash via hard navigation (#33561) 2026-07-16 12:18:55 -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
jsdomFetchEnv.ts chore(build): move the Admin UI toolchain to Node 24 (#35801) 2026-08-04 12:36:07 -07:00
lint-budget-lib.test.ts chore(ui): remove eslint-metrics.json lint-count snapshot 2026-07-11 11:54:42 -07:00
setupTests.ts refactor(ui): inject the fetch client's base url instead of reading it at import 2026-08-04 12:07:45 -07:00
test-utils.tsx refactor(ui): replace hand-rolled query-param routing with nuqs (#35871) 2026-08-05 13:29:58 -07:00
top_key_view.test.tsx rename 2025-12-11 16:33:23 -08:00