Skip to content

Commit e21d544

Browse files
authored
chore(repo): OrganizationSwitcher component tests (#4847)
1 parent 5d7c701 commit e21d544

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

.changeset/tiny-cups-change.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { OrganizationList, OrganizationSwitcher } from '@clerk/nextjs';
2+
3+
export default function Page() {
4+
return (
5+
<div>
6+
<OrganizationSwitcher fallback={<>Loading organization switcher</>} />
7+
</div>
8+
);
9+
}

integration/templates/next-app-router/src/app/page.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { SignedIn, SignedOut, SignIn, UserButton, Protect, OrganizationSwitcher } from '@clerk/nextjs';
1+
import { SignedIn, SignedOut, SignIn, UserButton, Protect } from '@clerk/nextjs';
22
import Link from 'next/link';
33
import { ClientId } from './client-id';
44

55
export default function Home() {
66
return (
77
<main>
88
<UserButton fallback={<>Loading user button</>} />
9-
<OrganizationSwitcher fallback={<>Loading organization switcher</>} />
109
<ClientId />
1110
<SignedIn>SignedIn</SignedIn>
1211
<SignedOut>SignedOut</SignedOut>

integration/templates/react-vite/src/main.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Waitlist from './waitlist';
1616
import OrganizationProfile from './organization-profile';
1717
import OrganizationList from './organization-list';
1818
import CreateOrganization from './create-organization';
19+
import OrganizationSwitcher from './organization-switcher';
1920

2021
const Root = () => {
2122
const navigate = useNavigate();
@@ -90,6 +91,10 @@ const router = createBrowserRouter([
9091
path: '/organization-list',
9192
element: <OrganizationList />,
9293
},
94+
{
95+
path: '/organization-switcher',
96+
element: <OrganizationSwitcher />,
97+
},
9398
{
9499
path: '/create-organization',
95100
element: <CreateOrganization />,
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { OrganizationSwitcher } from '@clerk/clerk-react';
2+
3+
export default function Page() {
4+
return (
5+
<div>
6+
<OrganizationSwitcher fallback={<>Loading organization switcher</>} />
7+
</div>
8+
);
9+
}

integration/tests/components.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('component
5454
},
5555
{
5656
name: 'OrganizationSwitcher',
57-
path: '/',
57+
path: '/organization-switcher',
5858
fallback: 'Loading organization switcher',
5959
protected: true,
6060
},

0 commit comments

Comments
 (0)