From 0d01d3246ab263b47d6d65115efe428e71defb96 Mon Sep 17 00:00:00 2001 From: Rob Jackson Date: Sat, 10 Jun 2023 04:47:50 +0100 Subject: [PATCH] test: Add E2E tests for seated attendee rescheduling or cancelling bookings (#9422) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add test for attendees rescheduling bookings * Add tests for rescheduling seated bookings (first attendee) * Fix tests not skipping disabled times on new booker UI * Add tests for rescheduling seated bookings (all attendees) * Remove duplicate tests (my mistake) * Add explicit test ids for cancel inputs * Add E2E tests for seated attendees cancelling their bookings * Update E2E tests for a seated attendee rescheduling their booking * Update tests to remove dependence on localised text * Updated seated E2E tests to remove testing of unused URL --------- Co-authored-by: Efraín Rochín --- .../web/components/booking/AvailableTimes.tsx | 3 +- apps/web/components/booking/CancelBooking.tsx | 3 +- apps/web/playwright/booking-pages.e2e.ts | 9 +- apps/web/playwright/booking-seats.e2e.ts | 119 +++++++++++++++--- .../playwright/dynamic-booking-pages.e2e.ts | 9 +- apps/web/playwright/fixtures/bookings.ts | 7 +- apps/web/playwright/fixtures/users.ts | 1 + apps/web/playwright/lib/testUtils.ts | 4 +- apps/web/playwright/reschedule.e2e.ts | 19 +++ .../bookings/components/AvailableTimes.tsx | 1 + .../bookings/lib/getCalEventResponses.ts | 6 + 11 files changed, 151 insertions(+), 30 deletions(-) diff --git a/apps/web/components/booking/AvailableTimes.tsx b/apps/web/components/booking/AvailableTimes.tsx index 943f04eb6f..a86363e840 100644 --- a/apps/web/components/booking/AvailableTimes.tsx +++ b/apps/web/components/booking/AvailableTimes.tsx @@ -161,7 +161,8 @@ const AvailableTimes: FC = ({ brand === "#fff" || brand === "#ffffff" ? "" : "" )} onClick={() => reserveSlot(slot)} - data-testid="time"> + data-testid="time" + data-disabled="false"> {dayjs(slot.time).tz(timeZone()).format(timeFormat)} {!!seatsPerTimeSlot && (