Skip to content

fix(mosaic): fix feature test flakes and hold the email code field while sending - #10174

Merged
alexcarpenter merged 2 commits into
mainfrom
carp/mosaic-feature-test-flakes
Oct 9, 2026
Merged

alexcarpenter merged 2 commits into
mainfrom
carp/mosaic-feature-test-flakes

Conversation

@alexcarpenter

Copy link
Copy Markdown
Member

Description

Fixes the Mosaic Feature Tests flakes that showed up after #9937, all at once instead of one per PR. Locally, 8 of 20 full feature-suite runs on main failed on the add-email and Solana tests below. With this PR, 20 of 20 pass.

  • Add email drops a code typed while it is still sending. While the code request is in flight, the dialog already shows the verify step with the code field enabled, but the controller ignores a submit until the request finishes. Otp fires onComplete only once, so the dialog sits with a full code and nothing happens. The field is now disabled while sending, as the add phone dialog already does. Adds a test that holds the send request and fails without the fix.
  • The email link test waited on the real poll timer. The dialog closes when clerk-js's email link poller sees the address verified, and that poller runs on a 1s worker timer. Under load, the dialog sometimes never closed. The test now holds the first poll request, verifies the address, then releases it.
  • Alert text was read before it arrived. Card.Banner is always mounted with role='alert', so findByRole('alert') can return the empty slot. The 17 findByRole('alert') + toHaveTextContent assertions now wait for the text with waitFor.
  • Drops two focus restore assertions that feat(mosaic): wire up user profile emails and phone numbers #9937 added back after test(mosaic): remove flaky focus restoration tests #10170 removed them.

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:

@changeset-bot

changeset-bot Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c6f7f7d

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

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Oct 9, 2026 5:03pm UTC
swingset Ready Ready Preview Oct 9, 2026 5:03pm UTC

Request Review

@github-actions github-actions Bot added the mosaic label Oct 9, 2026
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository YAML (base), Organization UI (inherited)
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 1c99e843-c40c-47b7-99b6-1ad996801353

📥 Commits

Reviewing files that changed from the base of the PR and between d4f0cb1 and 1d1dd62.


📒 Files selected for processing (8)
  • .changeset/mosaic-feature-test-flakes.md
  • packages/mosaic/src/features/organization-profile/__tests__/members-table-tab.view.test.tsx
  • packages/mosaic/src/features/user-profile/__tests__/user-profile-web3-wallets-section.feature.test.tsx
  • packages/mosaic/src/features/user-profile/user-profile-account-section/user-profile-account-section.feature.test.tsx
  • packages/mosaic/src/features/user-profile/user-profile-account-section/user-profile-add-email.dialog.tsx
  • packages/mosaic/src/features/user-profile/user-profile-passkeys-section/__tests__/user-profile-passkeys-cleanup.feature.test.tsx
  • packages/mosaic/src/features/user-profile/user-profile-passkeys-section/__tests__/user-profile-passkeys-lifecycle.feature.test.tsx
  • packages/mosaic/src/features/user-profile/user-profile-passkeys-section/__tests__/user-profile-passkeys-section.feature.test.tsx

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@pkg-pr-new

pkg-pr-new Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10174

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10174

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10174

@clerk/expo

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

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10174

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10174

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10174

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: c6f7f7d

@alexcarpenter
alexcarpenter enabled auto-merge (squash) October 9, 2026 17:02
@alexcarpenter
alexcarpenter merged commit 2509167 into main Oct 9, 2026
50 checks passed
@alexcarpenter
alexcarpenter deleted the carp/mosaic-feature-test-flakes branch October 9, 2026 17:04

This branch was successfully deployed

2 active deployments
Preview – swingset — c6f7f7d9 Deployed Oct 9, 2026 by vercel[bot]
Preview – clerk-js-sandbox — c6f7f7d9 Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants