Skip to content

test(mosaic): fix flaky profile picture and invitation revoke feature tests - #10177

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

alexcarpenter merged 1 commit into
mainfrom
alex/fix-profile-section-alert-flake

Conversation

@alexcarpenter

@alexcarpenter alexcarpenter commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes a flake in user-profile-profile-section.feature.test.tsx › "replaces a rejected pick with why removing the picture failed".

The test waits for the "Manage profile picture" button after the first upload, then uploads an oversized file. FileUpload.Root is disabled while an upload is pending, so if the button appears before the first upload settles, the second pick is ignored and no alert shows (likely cause; not observed directly). The test now also waits for the file input to be enabled before the second pick.

Before: failed on #10153's CI and in 3 of 6 local full feature-suite runs. After: 6 of 6 local full runs pass.

Also 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 this PR's CI). 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 fails without retrying. The two invitation-revoke assertions and one members-panel assertion now use waitFor(() => expect(getByRole('alert')).toHaveTextContent(...)), the pattern used elsewhere in the suite.

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

Request Review

@changeset-bot

changeset-bot Bot commented Oct 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6af309f

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

@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 →

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: f41b45c6-6be9-44f7-bd51-d8845455efdf

📥 Commits

Reviewing files that changed from the base of the PR and between 4636f3c and 6af309f.


📒 Files selected for processing (2)
  • .changeset/fix-profile-section-alert-flake.md
  • packages/mosaic/src/features/user-profile/user-profile-profile-section/__tests__/user-profile-profile-section.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; 2 remain after this review.



📝 Walkthrough

Walkthrough

The profile-picture test now waits for the file input to become enabled after uploading a picture and seeing the manage-picture button. The changeset file gains two YAML document delimiters with no content between them.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes


Merge Risk: ⚪ Minimal · up to 6af30

The test now waits for the first upload to finish before making the second pick, addressing the reported flake. No actionable merge risk remains.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
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 1…
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.
Description check Passed The description directly explains the flaky profile picture rejection test and the added wait for the file input to become enabled.
Title check Passed The title clearly and concisely identifies the test fix for the flaky profile picture rejection feature test.


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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

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

@clerk/electron-passkeys

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

@clerk/eslint-plugin

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

@clerk/expo

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

@clerk/expo-biometrics

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

@clerk/expo-google-signin

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

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

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

@clerk/localizations

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

@clerk/mosaic

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: 6af309f

@alexcarpenter
alexcarpenter merged commit 5ad6a2f into main Oct 9, 2026
52 of 53 checks passed
@alexcarpenter
alexcarpenter deleted the alex/fix-profile-section-alert-flake branch October 9, 2026 19:09
@alexcarpenter alexcarpenter changed the title test(mosaic): fix flaky profile picture rejection feature test test(mosaic): fix flaky profile picture and invitation revoke feature tests Oct 9, 2026

This branch was successfully deployed

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