mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-08 22:21:35 +00:00
test(ui): stub the Virtual Keys dashboard in the expired-token page test
This commit is contained in:
parent
da705c9475
commit
8bfaaffba5
1 changed files with 3 additions and 4 deletions
|
|
@ -105,7 +105,7 @@ vi.mock("@/utils/returnUrlUtils", async (importOriginal) => {
|
|||
|
||||
// Super-light stubs for all heavy components so rendering doesn't explode
|
||||
vi.mock("@/components/navbar", () => ({ default: stub("navbar") }));
|
||||
vi.mock("@/components/user_dashboard", () => ({ default: stub("user-dashboard") }));
|
||||
vi.mock("@/app/(dashboard)/api-keys/ApiKeysDashboard", () => ({ default: stub("api-keys-dashboard") }));
|
||||
vi.mock("@/components/templates/model_dashboard", () => ({ default: stub("model-dashboard") }));
|
||||
vi.mock("@/components/teams", () => ({ default: stub("teams") }));
|
||||
vi.mock("@/app/(dashboard)/organizations/_components/organizations", () => ({
|
||||
|
|
@ -135,7 +135,6 @@ vi.mock("@/app/(dashboard)/tag-management/_components", () => ({ default: stub("
|
|||
vi.mock("@/app/(dashboard)/vector-stores/_components", () => ({ default: stub("vector-stores") }));
|
||||
vi.mock("@/components/ui_theme_settings", () => ({ default: stub("ui-theme-settings") }));
|
||||
vi.mock("@/components/organisms/create_key_button", () => ({ fetchUserModels: vi.fn() }));
|
||||
vi.mock("@/components/common_components/fetch_teams", () => ({ fetchTeams: vi.fn() }));
|
||||
vi.mock("@/components/ui/ui-loading-spinner", () => ({
|
||||
UiLoadingSpinner: stub("spinner"),
|
||||
}));
|
||||
|
|
@ -270,9 +269,9 @@ describe("CreateKeyPage auth behavior", () => {
|
|||
expect(window.location.replace).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
// And the default page content appears (UserDashboard stub; chrome now lives in the layout)
|
||||
// And the default page content appears (ApiKeysDashboard stub; chrome now lives in the layout)
|
||||
await waitFor(() => {
|
||||
expect(screen.getByTestId("user-dashboard")).toBeInTheDocument();
|
||||
expect(screen.getByTestId("api-keys-dashboard")).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue