Skip to content

test(e2e): add Enterprise SSO tests#8092

Open
tmilewski wants to merge 2 commits intomainfrom
tom/user-4973-test-enterprise-sso
Open

test(e2e): add Enterprise SSO tests#8092
tmilewski wants to merge 2 commits intomainfrom
tom/user-4973-test-enterprise-sso

Conversation

@tmilewski
Copy link
Member

@tmilewski tmilewski commented Mar 16, 2026

Description

  • Adds the first basic Enterprise SSO E2E tests, covering SAML enterprise connection setup and sign-in redirect behavior on Tanstack React Start
  • Creates a new with-enterprise-sso environment preset backed by a Clerk instance with Enterprise Connections enabled
  • Tests create a fake SAML connection via the Backend API, then verify the sign-in UI correctly redirects managed-domain emails to the IdP and leaves non-managed emails on the regular sign-in flow

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

Summary by CodeRabbit

  • New Features

    • Enterprise SSO support has been added to Tanstack React Start, enabling SAML-based authentication for enterprise domains.
  • Tests

    • Added comprehensive enterprise SSO integration tests covering sign-in flows for managed and non-managed domain scenarios.

@tmilewski tmilewski self-assigned this Mar 16, 2026
@vercel
Copy link

vercel bot commented Mar 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Mar 16, 2026 10:47pm

Request Review

@changeset-bot
Copy link

changeset-bot bot commented Mar 16, 2026

🦋 Changeset detected

Latest commit: ba0d6bc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 16, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@8092

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8092

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8092

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8092

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8092

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8092

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8092

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8092

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8092

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8092

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8092

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8092

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8092

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8092

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8092

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8092

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8092

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8092

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8092

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8092

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8092

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8092

commit: ba0d6bc

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7e647c3a-8ca8-4cc6-97c1-663bed8194d4

📥 Commits

Reviewing files that changed from the base of the PR and between 291733c and ba0d6bc.

📒 Files selected for processing (5)
  • .changeset/light-queens-study.md
  • integration/.keys.json.sample
  • integration/presets/envs.ts
  • integration/presets/longRunningApps.ts
  • integration/tests/tanstack-start/enterprise-sso.test.ts

📝 Walkthrough

Walkthrough

This pull request introduces enterprise single sign-on (SSO) integration testing infrastructure. Changes include adding a new environment preset configured with enterprise SSO settings, establishing a corresponding sample configuration entry, integrating the new environment into the long-running app test suite, and implementing a new test module with setup and teardown logic. The test module verifies sign-in behavior for enterprise-managed and non-managed email domains by simulating SAML IdP interactions. No modifications were made to existing functionality or public APIs beyond introducing new exports.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'test(e2e): add Enterprise SSO tests' directly and clearly describes the main change—adding end-to-end tests for Enterprise SSO functionality, which is the primary focus of the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can get early access to new features in CodeRabbit.

Enable the early_access setting to enable early access features such as new models, tools, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant