diff --git a/apps/web/playwright/booking/checkboxGroupQuestion.e2e.ts b/apps/web/playwright/booking/checkboxGroupQuestion.e2e.ts index bd9cb7937f..eda08dacd3 100644 --- a/apps/web/playwright/booking/checkboxGroupQuestion.e2e.ts +++ b/apps/web/playwright/booking/checkboxGroupQuestion.e2e.ts @@ -12,7 +12,7 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () }); test.describe("Booking With Checkbox Group Question and Address Question", () => { - test("Checkbox Group and Address required", async ({ bookingPage }) => { + test("Checkbox Group required and Address required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("address", "address-test", "address test", true, "address test"); await bookingPage.updateEventType(); @@ -26,7 +26,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "address", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test("Checkbox Group and Address not required", async ({ bookingPage }) => { @@ -43,12 +46,14 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "address", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test.describe("Booking With Checkbox Group Question and checkbox group Question", () => { - const bookingOptions = { hasPlaceholder: false, isRequired: true }; - test("Checkbox Group and Phone required", async ({ bookingPage }) => { + test("Checkbox Group required and Phone required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("phone", "phone-test", "phone test", true, "phone test"); await bookingPage.updateEventType(); @@ -62,7 +67,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "phone", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test("Checkbox Group and checkbox group not required", async ({ bookingPage }) => { @@ -79,12 +87,15 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "checkbox", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); }); test.describe("Booking With Checkbox Group Question and checkbox Question", () => { - test("Checkbox Group and checkbox required", async ({ bookingPage }) => { + test("Checkbox Group required and checkbox required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("boolean", "boolean-test", "boolean test", true); await bookingPage.updateEventType(); @@ -98,7 +109,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "boolean", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test("Checkbox Group and checkbox not required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); @@ -114,12 +128,15 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "boolean", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); }); test.describe("Booking With Checkbox Group Question and Long text Question", () => { - test("Checkbox Group and Long text required", async ({ bookingPage }) => { + test("Checkbox Group required and Long text required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("textarea", "textarea-test", "textarea test", true, "textarea test"); await bookingPage.updateEventType(); @@ -133,7 +150,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "textarea", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test("Checkbox Group and Long text not required", async ({ bookingPage }) => { @@ -150,13 +170,15 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "textarea", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); }); test.describe("Booking With Checkbox Group Question and Multi email Question", () => { - const bookingOptions = { hasPlaceholder: true, isRequired: true }; - test("Checkbox Group and Multi email required", async ({ bookingPage }) => { + test("Checkbox Group required and Multi email required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion( "multiemail", @@ -176,7 +198,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "multiemail", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test("Checkbox Group and Multi email not required", async ({ bookingPage }) => { @@ -199,12 +224,15 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "multiemail", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); }); test.describe("Booking With Checkbox Group Question and multiselect Question", () => { - test("Checkbox Group and multiselect text required", async ({ bookingPage }) => { + test("Checkbox Group required and multiselect text required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("multiselect", "multiselect-test", "multiselect test", true); await bookingPage.updateEventType(); @@ -218,7 +246,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "multiselect", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test("Checkbox Group and multiselect text not required", async ({ bookingPage }) => { @@ -235,12 +266,15 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "multiselect", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); }); test.describe("Booking With Checkbox Group Question and Number Question", () => { - test("Checkbox Group and Number required", async ({ bookingPage }) => { + test("Checkbox Group required and Number required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("number", "number-test", "number test", true, "number test"); await bookingPage.updateEventType(); @@ -254,7 +288,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "number", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test("Checkbox Group and Number not required", async ({ bookingPage }) => { @@ -271,12 +308,15 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "number", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); }); test.describe("Booking With Checkbox Group Question and Radio group Question", () => { - test("Checkbox Group and Radio group required", async ({ bookingPage }) => { + test("Checkbox Group required and Radio group required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("radio", "radio-test", "radio test", true); await bookingPage.updateEventType(); @@ -290,7 +330,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "radio", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test("Checkbox Group and Radio group not required", async ({ bookingPage }) => { @@ -307,12 +350,15 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "radio", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); }); test.describe("Booking With Checkbox Group Question and select Question", () => { - test("Checkbox Group and select required", async ({ bookingPage }) => { + test("Checkbox Group required and select required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("select", "select-test", "select test", true, "select test"); await bookingPage.updateEventType(); @@ -326,7 +372,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "select", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); test("Checkbox Group and select not required", async ({ bookingPage }) => { @@ -343,13 +392,15 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "select", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); }); test.describe("Booking With Checkbox Group Question and Short text question", () => { - const bookingOptions = { hasPlaceholder: true, isRequired: true }; - test("Checkbox Group and Short text required", async ({ bookingPage }) => { + test("Checkbox Group required and Short Text required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("text", "text-test", "text test", true, "text test"); await bookingPage.updateEventType(); @@ -363,10 +414,13 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "text", options: bookingOptions, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); - test("Checkbox Group and Short text not required", async ({ bookingPage }) => { + test("Checkbox Group and Short Text not required", async ({ bookingPage }) => { await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("text", "text-test", "text test", false, "text test"); await bookingPage.updateEventType(); @@ -380,7 +434,10 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", () secondQuestion: "text", options: { ...bookingOptions, isRequired: false }, }); - await bookingPage.cancelAndRescheduleBooking(eventTypePage); + await bookingPage.rescheduleBooking(eventTypePage); + await bookingPage.assertBookingRescheduled(eventTypePage); + await bookingPage.cancelBooking(eventTypePage); + await bookingPage.assertBookingCanceled(eventTypePage); }); }); });