test(e2e): add AP Core 3 migration coverage#7884
Conversation
…out, and handshake recovery Why: Account Portal is being auto-bumped to Core 3 for all instances. Existing tests only cover happy-path sign-in/sign-up/SSR for v6 and v7 SDKs. This leaves gaps in backwards compatibility validation for older SDKs and in edge cases that could surface Core 2/Core 3 protocol differences. What changed: - Added v5 @clerk/nextjs test suite against Core 3 staging AP (sign-in, sign-up, SSR) to validate the oldest supported Core 2 SDK still works with Core 3 AP using the legacy token-based handshake protocol. - Added sign-out test to v6 and v7 suites: signs in via AP, signs out, verifies session cookie is cleared, reload stays signed out, and AP shows sign-in form on next visit (no stale cross-domain state). - Added handshake recovery test to v6 and v7 suites: signs in via AP, deletes __session cookie to simulate expiry, reloads page, verifies handshake recovers the session without redirect loop and no leftover handshake params in the URL. - Added withAPCore3ClerkV5 env and appRouterAPWithClerkNextV5 app config (reuses v6 template since both use SignedIn/SignedOut and clerkMiddleware).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
📝 WalkthroughWalkthroughThis pull request adds support for Clerk V5 integration with Account Portal Core 3. It introduces a new environment configuration and Next.js preset for this integration, creates a new test suite to verify the integration functionality, and adds two new test helper functions (testSignOut and testHandshakeRecovery) that are incorporated into existing test suites for V6 and V7 versions. The changes establish baseline testing and configuration infrastructure for the Clerk V5 variant. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Account Portal is being auto-bumped to Core 3 for all instances. All existing Core 2 and Core 3 apps must continue working. The existing AP flow tests only covered happy-path sign-in/sign-up/SSR for v6 and v7 SDKs, which left gaps in backwards compatibility validation and edge case coverage.
What changed
Added three categories of tests to the
@ap-flowsintegration suite:v5 SDK backwards compatibility (new test file):
@clerk/nextjs@5(from npm) against the Core 3 staging APformat=nonce), so this validates that Core 3 FAPI still supports the older handshake protocolSign-out after AP-established session (added to v6 and v7 suites):
Clerk.signOut()__sessioncookie is clearedHandshake recovery after session cookie loss (added to v6 and v7 suites):
__sessioncookie to simulate expiryTest matrix after this PR
Test plan
@ap-flowstests still pass (v6, v7 sign-in/sign-up/SSR)🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
Tests
Chores