Skip to content

test(mosaic): fix flaky invitation revoke feature tests - #10178

Merged
alexcarpenter merged 1 commit into
mainfrom
alex/fix-invitation-revoke-alert-flake
Oct 9, 2026
Merged

alexcarpenter merged 1 commit into
mainfrom
alex/fix-invitation-revoke-alert-flake

Conversation

@alexcarpenter

Copy link
Copy Markdown
Member

Description

Fixes a flake in organization-profile-invitations.feature.test.tsx › "keeps the dialog open with the server message when the invitation is no longer pending" (failed on #10177's CI: alert found, but with empty text).

Card.Banner always renders its role="alert" wrapper, empty until a message arrives, so findByRole('alert') can resolve on the empty region and the text assertion then fails without retrying. The two invitation-revoke assertions and one members-panel assertion that used this pattern now use waitFor(() => expect(getByRole('alert')).toHaveTextContent(...)), the pattern used elsewhere in the suite.

This was meant to land with #10177, which merged before it was pushed.

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: test fix

@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 7:13pm UTC
swingset Ready Ready Preview Oct 9, 2026 7:13pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 236b82c

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

@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

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: Team
  • Run ID: f6041f5e-59e2-4201-a25f-0d959d71b22b

📥 Commits

Reviewing files that changed from the base of the PR and between 5ad6a2f and 236b82c.


📒 Files selected for processing (3)
  • .changeset/fix-invitation-revoke-alert-flake.md
  • packages/mosaic/src/features/organization-profile/__tests__/organization-profile-invitations.feature.test.tsx
  • packages/mosaic/src/features/organization-profile/__tests__/organization-profile-members-panel.feature.test.tsx

🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:


Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.



📝 Walkthrough

Walkthrough

Three organization-profile failure tests now use waitFor to check error-alert text. The expected messages and subsequent state checks remain unchanged. An added changeset file contains two YAML document delimiters with no content between them.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Suggested reviewers: austincalvelage


Merge Risk: ⚪ Minimal · up to 236b8

This test-only change waits for the expected error messages while retaining the related state checks. The empty changeset is valid for a change that does not require a package release; no actionable merge risk remains.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely identifies the main change: fixing flaky Mosaic invitation revoke feature tests.
Description check Passed The description directly explains the flaky alert assertion, the affected tests, and the switch to waiting for the expected alert text.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.


  • 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@10178

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 236b82c

@alexcarpenter
alexcarpenter merged commit 7b5f2c2 into main Oct 9, 2026
51 checks passed
@alexcarpenter
alexcarpenter deleted the alex/fix-invitation-revoke-alert-flake branch October 9, 2026 19:37

This branch was successfully deployed

2 active deployments
Preview – swingset — 236b82c6 Deployed Oct 9, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 236b82c6 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