diff --git a/.changeset/gold-planes-wear.md b/.changeset/gold-planes-wear.md
new file mode 100644
index 00000000000..a845151cc84
--- /dev/null
+++ b/.changeset/gold-planes-wear.md
@@ -0,0 +1,2 @@
+---
+---
diff --git a/packages/clerk-js/src/ui/components/OrganizationSwitcher/__tests__/OrganizationSwitcher.test.tsx b/packages/clerk-js/src/ui/components/OrganizationSwitcher/__tests__/OrganizationSwitcher.test.tsx
index c854f15f702..ed91a3ac821 100644
--- a/packages/clerk-js/src/ui/components/OrganizationSwitcher/__tests__/OrganizationSwitcher.test.tsx
+++ b/packages/clerk-js/src/ui/components/OrganizationSwitcher/__tests__/OrganizationSwitcher.test.tsx
@@ -62,6 +62,52 @@ describe('OrganizationSwitcher', () => {
});
describe('OrganizationSwitcherTrigger', () => {
+ it('shows OrganizationPreview when user has an active organization', async () => {
+ const { wrapper, fixtures } = await createFixtures(f => {
+ f.withOrganizations();
+ f.withUser({
+ email_addresses: ['test@clerk.com'],
+ organization_memberships: [{ name: 'Test Organization', id: '1', role: 'admin' }],
+ });
+ });
+
+ // Set the active organization in the context
+ fixtures.clerk.organization = {
+ id: '1',
+ name: 'Test Organization',
+ slug: 'test-organization',
+ membersCount: 1,
+ pendingInvitationsCount: 0,
+ adminDeleteEnabled: true,
+ maxAllowedMemberships: 100,
+ } as any;
+
+ const { getByText } = render(, { wrapper });
+ expect(getByText('Test Organization')).toBeInTheDocument();
+ });
+
+ it('shows PersonalWorkspacePreview when user has no active organization and hidePersonal is false', async () => {
+ const { wrapper, props } = await createFixtures(f => {
+ f.withOrganizations();
+ f.withUser({ email_addresses: ['test@clerk.com'] });
+ });
+
+ props.setProps({ hidePersonal: false });
+ const { getByText } = render(, { wrapper });
+ expect(getByText('Personal account')).toBeInTheDocument();
+ });
+
+ it('shows "No organization selected" when user has no active organization and hidePersonal is true', async () => {
+ const { wrapper, props } = await createFixtures(f => {
+ f.withOrganizations();
+ f.withUser({ email_addresses: ['test@clerk.com'] });
+ });
+
+ props.setProps({ hidePersonal: true });
+ const { getByText } = render(, { wrapper });
+ expect(getByText('No organization selected')).toBeInTheDocument();
+ });
+
it('shows the counter for pending suggestions and invitations', async () => {
const { wrapper, fixtures } = await createFixtures(f => {
f.withOrganizations();