FIx failing tests

teste2e-checkboxGroupQuestion
gitstart-calcom 2023-10-30 20:44:14 +00:00
parent b0ab26e6fd
commit 379e251f38
2 changed files with 7 additions and 6 deletions

View File

@ -73,9 +73,9 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", ()
await bookingPage.assertBookingCanceled(eventTypePage); await bookingPage.assertBookingCanceled(eventTypePage);
}); });
test("Checkbox Group and checkbox group not required", async ({ bookingPage }) => { test("Checkbox Group and Phone not required", async ({ bookingPage }) => {
await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true);
await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", false); await bookingPage.addQuestion("phone", "phone-test", "phone test", false, "phone test");
await bookingPage.updateEventType(); await bookingPage.updateEventType();
const eventTypePage = await bookingPage.previewEventType(); const eventTypePage = await bookingPage.previewEventType();
await bookingPage.selectTimeSlot(eventTypePage); await bookingPage.selectTimeSlot(eventTypePage);
@ -83,8 +83,8 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", ()
eventTypePage, eventTypePage,
placeholderText: "Please share anything that will help prepare for our meeting.", placeholderText: "Please share anything that will help prepare for our meeting.",
question: "checkbox", question: "checkbox",
fillText: "Test Checkbox Group question and checkbox group question (only checkbox required)", fillText: "Test Checkbox Group question and Phone question (only checkbox required)",
secondQuestion: "checkbox", secondQuestion: "phone",
options: { ...bookingOptions, isRequired: false }, options: { ...bookingOptions, isRequired: false },
}); });
await bookingPage.rescheduleBooking(eventTypePage); await bookingPage.rescheduleBooking(eventTypePage);
@ -114,6 +114,7 @@ test.describe("Booking With Checkbox Group Question and Each Other Question", ()
await bookingPage.cancelBooking(eventTypePage); await bookingPage.cancelBooking(eventTypePage);
await bookingPage.assertBookingCanceled(eventTypePage); await bookingPage.assertBookingCanceled(eventTypePage);
}); });
test("Checkbox Group and checkbox not required", async ({ bookingPage }) => { test("Checkbox Group and checkbox not required", async ({ bookingPage }) => {
await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true); await bookingPage.addQuestion("checkbox", "checkbox-test", "checkbox test", true);
await bookingPage.addQuestion("boolean", "boolean-test", "boolean test", false); await bookingPage.addQuestion("boolean", "boolean-test", "boolean test", false);

View File

@ -194,7 +194,7 @@ export function createBookingPageFixture(page: Page) {
await eventTypePage.getByPlaceholder(reschedulePlaceholderText).click(); await eventTypePage.getByPlaceholder(reschedulePlaceholderText).click();
await eventTypePage.getByPlaceholder(reschedulePlaceholderText).fill("Test reschedule"); await eventTypePage.getByPlaceholder(reschedulePlaceholderText).fill("Test reschedule");
await eventTypePage.getByTestId("confirm-reschedule-button").click(); await eventTypePage.getByTestId("confirm-reschedule-button").click();
await eventTypePage.waitForTimeout(100); await eventTypePage.waitForTimeout(400);
if ( if (
await eventTypePage.getByRole("heading", { name: "Could not reschedule the meeting." }).isVisible() await eventTypePage.getByRole("heading", { name: "Could not reschedule the meeting." }).isVisible()
) { ) {
@ -256,7 +256,7 @@ export function createBookingPageFixture(page: Page) {
options.isRequired && (await fillQuestion(eventTypePage, secondQuestion, customLocators)); options.isRequired && (await fillQuestion(eventTypePage, secondQuestion, customLocators));
await eventTypePage.getByTestId(confirmButton).click(); await eventTypePage.getByTestId(confirmButton).click();
await eventTypePage.waitForTimeout(100); await eventTypePage.waitForTimeout(400);
if (await eventTypePage.getByRole("heading", { name: "Could not book the meeting." }).isVisible()) { if (await eventTypePage.getByRole("heading", { name: "Could not book the meeting." }).isVisible()) {
await eventTypePage.getByTestId("back").click(); await eventTypePage.getByTestId("back").click();
await eventTypePage.getByTestId("time").last().click(); await eventTypePage.getByTestId("time").last().click();