Scheduling infrastructure for absolutely everyone.
fix: Private settings of the event disabled after making changes to your event (#14628)
Somay Chauhan1931758fc708
diff --git a/apps/web/components/eventtype/EventSetupTab.tsx b/apps/web/components/eventtype/EventSetupTab.tsxindex b9f2c5b10fb..f09bf48b978 100644--- a/apps/web/components/eventtype/EventSetupTab.tsx+++ b/apps/web/components/eventtype/EventSetupTab.tsx@@ -480,6 +480,7 @@ export const EventSetupTab = (label={t("title")}{...(isManagedEventType || isChildrenManagedEventType ? titleLockedProps : {})}defaultValue={eventType.title}+ data-testid="event-title"{...formMethods.register("title")}/><div>@@ -494,6 +495,7 @@ export const EventSetupTab = (label={t("URL")}{...(isManagedEventType || isChildrenManagedEventType ? urlLockedProps : {})}defaultValue={eventType.slug}+ data-testid="event-slug"addOnLeading={<>{urlPrefix}/diff --git a/apps/web/modules/event-types/views/event-types-single-view.tsx b/apps/web/modules/event-types/views/event-types-single-view.tsxindex 3bbebb844ba..fa1d9c7bf86 100644--- a/apps/web/modules/event-types/views/event-types-single-view.tsx+++ b/apps/web/modules/event-types/views/event-types-single-view.tsx@@ -767,7 +767,7 @@ const EventTypePage = (props: EventTypeSetupProps) => {}, {});if (dirtyFieldExists) {- updateMutation.mutate({ ...filteredPayload, id: eventType.id });+ updateMutation.mutate({ ...filteredPayload, id: eventType.id, hashedLink: values.hashedLink });}}}><div ref={animationParentRef}>{tabMap[tabName]}</div>diff --git a/apps/web/playwright/hash-my-url.e2e.ts b/apps/web/playwright/hash-my-url.e2e.tsindex fb817bbb8fd..b8e67d47c0d 100644--- a/apps/web/playwright/hash-my-url.e2e.ts+++ b/apps/web/playwright/hash-my-url.e2e.ts@@ -6,7 +6,7 @@ import { bookTimeSlot, selectFirstAvailableTimeSlotNextMonth } from "./lib/testUtest.describe.configure({ mode: "parallel" });// TODO: This test is very flaky. Feels like tossing a coin and hope that it won't fail. Needs to be revisited.-test.fixme("hash my url", () => {+test.describe("hash my url", () => {test.beforeEach(async ({ users }) => {const user = await users.create();await user.apiLogin();@@ -51,5 +51,17 @@ test.fixme("hash my url", () => {// we wait for the hashedLink setting to loadconst $newUrl = await page.locator('//*[@data-testid="generated-hash-url"]').inputValue();expect($url !== $newUrl).toBeTruthy();++ // Ensure that private URL is enabled after modifying the event type.+ // Additionally, if the slug is changed, ensure that the private URL is updated accordingly.+ await page.getByTestId("vertical-tab-event_setup_tab_title").click();+ await page.locator("[data-testid=event-title]").fill("somethingrandom");+ await page.locator("[data-testid=event-slug]").fill("somethingrandom");+ await page.locator("[data-testid=update-eventtype]").click();+ await page.getByTestId("toast-success").waitFor();+ await page.waitForLoadState("networkidle");+ await page.locator(".primary-navigation >> text=Advanced").click();+ const $url2 = await page.locator('//*[@data-testid="generated-hash-url"]').inputValue();+ expect($url2.includes("somethingrandom")).toBeTruthy();});});