Skip to content

Commit 30c1b97

Browse files
committed
Merge branch 'litellm_internal_staging' into litellm_shadcn_settings_0814
2 parents 7e375ed + b77923f commit 30c1b97

88 files changed

Lines changed: 4728 additions & 4420 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/e2e/ui/tests/internal-user/internalUser.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,11 @@ test.describe("Internal User", () => {
1919

2020
// Open the team dropdown — seeded internal user is a member of
2121
// e2e-team-crud and e2e-team-org, so we expect at least the CRUD alias.
22-
const teamSelect = page.locator(".ant-select", { hasText: "Search or select a team" });
22+
const teamSelect = page.getByTestId("team-dropdown").getByRole("combobox");
2323
await teamSelect.click();
2424
await page.keyboard.type(E2E_TEAM_CRUD_ALIAS);
25-
await expect(page.locator(".ant-select-dropdown:visible").getByText(E2E_TEAM_CRUD_ALIAS).first()).toBeVisible({
26-
timeout: 5_000,
27-
});
25+
const dropdown = page.locator('[data-slot="combobox-content"]:visible');
26+
await expect(dropdown.getByText(E2E_TEAM_CRUD_ALIAS).first()).toBeVisible({ timeout: 5_000 });
2827
});
2928

3029
test("Team info page omits the Settings tab for non-admin members", async ({ page }) => {

tests/e2e/ui/tests/internal-user/internalUserNoTeam.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ test.describe("Internal User with no team memberships", () => {
2727
await page.getByRole("button", { name: /Create New Key/i }).click();
2828
await expect(page.getByText("Key Ownership")).toBeVisible({ timeout: 10_000 });
2929

30-
const teamSelect = page.locator(".ant-select", { hasText: "Search or select a team" });
30+
const teamSelect = page.getByTestId("team-dropdown").getByRole("combobox");
3131
await teamSelect.click();
3232

33-
const dropdown = page.locator(".ant-select-dropdown:visible").first();
33+
const dropdown = page.locator('[data-slot="combobox-content"]:visible').first();
3434
await expect(dropdown).toBeVisible({ timeout: 5_000 });
3535

3636
// Wait for the settled-empty state, not a transient one. The dropdown shows
37-
// a spinner while teams load and only swaps in "No teams found" once the
38-
// request resolves with nothing (team_dropdown.tsx renders the spinner when
39-
// isLoading and this copy otherwise). Asserting on it means a regression
40-
// where teams DO load for this user fails here instead of racing a one-shot
41-
// count() against an in-flight request.
37+
// "Loading teams…" while teams load and only swaps in "No teams found" once
38+
// the request resolves with nothing (team_dropdown.tsx passes both copies to
39+
// PaginatedSearchSelect). Asserting on it means a regression where teams DO
40+
// load for this user fails here instead of racing a one-shot count() against
41+
// an in-flight request.
4242
await expect(dropdown.getByText("No teams found")).toBeVisible({ timeout: 10_000 });
4343
await expect(dropdown.getByRole("option")).toHaveCount(0);
4444
});

tests/e2e/ui/tests/internal-user/internalUserWithTeams.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ test.describe("Internal User with team memberships", () => {
1818
await page.getByRole("button", { name: /Create New Key/i }).click();
1919
await expect(page.getByText("Key Ownership")).toBeVisible({ timeout: 10_000 });
2020

21-
const teamSelect = page.locator(".ant-select", { hasText: "Search or select a team" });
21+
const teamSelect = page.getByTestId("team-dropdown").getByRole("combobox");
2222
await teamSelect.click();
2323

24-
const dropdown = page.locator(".ant-select-dropdown:visible").first();
24+
const dropdown = page.locator('[data-slot="combobox-content"]:visible').first();
2525
await expect(dropdown).toBeVisible({ timeout: 5_000 });
2626

2727
// Both seeded memberships render, and nothing else does — proving the

tests/e2e/ui/tests/modelsPage/addModel.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,11 @@ test.describe("Add Model", () => {
328328
const teamByokRow = page.locator(".ant-form-item", { hasText: "Team-BYOK Model" });
329329
await teamByokRow.getByRole("switch").click();
330330

331-
// TeamDropdown's options carry custom markup and no role="option", so match by text.
332-
const teamDropdown = page.getByTestId("team-dropdown");
331+
// TeamDropdown options show the alias above the team id, so match on the id line by text.
332+
const teamDropdown = page.getByTestId("team-dropdown").getByRole("combobox");
333333
await expect(teamDropdown).toBeVisible({ timeout: 5_000 });
334334
await teamDropdown.click();
335-
const teamOption = page.locator(".ant-select-dropdown:visible").getByText(E2E_TEAM_CRUD_ID).first();
335+
const teamOption = page.locator('[data-slot="combobox-content"]:visible').getByText(E2E_TEAM_CRUD_ID).first();
336336
await expect(teamOption).toBeVisible({ timeout: 5_000 });
337337
await teamOption.click();
338338

tests/e2e/ui/tests/proxy-admin/keys.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ test.describe("Proxy Admin - Keys", () => {
4040
const keyName = `e2e-admin-key-${Date.now()}`;
4141
await page.getByTestId("base-input").fill(keyName);
4242

43-
// Select team — the team dropdown has placeholder "Search or select a team"
44-
const teamSelect = page.locator(".ant-select", { hasText: "Search or select a team" });
43+
// Select team
44+
const teamSelect = page.getByTestId("team-dropdown").getByRole("combobox");
4545
await teamSelect.click();
4646
await page.keyboard.type(E2E_TEAM_CRUD_ALIAS);
47-
await page.locator(".ant-select-dropdown:visible").getByText(E2E_TEAM_CRUD_ALIAS).first().click();
47+
await page.locator('[data-slot="combobox-content"]:visible').getByText(E2E_TEAM_CRUD_ALIAS).first().click();
4848

4949
// Select models
5050
await page.locator(".ant-select-selection-overflow").click();
@@ -157,7 +157,7 @@ test.describe("Proxy Admin - Keys", () => {
157157
await page.getByRole("button", { name: "More key actions" }).click();
158158
await page.getByRole("menuitem", { name: "Delete Key" }).click();
159159

160-
const modal = page.locator(".ant-modal:visible");
160+
const modal = page.getByRole("dialog", { name: "Delete Key" });
161161
await expect(modal).toBeVisible({ timeout: 5_000 });
162162
await modal.locator("input").fill(E2E_DELETE_KEY_ALIAS);
163163

tests/e2e/ui/tests/proxy-admin/teams.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ test.describe("Proxy Admin - Teams", () => {
129129
await teamRow.locator('[data-testid^="team-actions-"]').click();
130130
await page.getByTestId("team-action-delete").click();
131131

132-
const modal = page.locator(".ant-modal:visible");
132+
const modal = page.getByRole("dialog", { name: "Delete Team?" });
133133
await expect(modal).toBeVisible({ timeout: 5_000 });
134134
await modal.locator("input").fill(E2E_TEAM_DELETE_ALIAS);
135135
await modal.getByRole("button", { name: /Force Delete|Delete/i }).click();

tests/e2e/ui/tests/team-admin/teamAdmin.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ test.describe("Team Admin", () => {
105105
await expect(row).toBeVisible({ timeout: 10_000 });
106106
await row.getByTestId("delete-member").click();
107107

108-
const modal = page.locator(".ant-modal:visible");
108+
const modal = page.getByRole("dialog", { name: "Delete Team Member" });
109109
await expect(modal).toBeVisible({ timeout: 5_000 });
110110

111111
const remove = await captureRequestBody(page, { method: "POST", urlIncludes: "/team/member_delete" }, async () => {
@@ -139,10 +139,10 @@ test.describe("Team Admin", () => {
139139
await page.getByTestId("base-input").fill(keyName);
140140

141141
// Team selector — same locator pattern as the proxy-admin keys test.
142-
const teamSelect = page.locator(".ant-select", { hasText: "Search or select a team" });
142+
const teamSelect = page.getByTestId("team-dropdown").getByRole("combobox");
143143
await teamSelect.click();
144144
await page.keyboard.type(E2E_TEAM_CRUD_ALIAS);
145-
await page.locator(".ant-select-dropdown:visible").getByText(E2E_TEAM_CRUD_ALIAS).first().click();
145+
await page.locator('[data-slot="combobox-content"]:visible').getByText(E2E_TEAM_CRUD_ALIAS).first().click();
146146

147147
// Models — pick "All Team Models"
148148
await page.locator(".ant-select-selection-overflow").click();

0 commit comments

Comments
 (0)