fix(ui-tests): add Typography to antd mock in create_key_button test - #27537
Conversation
The antd mock omits Typography, which caused all 15 tests in create_key_button.test.tsx to fail with "No 'Typography' export is defined on the 'antd' mock" after #27218 switched the key-type dropdown labels to Typography.Text / Typography.Paragraph. Add Typography (with .Text, .Paragraph, .Title subcomponents) to the mock so the dropdown renders in the test environment.
Greptile SummaryThis PR fixes a deterministic CI failure in the
Confidence Score: 5/5Safe to merge — the change is a minimal, additive mock update that restores a broken test suite without touching production code or weakening any existing assertions. The change adds three lightweight stub subcomponents to an existing mock factory, exactly mirroring the pattern already in use for other antd components. No test assertions are removed or weakened, no production logic is touched, and the fix directly maps to the import introduced by the referenced prior PR. No files require special attention.
|
| Filename | Overview |
|---|---|
| ui/litellm-dashboard/src/components/organisms/create_key_button.test.tsx | Adds Typography mock (with .Text, .Paragraph, .Title subcomponents) to the antd vi.mock factory, fixing deterministic CI failures caused by the missing export after PR #27218 introduced Typography.Text/Paragraph usage in the component. |
Reviews (1): Last reviewed commit: "fix(ui-tests): add Typography to antd mo..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…tine-baabae fix(ui-tests): add Typography to antd mock in create_key_button test
Summary
All 15 tests in
ui/litellm-dashboard/src/components/organisms/create_key_button.test.tsxwere failing deterministically in CI with:PR #27218 switched the key-type dropdown labels in
create_key_button.tsxto useTypography.Text/Typography.Paragraphfromantd, but the localvi.mock("antd", ...)in the sibling test file does not exportTypography. AddingTypography(with.Text,.Paragraph,.Titlesubcomponents) to the mock restores the test suite.Test plan
npx vitest run src/components/organisms/create_key_button.test.tsxpasses locally — all 15 tests greenlitellm-dashboard-ui-testsjob passes on this branch