Merge pull request #41756 from BerriAI/litellm_/regression-analysis-deep-dive-dd13e8

test(e2e/ui): wait for the filtered budget list before clicking a row action
This commit is contained in:
yuneng-jiang 2026-09-17 22:40:20 -07:00 committed by GitHub
commit ea95631181
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4,6 +4,8 @@ import { Page } from "../../fixtures/pages";
import { navigateToPage, dismissFeedbackPopup } from "../../helpers/navigation";
import { masterKey } from "../../helpers/traffic";
const BUDGET_LIST_PATH = "/management/v1/budgets";
interface StoredBudget {
budget_id: string;
max_budget: number | null;
@ -30,7 +32,17 @@ async function createBudgetViaApi(page: PlaywrightPage, budget: Partial<StoredBu
}
async function searchForBudget(page: PlaywrightPage, budgetId: string): Promise<void> {
const searched = page.waitForResponse((response) => {
const url = new URL(response.url());
return (
response.request().method() === "GET" &&
url.pathname === BUDGET_LIST_PATH &&
url.searchParams.get("q") === budgetId
);
});
await page.getByPlaceholder("Search by budget ID").fill(budgetId);
const response = await searched;
expect(response.ok(), `GET ${BUDGET_LIST_PATH}?q=${budgetId} (${response.status()})`).toBe(true);
}
test.describe("Budgets", () => {