From a55a2bae7e72afed9b94bd2c7d7ca9a27d7aec62 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 24 Apr 2026 15:08:37 +0000 Subject: [PATCH] chore(ui): repair failing vitest tests after shadcn migration (batch B) Co-authored-by: yuneng-jiang --- .../PaginatedKeyAliasSelect.test.tsx | 83 +++++++++----- .../PaginatedModelSelect.test.tsx | 106 ++++++++++++------ 2 files changed, 121 insertions(+), 68 deletions(-) diff --git a/ui/litellm-dashboard/src/components/KeyAliasSelect/PaginatedKeyAliasSelect/PaginatedKeyAliasSelect.test.tsx b/ui/litellm-dashboard/src/components/KeyAliasSelect/PaginatedKeyAliasSelect/PaginatedKeyAliasSelect.test.tsx index 79a002cc5a8..171b70223d7 100644 --- a/ui/litellm-dashboard/src/components/KeyAliasSelect/PaginatedKeyAliasSelect/PaginatedKeyAliasSelect.test.tsx +++ b/ui/litellm-dashboard/src/components/KeyAliasSelect/PaginatedKeyAliasSelect/PaginatedKeyAliasSelect.test.tsx @@ -1,4 +1,4 @@ -import { screen, waitFor } from "@testing-library/react"; +import { screen, waitFor, within } from "@testing-library/react"; import userEvent from "@testing-library/user-event"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { renderWithProviders } from "../../../../tests/test-utils"; @@ -40,6 +40,19 @@ const mockEmptyPages = { pages: [{ aliases: [], total_count: 0, current_page: 1, total_pages: 1, size: 50 }], }; +// The popover renders option rows as plain