fix: and enable dynamic booking test (#10642)
* fix and enable dynamic booking test * remove page pause --------- Co-authored-by: Alex van Andel <me@alexvanandel.com>
This commit is contained in:
parent
afe180a0ec
commit
4d5697f5a5
|
@ -9,10 +9,7 @@ import {
|
||||||
|
|
||||||
test.afterEach(({ users }) => users.deleteAll());
|
test.afterEach(({ users }) => users.deleteAll());
|
||||||
|
|
||||||
// Due to some reason for Dynamic booking cancellation, daily video api_key is not set which causes cancellation to fail.
|
test("dynamic booking", async ({ page, users }) => {
|
||||||
// This test is skipped until the issue is resolved in GH actions.
|
|
||||||
// eslint-disable-next-line playwright/no-skipped-test
|
|
||||||
test.skip("dynamic booking", async ({ page, users }) => {
|
|
||||||
const pro = await users.create();
|
const pro = await users.create();
|
||||||
await pro.apiLogin();
|
await pro.apiLogin();
|
||||||
|
|
||||||
|
@ -20,10 +17,13 @@ test.skip("dynamic booking", async ({ page, users }) => {
|
||||||
await page.goto(`/${pro.username}+${free.username}`);
|
await page.goto(`/${pro.username}+${free.username}`);
|
||||||
|
|
||||||
await test.step("book an event first day in next month", async () => {
|
await test.step("book an event first day in next month", async () => {
|
||||||
// Click first event type
|
|
||||||
await page.click('[data-testid="event-type-link"]');
|
|
||||||
await selectFirstAvailableTimeSlotNextMonth(page);
|
await selectFirstAvailableTimeSlotNextMonth(page);
|
||||||
|
|
||||||
|
// Fill what is this meeting about? title
|
||||||
|
await page.locator('[name="title"]').fill("Test meeting");
|
||||||
|
|
||||||
await bookTimeSlot(page);
|
await bookTimeSlot(page);
|
||||||
|
|
||||||
await expect(page.locator("[data-testid=success-page]")).toBeVisible();
|
await expect(page.locator("[data-testid=success-page]")).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -37,7 +37,8 @@ test.skip("dynamic booking", async ({ page, users }) => {
|
||||||
return !!bookingId;
|
return !!bookingId;
|
||||||
});
|
});
|
||||||
await selectSecondAvailableTimeSlotNextMonth(page);
|
await selectSecondAvailableTimeSlotNextMonth(page);
|
||||||
// --- fill form
|
|
||||||
|
// No need to fill fields since they should be already filled
|
||||||
await page.locator('[data-testid="confirm-reschedule-button"]').click();
|
await page.locator('[data-testid="confirm-reschedule-button"]').click();
|
||||||
await page.waitForURL((url) => {
|
await page.waitForURL((url) => {
|
||||||
return url.pathname.startsWith("/booking");
|
return url.pathname.startsWith("/booking");
|
||||||
|
|
|
@ -119,8 +119,8 @@ export const getBookingForReschedule = async (uid: string) => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
// If no booking is found via the uid, it's probably a booking seat,
|
// If no booking is found via the uid, it's probably a booking seat
|
||||||
// which we query next.
|
// that its being rescheduled, which we query next.
|
||||||
let attendeeEmail: string | null = null;
|
let attendeeEmail: string | null = null;
|
||||||
if (!theBooking) {
|
if (!theBooking) {
|
||||||
const bookingSeat = await prisma.bookingSeat.findFirst({
|
const bookingSeat = await prisma.bookingSeat.findFirst({
|
||||||
|
|
Loading…
Reference in New Issue
Block a user