fix: Double encoding in addAppMutation (#15303)

* Remove double encoding

* Add test for OAuth page

* Add tests

* Remove test from integrations.e2e
This commit is contained in:
Joe Au-Yeung
2024-06-03 14:53:03 +00:00
committed by GitHub
parent 822f0204a6
commit d2f76edfd6
2 changed files with 14 additions and 1 deletions
+13
View File
@@ -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();
@@ -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}`);