litellm/tests/e2e/ui/helpers
yuneng-jiang b3151073d2
test(e2e/ui): cover key budget window, non-admin model scope edit, and key blocking (#40027)
* test(e2e/ui): cover key budget window, non-admin model scope edit, and key blocking

Three Playwright specs for the Virtual Keys flows customers hit most, each
reading its result back through /key/info and /v1/chat/completions rather
than trusting the toast:

- a monthly spend cap and reset window set through Edit Settings, surviving
  a reload, with clearing the window leaving the cap in place
- a team member narrowing their own team key's models, and the proxy
  refusing the model they dropped
- blocking a key from its detail page, then unblocking it

Each test owns the key it edits and deletes it on teardown, so retries and
--repeat-each never run out of fixtures.

* test(e2e/ui): tighten virtual key specs from review feedback

Replace the mutable suite-level key state with a Playwright fixture, so the
alias and token are never reassigned and cleanup stays tied to the test.

Assert /key/delete succeeded instead of discarding the response, so a failed
cleanup surfaces rather than leaving rows behind.

Drop the explanatory JSDoc the repo's comment policy disallows, keeping only
the one line explaining why Date.now() alone is not unique enough.

Type the master-key POST helper against a real guard instead of casting to
Record<string, any>.

Assert the unblocked key is served with a 200, not just the response text,
and that clearing the reset window also clears budget_reset_at.

* test(ui): assert the team response through Playwright
2026-09-08 22:49:54 -07:00
..
mcp.ts refactor(ui): migrate the last antd components off antd onto shadcn (#37569) 2026-08-20 03:01:07 +00:00
navigation.ts test(e2e/ui): cover key budget window, non-admin model scope edit, and key blocking (#40027) 2026-09-08 22:49:54 -07:00
playground.ts test(e2e/ui): address the migrated dashboard controls by role, not antd classes 2026-08-15 15:37:09 -07:00
premium.ts test(e2e/ui): stop the suite failing on things that are not regressions (#39063) 2026-09-01 12:34:57 -07:00
roundTrip.ts test(e2e-ui): verify UI mutations against the API instead of trusting the toast (#36632) 2026-08-12 13:39:58 -07:00
traffic.ts test(e2e/ui): cover key budget window, non-admin model scope edit, and key blocking (#40027) 2026-09-08 22:49:54 -07:00