test(e2e): mosaic UserButton e2e test coverage - #9357
Conversation
🦋 Changeset detectedLatest commit: ed9d51e The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@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: |
API Changes Report
Summary
@clerk/testingCurrent version: 2.2.21 Subpath
|
5ec39b1 to
131de8b
Compare
131de8b to
8eabd89
Compare
c75a156 to
7dc64a4
Compare
7dc64a4 to
32a01a7
Compare
16961ae to
265a401
Compare
265a401 to
6af9f14
Compare
384c19a to
b59d9de
Compare
b59d9de to
31d8388
Compare
31d8388 to
dbb70e6
Compare
dbb70e6 to
6c54966
Compare
6c54966 to
f9b1c7d
Compare
The mocked vitest suite already owns every rendered surface and every outbound call. These assert only what it cannot reach: whether Clerk acted on the call, whether the server sees the result, whether clerk-js renders into the DOM the Mosaic tree hands it, and that the app resolves the entry with no @clerk/ui installed.
Six failures the first real run surfaced: - The page used SignedIn/SignedOut, which @clerk/nextjs does not export. Show with when='signed-in' is the current API. - The popup selector matched on substring, so 'Account' also matched clerk-js's 'Account panel'. Exact now. - The only organization is already active on sign-in, so its row is the current item rather than a button. Personal is selected first, then the organization. - Manage account lives behind the account row's actions menu, not on the popup. - The inflated 90s/180s timeouts were compensating for a stale local registry, not real slowness. Back to the repo default.
`useUserProfilePages` hardcodes the UserProfile's built-in page list as a mirror of clerk-js, and nothing at any level asserted the mirror was accurate. `openOrNavigate` was covered only by asserting `navigate` was called with a string, never that the app landed there.
Description
Stacked on #9338.
The experimental Mosaic
UserButtonhad no integration coverage. The vitest suite inpackages/ui/src/mosaic/user-button/__tests__/already covers every rendered surface and every outbound call with its exact arguments, against a mocked Clerk. None of that is repeated here. This adds only what the mock cannot observe:Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change