fix: Private settings of the event disabled after making changes to your event (#14628)
* fix: Private settings of the event disabled after making changes to your event * add test --------- Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
This commit is contained in:
1 parent
fe551af145
commit
1931758fc7
3 files changed
+16
-2
No files matched your search
@@ -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}/
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { bookTimeSlot, selectFirstAvailableTimeSlotNextMonth } from "./lib/testU
|
||||
test.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 load
|
||||
const $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();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user