Requested changes

teste2e-multiSelectQuestion
gitstart-calcom 2023-10-24 15:00:56 +00:00
parent 6be86b2f6c
commit f78fe1f55c
1 changed files with 469 additions and 412 deletions

View File

@ -12,7 +12,7 @@ test.describe("Booking With Multi Select Question and Each Other Question", () =
});
test.describe("Booking With Multi Select Question and Address Question", () => {
test("Multi Select and Address required", async ({ bookingPage }) => {
test("Multi Select required and Address required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -32,7 +32,10 @@ test.describe("Booking With Multi Select 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("Multi Select and Address not required", async ({ bookingPage }) => {
@ -55,12 +58,15 @@ test.describe("Booking With Multi Select 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 Multi Select Question and checkbox group Question", () => {
const bookingOptions = { hasPlaceholder: false, isRequired: true };
test("Multi Select and checkbox group required", async ({ bookingPage }) => {
test("Multi Select required and checkbox group required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -80,7 +86,10 @@ test.describe("Booking With Multi Select Question and Each Other Question", () =
secondQuestion: "checkbox",
options: bookingOptions,
});
await bookingPage.cancelAndRescheduleBooking(eventTypePage);
await bookingPage.rescheduleBooking(eventTypePage);
await bookingPage.assertBookingRescheduled(eventTypePage);
await bookingPage.cancelBooking(eventTypePage);
await bookingPage.assertBookingCanceled(eventTypePage);
});
test("Multi Select and checkbox group not required", async ({ bookingPage }) => {
@ -103,12 +112,15 @@ test.describe("Booking With Multi Select 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 Multi Select Question and checkbox Question", () => {
test("Multi Select and checkbox required", async ({ bookingPage }) => {
test("Multi Select required and checkbox required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -128,7 +140,10 @@ test.describe("Booking With Multi Select 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("Multi Select and checkbox not required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
@ -150,12 +165,15 @@ test.describe("Booking With Multi Select 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 Multi Select Question and Long text Question", () => {
test("Multi Select and Long text required", async ({ bookingPage }) => {
test("Multi Select required and Long text required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -175,7 +193,10 @@ test.describe("Booking With Multi Select 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("Multi Select and Long text not required", async ({ bookingPage }) => {
@ -198,13 +219,15 @@ test.describe("Booking With Multi Select 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 Multi Select Question and Multi email Question", () => {
const bookingOptions = { hasPlaceholder: true, isRequired: true };
test("Multi Select and Multi email required", async ({ bookingPage }) => {
test("Multi Select required and Multi email required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -230,7 +253,10 @@ test.describe("Booking With Multi Select 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("Multi Select and Multi email not required", async ({ bookingPage }) => {
@ -259,12 +285,15 @@ test.describe("Booking With Multi Select 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 Multi Select Question and Phone Question", () => {
test("Multi Select and multiselect text required", async ({ bookingPage }) => {
test("Multi Select required and multiselect text required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -284,7 +313,10 @@ test.describe("Booking With Multi Select 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("Multi Select and multiselect text not required", async ({ bookingPage }) => {
@ -307,12 +339,15 @@ test.describe("Booking With Multi Select 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 Multi Select Question and Number Question", () => {
test("Multi Select and Number required", async ({ bookingPage }) => {
test("Multi Select required and Number required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -332,7 +367,10 @@ test.describe("Booking With Multi Select 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("Multi Select and Number not required", async ({ bookingPage }) => {
@ -355,12 +393,15 @@ test.describe("Booking With Multi Select 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 Multi Select Question and Radio group Question", () => {
test("Multi Select and Radio group required", async ({ bookingPage }) => {
test("Multi Select required and Radio group required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -380,7 +421,10 @@ test.describe("Booking With Multi Select 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("Multi Select and Radio group not required", async ({ bookingPage }) => {
@ -403,12 +447,15 @@ test.describe("Booking With Multi Select 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 Multi Select Question and select Question", () => {
test("Multi Select and select required", async ({ bookingPage }) => {
test("Multi Select required and select required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -428,7 +475,10 @@ test.describe("Booking With Multi Select 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("Multi Select and select not required", async ({ bookingPage }) => {
@ -451,13 +501,15 @@ test.describe("Booking With Multi Select 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 Multi Select Question and Short text question", () => {
const bookingOptions = { hasPlaceholder: true, isRequired: true };
test("Multi Select and Short text required", async ({ bookingPage }) => {
test("Multi Select required and Short text required", async ({ bookingPage }) => {
await bookingPage.addQuestion(
"multiselect",
"multiselect-test",
@ -477,7 +529,10 @@ test.describe("Booking With Multi Select 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("Multi Select and Short text not required", async ({ bookingPage }) => {
@ -500,8 +555,10 @@ test.describe("Booking With Multi Select 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);
});
});
});