{"id":20186102,"url":"https://github.com/leolanese/angular-storybook-chromatic-cdd","last_synced_at":"2026-05-01T22:35:29.921Z","repository":{"id":236263961,"uuid":"792256708","full_name":"leolanese/Angular-Storybook-Chromatic-CDD","owner":"leolanese","description":"Chromatic is a Visual Regression Test Suit: It can be used to test UI changes in Storybook. take snapshots before and after pushing, and make a comparison automaticly  It lets them visually tests stories automatically and publish their Storybook for others to reference. QA can often feel like the world's longest game of \"spot the difference\"","archived":false,"fork":false,"pushed_at":"2024-04-28T09:12:52.000Z","size":1189,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-13T03:33:21.543Z","etag":null,"topics":["angular","chromatic","github-actions","storybook"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leolanese.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-26T09:44:21.000Z","updated_at":"2025-08-14T09:42:05.000Z","dependencies_parsed_at":"2024-04-26T10:56:29.991Z","dependency_job_id":null,"html_url":"https://github.com/leolanese/Angular-Storybook-Chromatic-CDD","commit_stats":null,"previous_names":["leolanese/angular-storybook-chromatic-cdd"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leolanese/Angular-Storybook-Chromatic-CDD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular-Storybook-Chromatic-CDD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular-Storybook-Chromatic-CDD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular-Storybook-Chromatic-CDD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular-Storybook-Chromatic-CDD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leolanese","download_url":"https://codeload.github.com/leolanese/Angular-Storybook-Chromatic-CDD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leolanese%2FAngular-Storybook-Chromatic-CDD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32515838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","chromatic","github-actions","storybook"],"created_at":"2024-11-14T03:16:00.972Z","updated_at":"2026-05-01T22:35:29.901Z","avatar_url":"https://github.com/leolanese.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angular 17+, Storybook and Chromatic - CDD\n\n\u003e Chromatic is a Visual Regression Test Suit: It can be used to test UI changes in Storybook.\n take snapshots before and after pushing, and make a comparison automaticly\n\n\u003e It lets them visually tests stories automatically and publish their Storybook for others to reference. QA can often feel like the world's longest game of \"spot the difference\"\n\n## SETUP\n\n```js\n// create new angular project\nng new Angular-Storybook-Chromatic-CDD\n\n// Initialize Storybook in your project\nnpx sb init\n```\n\n## Up to this point, we should have\n\n- Angular App running:\nlocalhost:4200\n\n- StoryBook running:\nlocalhost:6006\n\n![Angular and Storbook Deployed](./src/app/assets/AngularAndStorybookDeployed.png)\n\n- Chromatic running:\nhttps://www.chromatic.com/start\n\n- Setup a new project in a Repo (I used gitHub)\nThen `Choose your Project` from Chromatic and select the repo:\nhttps://github.com/leolanese/Angular-Storybook-Chromatic-CDD\n\n## Publish Angular-Storybook-Chromatic-CDD's Storybook (Before screenshot)\n\n```js\n// Get the Chromatic package\nnpm install --save-dev chromatic\n\n// Publish your Storybook (using your token provied by Chromatic)\nnpx chromatic --project-token=chpt_XXXXXXXXXXXXXXXXX\n\n// No 'chromatic' script found in your package.json\n// selection 'Y' to add in the package.json\n// \"chromatic\": \"npx chromatic --project-token=chpt_XXXXXXXXXXXXXXXXX\"\n```\n\n## Back to chromatic.com\nNow,  you should see a new published Storybook\n\n## Getting into Action! (After screenshot)\nNow Click: `Catch a UI change` to Spot UI changes\n\n```js\n//  src/stories/Header.components\nLet's make a simply change: `Welcome` with `TEST`\n\ngit add --all; git commit -m 'Modified Header for testing'; git push\n\n// Run the test publish command again to upload your UI tweaks and have Chromatic catch your changes\nyarn chromatic\n```\n\n![Chromatic change reported](./src/app/assets/componentChanged.png)\n\n## Verify UI change\n\n![Verify UI changes](./src/app/assets/VerifyUIChanges.png)\n\n- Consultation with the Team + Resolving and mergin!\n\n\n## Publish Storybook with CI/CD Setup\n\n\u003e We will add Chromatic to out Ci/CD pipeline to automaticly publish Storybook when push\n\n## Add Chromatic to your CI/CD pipeline\n\n```js\n//  Add a chromatic script to your package.json and replace it with\n\"scripts\": {\n  \"chromatic\": \"chromatic --project-token CHROMATIC_PROJECT_TOKEN --exit-zero-on-changes\"\n}\n```\n\n## GitHub Action for Chromatic. Workflow setup\n\n```js\n// .github/workflow/chromatic.yml\nname: 'Chromatic'\non: push\n\njobs:\n  test:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v1\n      - run: yarn\n      - uses: chromaui/action@v1\n        with:\n          token: ${{ secrets.GITHUB_TOKEN }}\n          projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}\n```\n\n## Project token secret  in our repo\n\nTo securely provide the projectToken to Chromatic, you must configure a GitHub repository secret. First, find your project on Chromatic.com and go to Manage and then Configure.\n\n```js\nCHROMATIC_PROJECT_TOKEN + Project Token (provied by Chromatic)\n```\n\n- LINK:\nhttps://github.com/leolanese/Angular-Storybook-Chromatic-CDD/settings/secrets/actions\n\n![Repository Secrets](./src/app/assets/RepositorySecrets.png)\n\n- LINKS\nhttps://www.chromatic.com/docs/github-actions/\n\n\n\u003e Now, we should see the Action running in GitHub!\n\n## Chromatic `Reviews` (Approving) Step in CI/CD\n\n\u003e Click on left side bar `Reviews` on Chromatic, and then Install Chromatic on GitHub` then click Create review` this will add a new step in the Ci/CD pipeline, assign reviewers, etc. Now, chromatic will handle the PR process\n\n\u003e These needs to work with branching strategy\n\n![reviewing](./src/app/assets/Reviewing.png)\n\n## Sharing\n\nNow, lets share the UI with the team! (This helps your team review components online, see past versions, and get feedback on work in progress) using Chromatic\n\n- LINK\nhttps://www.chromatic.com/library?appId=662b7879acac0fd117443368\n\n---\n\nThis project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.2.3.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.\n\n---\n\n### :100: \u003ci\u003eThanks!\u003c/i\u003e\n#### Now, don't be an stranger. Let's stay in touch!\n\n\u003ca href=\"https://github.com/leolanese\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\n  \u003cimg src=\"https://scastiel.dev/api/image/leolanese?dark\u0026removeLink\" alt=\"leolanese’s GitHub image\" width=\"600\" height=\"314\" /\u003e\n\u003c/a\u003e\n\n##### :radio_button: Linkedin: \u003ca href=\"https://www.linkedin.com/in/leolanese/\" target=\"_blank\"\u003eLeoLanese\u003c/a\u003e\n##### :radio_button: Twitter: \u003ca href=\"https://twitter.com/LeoLanese\" target=\"_blank\"\u003e@LeoLanese\u003c/a\u003e\n##### :radio_button: Portfolio: \u003ca href=\"https://www.leolanese.com\" target=\"_blank\"\u003ewww.leolanese.com\u003c/a\u003e\n##### :radio_button: DEV.to: \u003ca href=\"https://www.dev.to/leolanese\" target=\"_blank\"\u003edev.to/leolanese\u003c/a\u003e\n##### :radio_button: Blog: \u003ca href=\"https://www.leolanese.com/blog\" target=\"_blank\"\u003eleolanese.com/blog\u003c/a\u003e\n##### :radio_button: Questions / Suggestion / Recommendation: developer@leolanese.com\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleolanese%2Fangular-storybook-chromatic-cdd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleolanese%2Fangular-storybook-chromatic-cdd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleolanese%2Fangular-storybook-chromatic-cdd/lists"}