Vue Clerk Integration test
This is the custom terms page
-This is the custom terms page
-This is the custom terms page
-I am dynamically rendered
; } `, diff --git a/integration/tests/sign-in-flow.test.ts b/integration/tests/sign-in-flow.test.ts index 29243df5c4..e04b5e0012 100644 --- a/integration/tests/sign-in-flow.test.ts +++ b/integration/tests/sign-in-flow.test.ts @@ -118,7 +118,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign in f await u.po.signIn.continue(); await u.po.signIn.setPassword('wrong-password'); await u.po.signIn.continue(); - await expect(u.page.getByText(/password you entered is incorrect/i)).toBeVisible(); + await expect(u.page.getByText(/^password is incorrect/i)).toBeVisible(); await u.po.expect.toBeSignedOut(); }); @@ -132,7 +132,7 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign in f await u.po.signIn.setPassword('wrong-password'); await u.po.signIn.continue(); - await expect(u.page.getByText(/password you entered is incorrect/i)).toBeVisible(); + await expect(u.page.getByText(/^password is incorrect/i)).toBeVisible(); await u.po.signIn.getUseAnotherMethodLink().click(); await u.po.signIn.getAltMethodsEmailCodeButton().click(); diff --git a/integration/tests/vue/components.test.ts b/integration/tests/vue/components.test.ts index b0eedadd61..0587eef0aa 100644 --- a/integration/tests/vue/components.test.ts +++ b/integration/tests/vue/components.test.ts @@ -53,61 +53,6 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withCustomRoles] })('basic te await u.po.userButton.toHaveVisibleMenuItems([/Manage account/i, /Sign out$/i]); }); - test('render user button with custom menu items', async ({ page, context }) => { - const u = createTestUtils({ app, page, context }); - await u.page.goToRelative('/sign-in'); - await u.po.signIn.waitForMounted(); - await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password }); - await u.po.expect.toBeSignedIn(); - - await u.page.waitForAppUrl('/'); - await u.po.userButton.waitForMounted(); - await u.po.userButton.toggleTrigger(); - await u.po.userButton.waitForPopover(); - - // Check if custom menu items are visible - await u.po.userButton.toHaveVisibleMenuItems([/Custom link/i, /Custom page/i, /Custom action/i]); - - // Click custom action - await u.page.getByRole('menuitem', { name: /Custom action/i }).click(); - await expect(u.page.getByText('Is action clicked: true')).toBeVisible(); - - // Trigger the popover again - await u.po.userButton.toggleTrigger(); - await u.po.userButton.waitForPopover(); - - // Click custom action and check for custom page availbility - await u.page.getByRole('menuitem', { name: /Custom page/i }).click(); - await u.po.userProfile.waitForUserProfileModal(); - await expect(u.page.getByRole('heading', { name: 'Custom Terms Page' })).toBeVisible(); - - // Close the modal and trigger the popover again - await u.page.locator('.cl-modalCloseButton').click(); - await u.po.userButton.toggleTrigger(); - await u.po.userButton.waitForPopover(); - - // Click custom link and check navigation - await u.page.getByRole('menuitem', { name: /Custom link/i }).click(); - await u.page.waitForAppUrl('/profile'); - }); - - test('reorders default user button menu items and functions as expected', async ({ page, context }) => { - const u = createTestUtils({ app, page, context }); - await u.page.goToRelative('/sign-in'); - await u.po.signIn.waitForMounted(); - await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password }); - await u.po.expect.toBeSignedIn(); - - await u.page.waitForAppUrl('/'); - await u.po.userButton.waitForMounted(); - await u.po.userButton.toggleTrigger(); - await u.po.userButton.waitForPopover(); - - // First item should now be the sign out button - await u.page.getByRole('menuitem').first().click(); - await u.po.expect.toBeSignedOut(); - }); - test('render user profile and current user data', async ({ page, context }) => { const u = createTestUtils({ app, page, context }); await u.page.goToRelative('/sign-in'); @@ -121,61 +66,6 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withCustomRoles] })('basic te await expect(u.page.getByText(`Hello, ${fakeUser.firstName}`)).toBeVisible(); }); - test('render user profile with custom pages and links', async ({ page, context }) => { - const u = createTestUtils({ app, page, context }); - await u.page.goToRelative('/sign-in'); - await u.po.signIn.waitForMounted(); - await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password }); - await u.po.expect.toBeSignedIn(); - - await u.page.goToRelative('/custom-pages/user-profile'); - await u.po.userProfile.waitForMounted(); - - // Check if custom pages and links are visible - await expect(u.page.getByRole('button', { name: /Terms/i })).toBeVisible(); - await expect(u.page.getByRole('button', { name: /Homepage/i })).toBeVisible(); - - // Navigate to custom page - await u.page.getByRole('button', { name: /Terms/i }).click(); - await expect(u.page.getByRole('heading', { name: 'Custom Terms Page' })).toBeVisible(); - - // Check reordered default label. Security tab is now the last item. - await u.page.locator('.cl-navbarButton').last().click(); - await expect(u.page.getByRole('heading', { name: 'Security' })).toBeVisible(); - - // Click custom link and check navigation - await u.page.getByRole('button', { name: /Homepage/i }).click(); - await u.page.waitForAppUrl('/'); - }); - - test('render organization profile with custom pages and links', async ({ page, context }) => { - const u = createTestUtils({ app, page, context }); - await u.page.goToRelative('/sign-in'); - await u.po.signIn.waitForMounted(); - await u.po.signIn.signInWithEmailAndInstantPassword({ email: fakeUser.email, password: fakeUser.password }); - await u.po.expect.toBeSignedIn(); - - await u.page.goToRelative('/custom-pages/organization-profile'); - await u.po.organizationSwitcher.waitForMounted(); - await u.po.organizationSwitcher.waitForAnOrganizationToSelected(); - - // Check if custom pages and links are visible - await expect(u.page.getByRole('button', { name: /Terms/i })).toBeVisible(); - await expect(u.page.getByRole('button', { name: /Homepage/i })).toBeVisible(); - - // Navigate to custom page - await u.page.getByRole('button', { name: /Terms/i }).click(); - await expect(u.page.getByRole('heading', { name: 'Custom Terms Page' })).toBeVisible(); - - // Check reordered default label. General tab is now the last item. - await u.page.locator('.cl-navbarButton').last().click(); - await expect(u.page.getByRole('heading', { name: 'General' })).toBeVisible(); - - // Click custom link and check navigation - await u.page.getByRole('button', { name: /Homepage/i }).click(); - await u.page.waitForAppUrl('/'); - }); - test('redirects to sign-in when unauthenticated', async ({ page, context }) => { const u = createTestUtils({ app, page, context }); await u.page.goToRelative('/profile'); diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index dc52f1bd41..d1474843ef 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,36 +1,5 @@ # @clerk/astro -## 1.5.4 - -### Patch Changes - -- Updated dependencies [[`0bc3ccc5bd4a93121bb7e7d6a32271af9c31f8c3`](https://github.com/clerk/javascript/commit/0bc3ccc5bd4a93121bb7e7d6a32271af9c31f8c3), [`0bc3ccc5bd4a93121bb7e7d6a32271af9c31f8c3`](https://github.com/clerk/javascript/commit/0bc3ccc5bd4a93121bb7e7d6a32271af9c31f8c3)]: - - @clerk/shared@2.19.0 - - @clerk/types@4.38.0 - - @clerk/backend@1.19.2 - -## 1.5.3 - -### Patch Changes - -- Using LICENSE file name that is consistent with other @clerk/\* modules ([#4712](https://github.com/clerk/javascript/pull/4712)) by [@jacekradko](https://github.com/jacekradko) - -- Updated dependencies [[`4e5e7f463c12893a21cb3b5f9317fc3f2945879b`](https://github.com/clerk/javascript/commit/4e5e7f463c12893a21cb3b5f9317fc3f2945879b)]: - - @clerk/types@4.37.0 - - @clerk/backend@1.19.1 - - @clerk/shared@2.18.1 - -## 1.5.2 - -### Patch Changes - -- Add backwards compatibility for ignoring prerendered routes in Astro ([#4694](https://github.com/clerk/javascript/pull/4694)) by [@wobsoriano](https://github.com/wobsoriano) - -- Updated dependencies [[`8ee5d84995fa17532491ff96efac5738c9bcd9ef`](https://github.com/clerk/javascript/commit/8ee5d84995fa17532491ff96efac5738c9bcd9ef), [`09fedd1df155d30cc055ce701b133aa6470e9b47`](https://github.com/clerk/javascript/commit/09fedd1df155d30cc055ce701b133aa6470e9b47), [`b6aa589f75be62a89a3853d496176ed2f2c0e2c5`](https://github.com/clerk/javascript/commit/b6aa589f75be62a89a3853d496176ed2f2c0e2c5), [`235eaae4c3c9400492fca47d20a47c7081041565`](https://github.com/clerk/javascript/commit/235eaae4c3c9400492fca47d20a47c7081041565)]: - - @clerk/types@4.36.0 - - @clerk/backend@1.19.0 - - @clerk/shared@2.18.0 - ## 1.5.1 ### Patch Changes diff --git a/packages/astro/LICENSE b/packages/astro/LICENCE similarity index 100% rename from packages/astro/LICENSE rename to packages/astro/LICENCE diff --git a/packages/astro/package.json b/packages/astro/package.json index a25640c3ab..72b443e6d6 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/astro", - "version": "1.5.4", + "version": "1.5.1", "description": "Clerk SDK for Astro", "keywords": [ "auth", diff --git a/packages/astro/src/server/clerk-middleware.ts b/packages/astro/src/server/clerk-middleware.ts index 3bdf0a53cf..ba1426c7f7 100644 --- a/packages/astro/src/server/clerk-middleware.ts +++ b/packages/astro/src/server/clerk-middleware.ts @@ -62,7 +62,7 @@ export const clerkMiddleware: ClerkMiddleware = (...args: unknown[]): any => { const astroMiddleware: AstroMiddleware = async (context, next) => { // if the current page is prerendered, do nothing - if (isPrerenderedPage(context)) { + if ('isPrerendered' in context && context.isPrerendered) { return next(); } @@ -129,15 +129,6 @@ export const clerkMiddleware: ClerkMiddleware = (...args: unknown[]): any => { return astroMiddleware; }; -const isPrerenderedPage = (context: APIContext) => { - return ( - // for Astro v5 - ('isPrerendered' in context && context.isPrerendered) || - // for Astro v4 - ('_isPrerendered' in context && context._isPrerendered) - ); -}; - // TODO-SHARED: Duplicate from '@clerk/nextjs' const parseHandlerAndOptions = (args: unknown[]) => { return [ diff --git a/packages/backend/CHANGELOG.md b/packages/backend/CHANGELOG.md index 84865cf935..8ea125b258 100644 --- a/packages/backend/CHANGELOG.md +++ b/packages/backend/CHANGELOG.md @@ -1,33 +1,5 @@ # Change Log -## 1.19.2 - -### Patch Changes - -- Updated dependencies [[`0bc3ccc5bd4a93121bb7e7d6a32271af9c31f8c3`](https://github.com/clerk/javascript/commit/0bc3ccc5bd4a93121bb7e7d6a32271af9c31f8c3), [`0bc3ccc5bd4a93121bb7e7d6a32271af9c31f8c3`](https://github.com/clerk/javascript/commit/0bc3ccc5bd4a93121bb7e7d6a32271af9c31f8c3)]: - - @clerk/shared@2.19.0 - - @clerk/types@4.38.0 - -## 1.19.1 - -### Patch Changes - -- Updated dependencies [[`4e5e7f463c12893a21cb3b5f9317fc3f2945879b`](https://github.com/clerk/javascript/commit/4e5e7f463c12893a21cb3b5f9317fc3f2945879b)]: - - @clerk/types@4.37.0 - - @clerk/shared@2.18.1 - -## 1.19.0 - -### Minor Changes - -- Allow creating organizations without an initial owner to facilitate B2B onboarding flows ([#4670](https://github.com/clerk/javascript/pull/4670)) by [@LauraBeatris](https://github.com/LauraBeatris) - -### Patch Changes - -- Updated dependencies [[`8ee5d84995fa17532491ff96efac5738c9bcd9ef`](https://github.com/clerk/javascript/commit/8ee5d84995fa17532491ff96efac5738c9bcd9ef), [`09fedd1df155d30cc055ce701b133aa6470e9b47`](https://github.com/clerk/javascript/commit/09fedd1df155d30cc055ce701b133aa6470e9b47), [`235eaae4c3c9400492fca47d20a47c7081041565`](https://github.com/clerk/javascript/commit/235eaae4c3c9400492fca47d20a47c7081041565)]: - - @clerk/types@4.36.0 - - @clerk/shared@2.18.0 - ## 1.18.1 ### Patch Changes diff --git a/packages/backend/package.json b/packages/backend/package.json index d805039697..d6c74653aa 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -1,6 +1,6 @@ { "name": "@clerk/backend", - "version": "1.19.2", + "version": "1.18.1", "description": "Clerk Backend SDK - REST Client for Backend API & JWT verification utilities", "homepage": "https://clerk.com/", "bugs": { diff --git a/packages/backend/src/api/endpoints/AccountlessApplicationsAPI.ts b/packages/backend/src/api/endpoints/AccountlessApplicationsAPI.ts deleted file mode 100644 index 784ce061f9..0000000000 --- a/packages/backend/src/api/endpoints/AccountlessApplicationsAPI.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { AccountlessApplication } from '../resources/AccountlessApplication'; -import { AbstractAPI } from './AbstractApi'; - -const basePath = '/accountless_applications'; - -export class AccountlessApplicationAPI extends AbstractAPI { - public async createAccountlessApplication() { - return this.request