Repository navigation
test(mosaic): add screenshot testing POC - #10451
austincalvelage wants to merge 8 commits into
Conversation
🦋 Changeset detectedLatest commit: 29d69f1 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.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-biometrics
@clerk/expo-google-signin
@clerk/expo-native-components
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
This is awesome, always found visual tests to be a bit flaky, mostly comes from the rendering environment, so maybe we:
I haven't run the suite; these come from reading the code. |
e181368 to
126db7e
Compare
126db7e to
ac036f8
Compare
Description
Token changes can alter text, borders, and layout without failing behavior tests. Add six Mosaic screenshot tests covering both open switchers, the Account overlay in light, dark, and narrow layouts, and an edit-name form with banner and field errors.
Local commands and CI use the same digest-pinned Playwright 1.62.1 Docker image on Linux amd64. The suite bundles Inter, waits for its fonts, disables CSS motion, hides carets, and checks the narrow profile content for horizontal overflow. Only Linux baselines are kept.
Run
pnpm --filter @clerk/mosaic test:visualto compare. Runpnpm --filter @clerk/mosaic test:visual:updateto replace baselines, then review and commit the images. Both commands require Docker and isolate Linux dependencies from the host checkout.The CI comparison is advisory during rollout. Image-build failures still fail the job. Screenshot failures upload reference, actual, and diff images for seven days. The first container comparison caught all six font changes and uploaded its diffs while the job remained green. Review repeated runs at the same commit before making comparisons required. All six comparisons pass in the latest Linux comparison check. The initial rollout also passed twice at the same commit.
Container baselines and the original token-change check
The original POC also caught a temporary secondary-text token change. That change was reverted.
Checklist
pnpm testruns as expected for Mosaic.pnpm buildruns as expected for Mosaic and its dependencies.Type of change