feat: skip confirm step in booker (#18773)
* feat: skip confirm step * better naming * disable on loading * feat: added cloudflare turnstile captcha to booker * Update Booker.tsx * Update AvailableTimeSlots.tsx * made optional to fix type errors * Update Booker.tsx * Update getBookingResponsesSchema.ts * Update Booker.tsx * fixed failing tests * added tests * fix: fixed failing embed tests
This commit is contained in:
1 parent
ac8b4a2861
commit
be1b9d1a79
10 files changed
+251
-114
No files matched your search
@@ -401,6 +401,23 @@ test.describe("prefill", () => {
|
||||
await expect(page.locator('[name="email"]')).toHaveValue(testEmail);
|
||||
});
|
||||
});
|
||||
|
||||
test("skip confirm step if all fields are prefilled from query params", async ({ page }) => {
|
||||
await page.goto("/pro/30min");
|
||||
const url = new URL(page.url());
|
||||
url.searchParams.set("name", testName);
|
||||
url.searchParams.set("email", testEmail);
|
||||
url.searchParams.set("guests", "[email protected]");
|
||||
url.searchParams.set("guests", "[email protected]");
|
||||
url.searchParams.set("notes", "This is an additional note");
|
||||
await page.goto(url.toString());
|
||||
await selectFirstAvailableTimeSlotNextMonth(page);
|
||||
|
||||
await expect(page.locator('[data-testid="skip-confirm-book-button"]')).toBeVisible();
|
||||
await page.click('[data-testid="skip-confirm-book-button"]');
|
||||
|
||||
await expect(page.locator("[data-testid=success-page]")).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
test.describe("Booking on different layouts", () => {
|
||||
|
||||
@@ -172,7 +172,6 @@ test.describe("Manage Booking Questions", () => {
|
||||
prefillUrl.searchParams.append("email", "[email protected]");
|
||||
prefillUrl.searchParams.append("guests", "[email protected]");
|
||||
prefillUrl.searchParams.append("guests", "[email protected]");
|
||||
prefillUrl.searchParams.append("notes", "This is an additional note");
|
||||
await page.goto(prefillUrl.toString());
|
||||
await bookTimeSlot({ page, skipSubmission: true });
|
||||
await expectSystemFieldsToBeThereOnBookingPage({
|
||||
@@ -185,7 +184,6 @@ test.describe("Manage Booking Questions", () => {
|
||||
},
|
||||
email: "[email protected]",
|
||||
guests: ["[email protected]", "[email protected]"],
|
||||
notes: "This is an additional note",
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user