DSD-DBS / capella-collab-manager

A web app for collaboration on Capella (MBSE) projects
https://dsd-dbs.github.io/capella-collab-manager/
Apache License 2.0
23 stars 5 forks source link

ci: Use `reg-actions` for visual regression testing #1803

Closed MoritzWeber0 closed 1 month ago

MoritzWeber0 commented 1 month ago

We ran into the monthly limits of Chromatic and even though we've activated Turbosnap, it's likely that we will run into it again. In addition, we don't want to reply on any external service / server.

Therefore, I've researched alternative options and reg-actions for image diffing (+ CI integration) and Storycap for snapshot capturing seems to be the best option. Since we don't have any limitations anymore (except time), I also enabled a mobile viewport (roughly the dimensions of a Pixel 7). The main difference is that Storycap does not clip images automatically - which can also be considered as useful feature (for example, aspect ratios are easier to identify).

Since reg-actions only displays the filename, I enabled a flat file structure and removed whitespaces as separator of folders.

The dialogWrapper has been adapted so that it centers the dialog vertically and horizontally.

Storycap doesn't reload the page after each snapshot, so I've adapted some Stories so that they can reset more easily. This makes navigation in the Storybook UI also easier (before, you sometimes had to reload the page to see a Story). Mainly the auth component is affected, which is also modified to remove a double-subscription.

This will not replace Chromatic entirely, we'll still use it for Storybook publishing.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.18%. Comparing base (62eb891) to head (331d0dc). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1803 +/- ## ======================================= Coverage 84.18% 84.18% ======================================= Files 186 186 Lines 6159 6159 Branches 677 677 ======================================= Hits 5185 5185 Misses 826 826 Partials 148 148 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 254
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 254
github-actions[bot] commented 1 month ago

A Storybook preview is available for commit 1a0fb8094d65cc4ad679ddc4b7ec3f58b61acd73. ➡️ View Storybook ➡️ View Chromatic build ✅ Captured 40 snapshots. No changes detected.

github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 254
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 254
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 254
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 249
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 249
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 242
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 242
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 242
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 242
github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 242
sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

github-actions[bot] commented 1 month ago

ArtifactName: reg

Failed to find a target artifact. All items will be treated as new items and will be used as expected data for the next time.

target not found

item count
new 242