diff --git a/apps/web/components/eventtype/EventTeamTab.tsx b/apps/web/components/eventtype/EventTeamTab.tsx index 49917235a30c4d..014fde0ed16c60 100644 --- a/apps/web/components/eventtype/EventTeamTab.tsx +++ b/apps/web/components/eventtype/EventTeamTab.tsx @@ -76,6 +76,8 @@ const ChildrenEventTypesList = ({
{ onChange && onChange( diff --git a/apps/web/playwright/fixtures/regularBookings.ts b/apps/web/playwright/fixtures/regularBookings.ts index 72c8e44fea35d6..b0a84078e05e5b 100644 --- a/apps/web/playwright/fixtures/regularBookings.ts +++ b/apps/web/playwright/fixtures/regularBookings.ts @@ -204,7 +204,7 @@ export function createBookingPageFixture(page: Page) { placeholder?: string ) => { await page.getByTestId("add-field").click(); - await page.locator("#test-field-type > .bg-default > div > div:nth-child(2)").first().click(); + await page.getByTestId("test-field-type").click(); await page.getByTestId(`select-option-${questionType}`).click(); await page.getByLabel("Identifier").dblclick(); await page.getByLabel("Identifier").fill(identifier); diff --git a/apps/web/playwright/integrations-stripe.e2e.ts b/apps/web/playwright/integrations-stripe.e2e.ts index 25a1a33fa612bd..c9d86ccf0e6092 100644 --- a/apps/web/playwright/integrations-stripe.e2e.ts +++ b/apps/web/playwright/integrations-stripe.e2e.ts @@ -267,7 +267,7 @@ test.describe("Stripe integration", () => { await page.getByTestId("price-input-stripe").fill("200"); // Select currency in dropdown - await page.locator(".text-black > .bg-default > div > div:nth-child(2)").first().click(); + await page.getByTestId("stripe-currency-select").click(); await page.locator("#react-select-2-input").fill("mexi"); await page.locator("#react-select-2-option-81").click(); diff --git a/apps/web/playwright/managed-event-types.e2e.ts b/apps/web/playwright/managed-event-types.e2e.ts index 52e6bf86c6bffe..a0323ed8b79210 100644 --- a/apps/web/playwright/managed-event-types.e2e.ts +++ b/apps/web/playwright/managed-event-types.e2e.ts @@ -1,6 +1,9 @@ import { expect } from "@playwright/test"; +import type { Page } from "@playwright/test"; import { test } from "./lib/fixtures"; +import { selectFirstAvailableTimeSlotNextMonth, bookTimeSlot } from "./lib/testUtils"; +import { localize } from "./lib/testUtils"; test.afterEach(({ users }) => users.deleteAll()); @@ -69,15 +72,34 @@ test.describe("Managed Event Types tests", () => { await page.goto("/event-types"); await page.getByTestId("event-types").locator('a[title="managed"]').click(); await page.getByTestId("vertical-tab-assignment").click(); - await page.locator('[class$="control"]').filter({ hasText: "Select..." }).click(); + await page.getByTestId("assignment-dropdown").click(); + await page.getByTestId(`select-option-${memberUser.id}`).click(); await page.locator('[type="submit"]').click(); await page.getByTestId("toast-success").waitFor(); + }); - await adminUser.logout(); + await test.step("Managed event type can use Organizer's default app as location", async () => { + await page.getByTestId("vertical-tab-event_setup_tab_title").click(); + + await page.locator("#location-select").click(); + const optionText = (await localize("en"))("organizer_default_conferencing_app"); + await page.locator(`text=${optionText}`).click(); + await page.locator("[data-testid=update-eventtype]").click(); + await page.getByTestId("toast-success").waitFor(); + await page.waitForLoadState("networkidle"); + + await page.getByTestId("vertical-tab-assignment").click(); + await gotoBookingPage(page); + await selectFirstAvailableTimeSlotNextMonth(page); + await bookTimeSlot(page); + + await expect(page.getByTestId("success-page")).toBeVisible(); }); await test.step("Managed event type has locked fields for added member", async () => { + await adminUser.logout(); + // Coming back as member user to see if there is a managed event present after assignment await memberUser.apiLogin(); await page.goto("/event-types"); @@ -91,3 +113,9 @@ test.describe("Managed Event Types tests", () => { }); }); }); + +async function gotoBookingPage(page: Page) { + const previewLink = await page.getByTestId("preview-button").getAttribute("href"); + + await page.goto(previewLink ?? ""); +} diff --git a/apps/web/playwright/payment-apps.e2e.ts b/apps/web/playwright/payment-apps.e2e.ts index c01bc10ba26de3..77bf674d92658a 100644 --- a/apps/web/playwright/payment-apps.e2e.ts +++ b/apps/web/playwright/payment-apps.e2e.ts @@ -77,7 +77,7 @@ test.describe("Payment app", () => { await page.goto(`event-types/${paymentEvent.id}?tabName=apps`); await page.locator("#event-type-form").getByRole("switch").click(); - await page.locator(".text-black > .bg-default > div > div:nth-child(2)").first().click(); + await page.getByTestId("stripe-currency-select").click(); await page.getByTestId("select-option-usd").click(); await page.getByTestId("price-input-stripe").click(); @@ -123,10 +123,10 @@ test.describe("Payment app", () => { await page.getByPlaceholder("Price").click(); await page.getByPlaceholder("Price").fill("150"); - await page.locator(".text-black > .bg-default > div > div:nth-child(2)").first().click(); + await page.getByTestId("paypal-currency-select").click(); await page.locator("#react-select-2-option-13").click(); - await page.locator(".mb-1 > .bg-default > div > div:nth-child(2)").first().click(); + await page.getByTestId("paypal-payment-option-select").click(); await page.getByText("$MXNCurrencyMexican pesoPayment option").click(); await page.getByTestId("update-eventtype").click(); diff --git a/packages/app-store/paypal/components/EventTypeAppCardInterface.tsx b/packages/app-store/paypal/components/EventTypeAppCardInterface.tsx index 536d1596524b7c..db6ba04755ca39 100644 --- a/packages/app-store/paypal/components/EventTypeAppCardInterface.tsx +++ b/packages/app-store/paypal/components/EventTypeAppCardInterface.tsx @@ -92,6 +92,7 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({ + data-testid="stripe-payment-option-select" defaultValue={ paymentOptionSelectValue ? { ...paymentOptionSelectValue, label: t(paymentOptionSelectValue.label) } diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts index 2d73a2214582c5..a21848ce2e6c05 100644 --- a/packages/features/bookings/lib/handleNewBooking.ts +++ b/packages/features/bookings/lib/handleNewBooking.ts @@ -1001,8 +1001,11 @@ async function handler( const attendeeTimezone = attendeeInfoOnReschedule ? attendeeInfoOnReschedule.timeZone : reqBody.timeZone; const tAttendees = await getTranslation(attendeeLanguage ?? "en", "common"); + + const isManagedEventType = !!eventType.parentId; + // use host default - if (isTeamEventType && locationBodyString === OrganizerDefaultConferencingAppType) { + if ((isManagedEventType || isTeamEventType) && locationBodyString === OrganizerDefaultConferencingAppType) { const metadataParseResult = userMetadataSchema.safeParse(organizerUser.metadata); const organizerMetadata = metadataParseResult.success ? metadataParseResult.data : undefined; if (organizerMetadata?.defaultConferencingApp?.appSlug) { diff --git a/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx b/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx index 328644da307089..8a6218d197a268 100644 --- a/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx +++ b/packages/features/eventtypes/components/ChildrenEventTypeSelect.tsx @@ -106,6 +106,7 @@ export const ChildrenEventTypeSelect = ({ {children.created && children.owner.username && (