@shipfox/client-integrations 6.0.3 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +17 -0
- package/dist/components/callback-status-shell.d.ts.map +1 -1
- package/dist/components/callback-status-shell.js +4 -1
- package/dist/components/callback-status-shell.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/callback-status-shell.tsx +2 -5
- package/src/pages/linear-callback-page.test.tsx +11 -1
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/client-integrations",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "8.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/ShipfoxHQ/shipfox.git",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"@shipfox/api-integration-sentry-dto": "9.0.2",
|
|
36
36
|
"@shipfox/api-integration-webhook-dto": "9.0.2",
|
|
37
37
|
"@shipfox/client-api": "6.0.1",
|
|
38
|
-
"@shipfox/client-auth": "
|
|
39
|
-
"@shipfox/client-shell": "
|
|
38
|
+
"@shipfox/client-auth": "8.0.0",
|
|
39
|
+
"@shipfox/client-shell": "8.0.0",
|
|
40
40
|
"@shipfox/client-ui": "6.0.2",
|
|
41
41
|
"@shipfox/integration-icons": "0.2.2",
|
|
42
42
|
"@shipfox/react-ui": "0.3.7"
|
|
@@ -48,11 +48,8 @@ export function CallbackStatusShell({
|
|
|
48
48
|
{switchAccount ? (
|
|
49
49
|
<ButtonLink asChild className="min-h-44 w-full sm:w-fit">
|
|
50
50
|
<Link
|
|
51
|
-
to=
|
|
52
|
-
|
|
53
|
-
? `/auth/logout?redirect=${encodeURIComponent(logoutRedirect ?? '/')}`
|
|
54
|
-
: '/auth/logout'
|
|
55
|
-
}
|
|
51
|
+
to="/auth/logout"
|
|
52
|
+
search={workspaceId ? {redirect: logoutRedirect ?? '/'} : undefined}
|
|
56
53
|
>
|
|
57
54
|
Switch account
|
|
58
55
|
</Link>
|
|
@@ -128,12 +128,22 @@ describe('LinearCallbackPage', () => {
|
|
|
128
128
|
renderCallback('?code=grant-code-account&state=signed-state-account');
|
|
129
129
|
|
|
130
130
|
expect(await screen.findByRole('heading', {name: 'Different Shipfox account'})).toBeVisible();
|
|
131
|
-
|
|
131
|
+
const switchAccountLink = screen.getByRole('link', {name: 'Switch account'});
|
|
132
|
+
const switchAccountUrl = new URL(
|
|
133
|
+
switchAccountLink.getAttribute('href') ?? '/',
|
|
134
|
+
window.location.origin,
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
expect(switchAccountLink).toHaveAttribute(
|
|
132
138
|
'href',
|
|
133
139
|
`/auth/logout?redirect=${encodeURIComponent(
|
|
134
140
|
`/workspaces/${INTEGRATIONS_TEST_WID}/integrations/linear`,
|
|
135
141
|
)}`,
|
|
136
142
|
);
|
|
143
|
+
expect(switchAccountUrl.pathname).toBe('/auth/logout');
|
|
144
|
+
expect(switchAccountUrl.searchParams.get('redirect')).toBe(
|
|
145
|
+
`/workspaces/${INTEGRATIONS_TEST_WID}/integrations/linear`,
|
|
146
|
+
);
|
|
137
147
|
expect(screen.getByRole('link', {name: 'Start over'})).toBeVisible();
|
|
138
148
|
});
|
|
139
149
|
|