diff --git a/frontend/e2e/booking.spec.ts b/frontend/e2e/booking.spec.ts index 58d697c..cf2ffc4 100644 --- a/frontend/e2e/booking.spec.ts +++ b/frontend/e2e/booking.spec.ts @@ -271,7 +271,10 @@ test.describe("Booking Page - With Availability", () => { // Book it await page.getByRole("button", { name: "Book Appointment" }).click(); - // Wait for success + // Wait for booking form to disappear (indicates booking completed) + await expect(page.getByRole("button", { name: "Book Appointment" })).not.toBeVisible({ timeout: 10000 }); + + // Wait for success message await expect(page.getByText(/Appointment booked/)).toBeVisible(); // Should have one less slot now