Title: Test | UX | Storybook snapshot testing (build-over-build) for regression prevention · Issue #444 · coder/coder · GitHub
Open Graph Title: Test | UX | Storybook snapshot testing (build-over-build) for regression prevention · Issue #444 · coder/coder
X Title: Test | UX | Storybook snapshot testing (build-over-build) for regression prevention · Issue #444 · coder/coder
Description: Overview In our CI, we run yarn storybook:build to try and vet some issues where the storybook stories get out of sync with the codebase: coder/.github/workflows/coder.yaml Line 276 in 97399f8 - name: Build Storybook However, it seems li...
Open Graph Description: Overview In our CI, we run yarn storybook:build to try and vet some issues where the storybook stories get out of sync with the codebase: coder/.github/workflows/coder.yaml Line 276 in 97399f8 - na...
X Description: Overview In our CI, we run yarn storybook:build to try and vet some issues where the storybook stories get out of sync with the codebase: coder/.github/workflows/coder.yaml Line 276 in 97399f8 - na...
Opengraph URL: https://github.com/coder/coder/issues/444
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Test | UX | Storybook snapshot testing (build-over-build) for regression prevention","articleBody":"## Overview\r\n\r\nIn our CI, we run `yarn storybook:build` to try and vet some issues where the storybook stories get out of sync with the codebase:\r\nhttps://github.com/coder/coder/blob/97399f888de03af1339a8523216820f9933386fc/.github/workflows/coder.yaml#L276\r\n\r\nHowever, it seems like this isn't sufficient - as several errors cropped up in storybook: #443 \r\n\r\nIn v1, we used the [Chromatic](https://chromatic.com) to validate our stories stayed consistent build-over-build - having a tool like that integrated into our CI again would catch these sorts of failures in the future.\r\n\r\n## Current behavior\r\n\r\nWe do not have visual snapshot testing of our Storybook\r\n\r\n## V1 behavior\r\n\r\nIn V1 we had a free version of Chromatic and used it successfully. However, when the free tier usage runs up, it was holding our CI hostage, so we temporarily suppressed it. We need to get an enterprise plan approval and update our pipeline for it.\r\n\r\nFurthermore, we noticed that some components (example a component that purposefully threw an error) would have false positives. They were addressed by suppressing Chromatic like this:\r\n\r\n```ts\r\nexport const ShowingError = Template.bind({})\r\nShowingError.parameters = {\r\n // The FallbackDialog is noisy for chromatic, because it renders an actual error\r\n // along with the stacktrace - and the stacktrace includes the full URL of\r\n // scripts in the stack. This is problematic, because every deployment uses\r\n // a different URL, causing the validation to fail.\r\n chromatic: { disableSnapshot: true },\r\n}\r\n```\r\n\r\n## Desired behavior\r\n\r\nWe have visual snapshot testing of our Storybook\r\n\r\n## Implementation details\r\n\r\nWe prefer using [Chromatic](https://www.chromatic.com/) because it's recommended by [Storybook](https://storybook.js.org/docs/react/writing-tests/visual-testing)","author":{"url":"https://github.com/bryphe-coder","@type":"Person","name":"bryphe-coder"},"datePublished":"2022-03-15T18:21:09Z","url":"https://github.com/coder/coder/issues/444"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ebd9540c-44c5-dd57-ab27-766168ffe5ac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF9A:14ECB:28BBDDE:33C33A3:6B019FEE |
| html-safe-nonce | e48d57d61c6e35f92eda48227705f49ebc4373333e8836e05b6cb191c55a1f17 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjlBOjE0RUNCOjI4QkJEREU6MzNDMzNBMzo2QjAxOUZFRSIsInZpc2l0b3JfaWQiOiI1MzU2NDMwMDk4MDU4ODEzNDIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0277ae89918cddad842c5b92b1cff99ae0a39e9dae2ffdd597be2ccaaecbc24f |
| hovercard-subject-tag | issue:1170027490 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/coder/coder/444/issue_layout |
| twitter:image | https://opengraph.githubassets.com/dd59909e406860eadd1de4f2a89d6fc343ca8589ed656898ec6a312a07845047/coder/coder/issues/444 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/dd59909e406860eadd1de4f2a89d6fc343ca8589ed656898ec6a312a07845047/coder/coder/issues/444 |
| og:image:alt | Overview In our CI, we run yarn storybook:build to try and vet some issues where the storybook stories get out of sync with the codebase: coder/.github/workflows/coder.yaml Line 276 in 97399f8 - na... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bryphe-coder |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/coder/coder git https://github.com/coder/coder.git |
| octolytics-dimension-user_id | 95932066 |
| octolytics-dimension-user_login | coder |
| octolytics-dimension-repository_id | 440752086 |
| octolytics-dimension-repository_nwo | coder/coder |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 440752086 |
| octolytics-dimension-repository_network_root_nwo | coder/coder |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width