+ Loading waitlist>} />
+
+ );
+}
diff --git a/integration/templates/react-vite/src/App.tsx b/integration/templates/react-vite/src/App.tsx
index 98e3530af6..3696ded74d 100644
--- a/integration/templates/react-vite/src/App.tsx
+++ b/integration/templates/react-vite/src/App.tsx
@@ -6,7 +6,7 @@ function App() {
return (
+ Loading create organization>} />
+
+ );
+}
diff --git a/integration/templates/react-vite/src/main.tsx b/integration/templates/react-vite/src/main.tsx
index 015a037595..f011cf9726 100644
--- a/integration/templates/react-vite/src/main.tsx
+++ b/integration/templates/react-vite/src/main.tsx
@@ -12,6 +12,10 @@ import UserProfileCustom from './custom-user-profile';
import UserButtonCustom from './custom-user-button';
import UserButtonCustomTrigger from './custom-user-button-trigger';
import UserButton from './user-button';
+import Waitlist from './waitlist';
+import OrganizationProfile from './organization-profile';
+import OrganizationList from './organization-list';
+import CreateOrganization from './create-organization';
const Root = () => {
const navigate = useNavigate();
@@ -74,6 +78,22 @@ const router = createBrowserRouter([
path: '/custom-user-button-trigger',
element:
+ Loading organization list>} />
+
+ );
+}
diff --git a/integration/templates/react-vite/src/organization-profile/index.tsx b/integration/templates/react-vite/src/organization-profile/index.tsx
new file mode 100644
index 0000000000..144b8b1a53
--- /dev/null
+++ b/integration/templates/react-vite/src/organization-profile/index.tsx
@@ -0,0 +1,12 @@
+import { OrganizationProfile } from '@clerk/clerk-react';
+
+export default function Page() {
+ return (
+
+ Loading organization profile>}
+ />
+
+ );
+}
diff --git a/integration/templates/react-vite/src/waitlist/index.tsx b/integration/templates/react-vite/src/waitlist/index.tsx
new file mode 100644
index 0000000000..effbf8a5a4
--- /dev/null
+++ b/integration/templates/react-vite/src/waitlist/index.tsx
@@ -0,0 +1,9 @@
+import { Waitlist } from '@clerk/clerk-react';
+
+export default function Page() {
+ return (
+
+ Loading waitlist>} />
+
+ );
+}
diff --git a/integration/testUtils/appPageObject.ts b/integration/testUtils/appPageObject.ts
index 70b2b21832..306c293a39 100644
--- a/integration/testUtils/appPageObject.ts
+++ b/integration/testUtils/appPageObject.ts
@@ -13,7 +13,7 @@ export const createAppPageObject = (testArgs: { page: Page }, app: Application)
// do not fail the test if interstitial is returned (401)
}
},
- goToRelative: (path: string, opts: { searchParams?: URLSearchParams; timeout?: number } = {}) => {
+ goToRelative: (path: string, opts: { waitUntil?: any; searchParams?: URLSearchParams; timeout?: number } = {}) => {
let url: URL;
try {
@@ -35,7 +35,7 @@ export const createAppPageObject = (testArgs: { page: Page }, app: Application)
if (opts.searchParams) {
url.search = opts.searchParams.toString();
}
- return page.goto(url.toString(), { timeout: opts.timeout ?? 20000 });
+ return page.goto(url.toString(), { timeout: opts.timeout ?? 20000, waitUntil: opts.waitUntil });
},
waitForClerkJsLoaded: async () => {
return page.waitForFunction(() => {
diff --git a/integration/tests/components.test.ts b/integration/tests/components.test.ts
index fe819bbe53..3863d8c766 100644
--- a/integration/tests/components.test.ts
+++ b/integration/tests/components.test.ts
@@ -1,11 +1,12 @@
import { expect, test } from '@playwright/test';
import { appConfigs } from '../presets';
-import type { FakeUser } from '../testUtils';
+import type { FakeOrganization, FakeUser } from '../testUtils';
import { createTestUtils, testAgainstRunningApps } from '../testUtils';
testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('component smoke tests @generic', ({ app }) => {
let fakeUser: FakeUser;
+ let fakeOrganization: FakeOrganization;
test.beforeAll(async () => {
const u = createTestUtils({ app });
@@ -13,12 +14,14 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('component
withPhoneNumber: true,
withUsername: true,
});
- await u.services.users.createBapiUser(fakeUser);
+ const user = await u.services.users.createBapiUser(fakeUser);
+ fakeOrganization = await u.services.users.createFakeOrganization(user.id);
});
test.afterAll(async () => {
await app.teardown();
await fakeUser.deleteIfExists();
+ await fakeOrganization.delete();
});
const components = [
@@ -44,6 +47,35 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('component
protected: true,
fallback: 'Loading user button',
},
+ {
+ name: 'Waitlist',
+ path: '/waitlist',
+ fallback: 'Loading waitlist',
+ },
+ {
+ name: 'OrganizationSwitcher',
+ path: '/',
+ fallback: 'Loading organization switcher',
+ protected: true,
+ },
+ {
+ name: 'OrganizationProfile',
+ path: '/organization-profile',
+ fallback: 'Loading organization profile',
+ protected: true,
+ },
+ {
+ name: 'OrganizationList',
+ path: '/organization-list',
+ fallback: 'Loading organization list',
+ protected: true,
+ },
+ {
+ name: 'CreateOrganization',
+ path: '/create-organization',
+ fallback: 'Loading create organization',
+ protected: true,
+ },
];
const signIn = async ({ app, page, context }) => {
@@ -68,7 +100,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('component
}
const u = createTestUtils({ app, page, context });
- await u.page.goToRelative(component.path);
+ await u.page.goToRelative(component.path, { waitUntil: 'commit' });
await expect(u.page.getByText(component.fallback)).toBeVisible();
await signOut({ app, page, context });