Skip to content

chore: Visual regression testing#1858

Draft
gabriellsh wants to merge 53 commits intomainfrom
chore/visualRegressionTesting
Draft

chore: Visual regression testing#1858
gabriellsh wants to merge 53 commits intomainfrom
chore/visualRegressionTesting

Conversation

@gabriellsh
Copy link
Member

@gabriellsh gabriellsh commented Feb 5, 2026

Proposed changes (including videos or screenshots)

TODO:

  • Verify CD pipeline
  • Fix docker build cache
  • Make this available as a "package" (tools)

Added visual-regression tests for fuselage package.

This includes a docker setup necessary to ensure that the screenshots taken in different OSes match.

To run it:
yarn && yarn build
yarn workspace @rocket.chat/fuselage visual-regression

WARNING: Docker engine is required and has to be active when running the tests

To update the snapshots, ensure all packages have their dependencies installed and all packages are built, then run:
yarn workspace @rocket.chat/fuselage visual-regression-update

Issue(s)

Further comments

Unfortunately it's currently impossible to implement these tests without using a docker container. Differences between OSes cause a lot of different issues, specially regarding font rendering/kerning. A lot of time was invested during this implementation trying to find a solution, but fonts never match (most of the times it's a 1px difference in the text positioning).

Three new scripts where added, one to run the tests locally, one to update the snapshots locally, and one to run the tests on the CI. The CI script visual-regression-ci requires "build-storybook" to have been ran before the tests can be ran. It was made this way in order to optimize the CI and avoid building the storybook packages multiple times during the pipeline.

@changeset-bot
Copy link

changeset-bot bot commented Feb 5, 2026

⚠️ No Changeset found

Latest commit: 45a3fe4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@gabriellsh gabriellsh force-pushed the chore/visualRegressionTesting branch from 673cd78 to 53b1b0f Compare February 11, 2026 14:17
@gabriellsh gabriellsh force-pushed the chore/visualRegressionTesting branch from 53b1b0f to 801f85d Compare February 11, 2026 15:25
@gabriellsh gabriellsh marked this pull request as draft February 16, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant