test: fix few e2e flakes (#21408)

* fix flakes

* update

* Update booking.e2e.ts

* update

* Update booking.e2e.ts

* Update booking.e2e.ts
This commit is contained in:
Anik Dhabal Babu authored and GitHub committed 2025-05-23 12:40:27 +05:30
1 parent e21dbb704e
commit a839630ca3
3 files changed
+10 -4

No files matched your search

@@ -431,9 +431,11 @@ test.describe("Bookings", () => {
// Cancel the booking
await page.goto(`/booking/${bookingUid}`);
await page.waitForLoadState("networkidle");
await page.getByTestId("cancel").click();
await page.getByTestId("confirm_cancel").click();
await page.waitForResponse((response) => response.url().includes("/api/cancel"));
await submitAndWaitForResponse(page, "/api/cancel", {
action: () => page.locator('[data-testid="confirm_cancel"]').click(),
});
// Logout and go back to booking page
await page.goto("/auth/logout");