Compare commits
11 Commits
main
...
teste2e-op
Author | SHA1 | Date | |
---|---|---|---|
|
0f983d06ba | ||
|
00b7acea09 | ||
|
2dd58e5590 | ||
|
d4d2fdc6ba | ||
|
f51585d264 | ||
|
9407a679bb | ||
|
b9c6baa6bb | ||
|
79b222eb3d | ||
|
8912423094 | ||
|
13340af54d | ||
|
a3712e393e |
|
@ -0,0 +1,24 @@
|
||||||
|
import { loginUser } from "../fixtures/regularBookings";
|
||||||
|
import { test } from "../lib/fixtures";
|
||||||
|
|
||||||
|
test.describe("Check all advanced options in a regular event-type", () => {
|
||||||
|
test("Check advanced options in a regular event type", async ({ bookingPage, users }) => {
|
||||||
|
await loginUser(users);
|
||||||
|
await bookingPage.goToEventTypesPage();
|
||||||
|
|
||||||
|
await bookingPage.goToEventType("30 min");
|
||||||
|
await bookingPage.goToTab("event_advanced_tab_title");
|
||||||
|
|
||||||
|
await bookingPage.checkRequiresBookerEmailVerification();
|
||||||
|
await bookingPage.checkHideNotes();
|
||||||
|
await bookingPage.checkRedirectOnBooking();
|
||||||
|
await bookingPage.checkEnablePrivateUrl();
|
||||||
|
await bookingPage.toggleOfferSeats();
|
||||||
|
await bookingPage.checkLockTimezone();
|
||||||
|
await bookingPage.checkRequiresConfirmation();
|
||||||
|
await bookingPage.updateEventType();
|
||||||
|
await bookingPage.goToEventTypesPage();
|
||||||
|
|
||||||
|
await bookingPage.checkEventType();
|
||||||
|
});
|
||||||
|
});
|
|
@ -2,6 +2,7 @@ import { expect, type Page } from "@playwright/test";
|
||||||
|
|
||||||
import dayjs from "@calcom/dayjs";
|
import dayjs from "@calcom/dayjs";
|
||||||
|
|
||||||
|
import { localize } from "../lib/testUtils";
|
||||||
import type { createUsersFixture } from "./users";
|
import type { createUsersFixture } from "./users";
|
||||||
|
|
||||||
const reschedulePlaceholderText = "Let others know why you need to reschedule";
|
const reschedulePlaceholderText = "Let others know why you need to reschedule";
|
||||||
|
@ -196,6 +197,9 @@ export function createBookingPageFixture(page: Page) {
|
||||||
goToTab: async (tabName: string) => {
|
goToTab: async (tabName: string) => {
|
||||||
await page.getByTestId(`vertical-tab-${tabName}`).click();
|
await page.getByTestId(`vertical-tab-${tabName}`).click();
|
||||||
},
|
},
|
||||||
|
goToEventTypesPage: async () => {
|
||||||
|
await page.goto("/event-types");
|
||||||
|
},
|
||||||
addQuestion: async (
|
addQuestion: async (
|
||||||
questionType: string,
|
questionType: string,
|
||||||
identifier: string,
|
identifier: string,
|
||||||
|
@ -221,6 +225,7 @@ export function createBookingPageFixture(page: Page) {
|
||||||
},
|
},
|
||||||
updateEventType: async () => {
|
updateEventType: async () => {
|
||||||
await page.getByTestId("update-eventtype").click();
|
await page.getByTestId("update-eventtype").click();
|
||||||
|
await expect(page.getByRole("button", { name: "event type updated successfully" })).toBeVisible();
|
||||||
},
|
},
|
||||||
previewEventType: async () => {
|
previewEventType: async () => {
|
||||||
const eventtypePromise = page.waitForEvent("popup");
|
const eventtypePromise = page.waitForEvent("popup");
|
||||||
|
@ -356,5 +361,103 @@ export function createBookingPageFixture(page: Page) {
|
||||||
await scheduleSuccessfullyPage.waitFor({ state: "visible" });
|
await scheduleSuccessfullyPage.waitFor({ state: "visible" });
|
||||||
await expect(scheduleSuccessfullyPage).toBeVisible();
|
await expect(scheduleSuccessfullyPage).toBeVisible();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
checkRequiresConfirmation: async () => {
|
||||||
|
const requiresConfirmationText = (await localize("en"))("requires_confirmation");
|
||||||
|
|
||||||
|
const confirmationSwitch = page
|
||||||
|
.locator("fieldset")
|
||||||
|
.filter({
|
||||||
|
hasText: requiresConfirmationText,
|
||||||
|
})
|
||||||
|
.getByRole("switch");
|
||||||
|
await expect(confirmationSwitch).toBeVisible();
|
||||||
|
await confirmationSwitch.click();
|
||||||
|
},
|
||||||
|
|
||||||
|
checkRequiresBookerEmailVerification: async () => {
|
||||||
|
const emailSwitchLabel = (await localize("en"))("requires_booker_email_verification");
|
||||||
|
const emailSwitch = page
|
||||||
|
.locator("fieldset")
|
||||||
|
.filter({
|
||||||
|
hasText: emailSwitchLabel,
|
||||||
|
})
|
||||||
|
.getByRole("switch");
|
||||||
|
|
||||||
|
await expect(emailSwitch).toBeVisible();
|
||||||
|
await emailSwitch.click();
|
||||||
|
},
|
||||||
|
|
||||||
|
checkHideNotes: async () => {
|
||||||
|
const hideNotesText = (await localize("en"))("disable_notes");
|
||||||
|
const hideNotesSwitch = page
|
||||||
|
.locator("fieldset")
|
||||||
|
.filter({
|
||||||
|
hasText: hideNotesText,
|
||||||
|
})
|
||||||
|
.getByRole("switch");
|
||||||
|
|
||||||
|
await expect(hideNotesSwitch).toBeVisible();
|
||||||
|
await hideNotesSwitch.click();
|
||||||
|
},
|
||||||
|
|
||||||
|
checkRedirectOnBooking: async () => {
|
||||||
|
const redirectSwitchText = (await localize("en"))("redirect_url_description");
|
||||||
|
const placeholder = (await localize("en"))("external_redirect_url");
|
||||||
|
|
||||||
|
const redirectSwitch = page
|
||||||
|
.locator("fieldset")
|
||||||
|
.filter({
|
||||||
|
hasText: redirectSwitchText,
|
||||||
|
})
|
||||||
|
.getByRole("switch");
|
||||||
|
|
||||||
|
await expect(redirectSwitch).toBeVisible();
|
||||||
|
await redirectSwitch.click();
|
||||||
|
await expect(page.getByPlaceholder(placeholder)).toBeVisible();
|
||||||
|
await redirectSwitch.click();
|
||||||
|
},
|
||||||
|
|
||||||
|
checkEnablePrivateUrl: async () => {
|
||||||
|
const urlSwitch = page.getByTestId("hashedLinkCheck");
|
||||||
|
const privateLinkText = (await localize("en"))("private_link_hint");
|
||||||
|
|
||||||
|
await expect(urlSwitch).toBeVisible();
|
||||||
|
await urlSwitch.click();
|
||||||
|
await expect(page.locator(`text=${privateLinkText}`)).toBeVisible();
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleOfferSeats: async () => {
|
||||||
|
const seatSwitch = page.getByTestId("offer-seats-toggle");
|
||||||
|
const seatSwitchText = (await localize("en"))("number_of_seats");
|
||||||
|
const shareAttendeeText = (await localize("en"))("show_attendees");
|
||||||
|
|
||||||
|
await expect(seatSwitch).toBeVisible();
|
||||||
|
await seatSwitch.click();
|
||||||
|
|
||||||
|
const seatSwitchField = page.getByLabel(seatSwitchText);
|
||||||
|
await seatSwitchField.fill("3");
|
||||||
|
await expect(seatSwitchField).toHaveValue("3");
|
||||||
|
await expect(page.getByLabel(shareAttendeeText)).toBeVisible();
|
||||||
|
await seatSwitch.click();
|
||||||
|
},
|
||||||
|
|
||||||
|
checkLockTimezone: async () => {
|
||||||
|
const lockTimezoneText = (await localize("en"))("description_lock_timezone_toggle_on_booking_page");
|
||||||
|
|
||||||
|
const lockSwitch = page
|
||||||
|
.locator("fieldset")
|
||||||
|
.filter({
|
||||||
|
hasText: lockTimezoneText,
|
||||||
|
})
|
||||||
|
.getByRole("switch");
|
||||||
|
|
||||||
|
await expect(lockSwitch).toBeVisible();
|
||||||
|
},
|
||||||
|
|
||||||
|
checkEventType: async () => {
|
||||||
|
const requiresConfirmationText = (await localize("en"))("requires_confirmation");
|
||||||
|
await expect(page.locator(`text=${requiresConfirmationText}`)).toBeVisible();
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user