Revert "test: fix few e2e flakes (#21408)" (#21501)

This commit is contained in:
Omar López
2025-05-23 15:30:33 -07:00
committed by GitHub
parent ef1844557f
commit 2a786b4652
3 changed files with 4 additions and 10 deletions
+1 -5
View File
@@ -461,14 +461,10 @@ test.describe("Bookings", () => {
await addFilter(page, "userId");
await openFilter(page, "userId");
const bookingsGetResponse2 = page.waitForResponse((response) =>
/\/api\/trpc\/bookings\/get.*/.test(response.url())
);
await page
.locator(`[data-testid="select-filter-options-userId"] [role="option"]:has-text("${anotherUser}")`)
.click();
await bookingsGetResponse2;
await page.waitForResponse((response) => /\/api\/trpc\/bookings\/get.*/.test(response.url()));
await expect(page.locator('[data-testid="booking-item"]')).toHaveCount(0);
});
+1 -1
View File
@@ -1044,7 +1044,7 @@ export async function login(
const signInLocator = loginLocator.locator('[type="submit"]');
//login
await page.goto("/auth/login");
await page.goto("/");
await page.waitForSelector("text=Welcome back");
await emailLocator.fill(user.email ?? `${user.username}@example.com`);
@@ -431,11 +431,9 @@ test.describe("Bookings", () => {
// Cancel the booking
await page.goto(`/booking/${bookingUid}`);
await page.waitForLoadState("networkidle");
await page.getByTestId("cancel").click();
await submitAndWaitForResponse(page, "/api/cancel", {
action: () => page.locator('[data-testid="confirm_cancel"]').click(),
});
await page.getByTestId("confirm_cancel").click();
await page.waitForResponse((response) => response.url().includes("/api/cancel"));
// Logout and go back to booking page
await page.goto("/auth/logout");