Scheduling infrastructure for absolutely everyone.
fix: Double encoding in `addAppMutation` (#15303)
Joe Au-Yeungd2f76edfd691
diff --git a/apps/web/playwright/app-store.e2e.ts b/apps/web/playwright/app-store.e2e.tsindex dc82b7274e2..adaefc32b39 100644--- a/apps/web/playwright/app-store.e2e.ts+++ b/apps/web/playwright/app-store.e2e.ts@@ -33,6 +33,19 @@ testBothFutureAndLegacyRoutes.describe("App Store - Authed", (routeVariant) => {await expect(page.locator(`text=Connect to Apple Server`)).toBeVisible();});+ test("Can add Google calendar from the app store", async ({ page, users }) => {+ const user = await users.create();+ await user.apiLogin();++ await page.goto("/apps/google-calendar");++ await page.getByTestId("install-app-button").click();++ await page.waitForNavigation();++ await expect(page.url()).toContain("accounts.google.com");+ });+test("Installed Apps - Navigation", async ({ page, users }) => {const user = await users.create();await user.apiLogin();diff --git a/packages/app-store/_utils/useAddAppMutation.ts b/packages/app-store/_utils/useAddAppMutation.tsindex 43f6396af27..537b0b739d7 100644--- a/packages/app-store/_utils/useAddAppMutation.ts+++ b/packages/app-store/_utils/useAddAppMutation.ts@@ -88,7 +88,7 @@ function useAddAppMutation(_type: App["type"] | null, allOptions?: UseAddAppMuta...(defaultInstall && { defaultInstall }),};- const stateStr = encodeURIComponent(JSON.stringify(state));+ const stateStr = JSON.stringify(state);const searchParams = generateSearchParamString({ stateStr, teamId, returnTo });const res = await fetch(`/api/integrations/${type}/add${searchParams}`);