litellm/ui/litellm-dashboard/src/components/templates
Yuneng Jiang a5f9410681
test(ui): wait for the select popup before clicking its option
key_edit_view opened a select and then clicked the option it found by
title text or by raw text. Both queries match the moment the option
enters the DOM, which is one render before the popup finishes entering.
Until then the positioner still carries an inline pointer-events: none,
and user-event refuses to click through it.

That is a race, and a fast machine loses it. Five of the file's 84 tests
failed on every local run while CI stayed green, which is the worst shape
for a test to have: it is only ever red on the machine of whoever is
trying to change the code.

tests/test-utils.tsx already ships chooseSelectOption for exactly this.
It finds the option by role and waits for the positioner to release
pointer events before clicking. The five call sites now use it, and the
helper takes the direct user-event API as well as a setup() instance so
callers do not have to restructure to use it.

Five consecutive full-file runs pass where every previous run failed.

Also finishes this file's screen queries, which brings
prefer-screen-queries to its target of 18.
2026-09-01 09:46:43 -07:00
..
estimatedOutputTokens.test.ts feat(rate limiting): configurable estimated output tokens per key, team and model (#36143) 2026-08-10 12:51:14 -07:00
estimatedOutputTokens.ts chore(ui): drop the antd dependency and its leftovers (#37574) 2026-08-19 20:44:27 -07:00
key_edit_view.test.tsx test(ui): wait for the select popup before clicking its option 2026-09-01 09:46:43 -07:00
key_edit_view.tsx refactor(ui): replace hand-picked z-index values with one named scale and lint it 2026-08-25 17:02:35 -07:00
key_info_view.budget_display.test.tsx test(ui): query the screen instead of the render result 2026-09-01 00:26:49 -07:00
key_info_view.test.tsx feat(ui): link team and key model chips to the models page filtered to that group 2026-08-27 21:08:33 -07:00
key_info_view.tsx test(ui): query the screen instead of the render result 2026-09-01 00:26:49 -07:00
keyEditFieldNormalizers.ts refactor(ui): migrate the key edit form off Ant Design onto react-hook-form (#37398) 2026-08-18 19:40:37 -07:00
keyEditFormValues.test.ts refactor(ui): migrate the key edit form off Ant Design onto react-hook-form (#37398) 2026-08-18 19:40:37 -07:00
keyEditFormValues.ts refactor(ui): migrate the key edit form off Ant Design onto react-hook-form (#37398) 2026-08-18 19:40:37 -07:00
KeyEditViewControls.tsx refactor(ui): migrate the key edit form off Ant Design onto react-hook-form (#37398) 2026-08-18 19:40:37 -07:00
KeyInfoHeader.test.tsx test(ui): assert presence and state so dashboard tests fail when behaviour breaks 2026-08-17 14:46:55 -07:00
KeyInfoHeader.tsx fix(ui): give status colours a readable foreground and drop the muted 70% step (#37649) 2026-08-20 10:58:32 -07:00
KeyInfoView.handleKeyUpdate.test.tsx test(ui): query the screen instead of the render result 2026-09-01 00:26:49 -07:00
KeySavingsTab.integration.test.tsx feat(spend): report prompt caching savings as total and gateway-attributed (#38134) 2026-08-28 00:19:06 -07:00
KeySavingsTab.tsx feat(spend): report prompt caching savings as total and gateway-attributed (#38134) 2026-08-28 00:19:06 -07:00