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:
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user