Visual Regression Testing with Storybook's Chromatic

Поделиться
HTML-код
  • Опубликовано: 23 янв 2025

Комментарии • 29

  • @HangLe-dk1mq
    @HangLe-dk1mq 4 года назад +4

    thank you for this! You are probably the only one providing Chromatic tutorial at the moment :)

    • @SwashbucklingwithCode
      @SwashbucklingwithCode  4 года назад +1

      I felt like I wasn't seeing enough about this tool. Kinda crazy there isn't more exposure.

    • @blobaiimagium1852
      @blobaiimagium1852 3 года назад

      try imagium.io for Visual testing if you need to make free accurate comparisons Powered by AI

  • @brianlee9898
    @brianlee9898 4 года назад +2

    Thank you very much! Exciting technology from Storybook team! Great tutorial too

  • @prakharmathur619
    @prakharmathur619 3 года назад +1

    WOW it was super helpful. Need more videos on Storybook and Chromatic!!

    • @SwashbucklingwithCode
      @SwashbucklingwithCode  3 года назад +1

      I'll be putting out some more Storybook content in the near future. Thanks for the feedback!

    • @prakharmathur619
      @prakharmathur619 3 года назад +1

      @@SwashbucklingwithCode that's great! Thank you.

  • @grulice
    @grulice Год назад +1

    Thank you very much for leaving the mistakes in. Excellent tutorial!

  • @cody9430
    @cody9430 4 года назад +1

    Great video, thanks for the walkthrough!

  • @LangylangZA
    @LangylangZA 3 года назад +1

    Really well explained, subbed 👌

  • @gimmemoreborisbrejcha9794
    @gimmemoreborisbrejcha9794 3 года назад +3

    Not that I'll use Chromatic, but this was a cool overview of it. At least it gave me some idea how the visual reg. tests would contribute to our development process.

    • @alien6009
      @alien6009 2 месяца назад

      Why is that so? Asking cuz I am researching on this particular topic

  • @principe.borodin
    @principe.borodin 2 года назад

    Greate demonstration....but where is the repository?

  • @AndyPotts0
    @AndyPotts0 2 года назад +1

    What’s the difference between Chromatic’s UI review and UI test? IMO they’re basically the same except UI test can have weird baseline from non merged code, which is confusing and makes it kind of pointless

    • @SwashbucklingwithCode
      @SwashbucklingwithCode  2 года назад

      Really late on this reply, but I had the same question. The main difference is that one is for a pull request, and any additional builds that happen keep that same link so that others in the group can have a conversation around the feature. The UI Tests are for each individual changeset, which often end up being the same on simple PRs. I definitely think there is big room for improvement there.

  • @Chris-ci1xj
    @Chris-ci1xj 3 года назад

    thank you, your tutorial is very clear

  • @benwhite2795
    @benwhite2795 4 года назад +1

    Ugh this is such a basic question but: how do I store the chromatic token in an env variable and access it in package.json? All I can find is how to SET env variables in package.json - help :(

    • @SwashbucklingwithCode
      @SwashbucklingwithCode  4 года назад

      I forgot how long I got stuck on this already. I thought the same thing, it should be very straightforward. What ended up being the best solution for me was to make my package.json script just run "chromatic". Then in my Github Actions or Bitbucket Pipelines config I call that command and pass it the ENV token like so:
      "yarn chromatic --project-token=$CHROMATIC_PROJECT_TOKEN --exit-zero-on-changes --exit-once-uploaded"

  • @biiiiiimm
    @biiiiiimm 2 года назад

    Amazing video thank you !

  • @pacopepe92
    @pacopepe92 3 года назад

    did u add a permalink? i couldn't :(

  • @arjunholmie
    @arjunholmie 3 года назад

    Thanks TJ Miller

  • @ruimendes6517
    @ruimendes6517 3 года назад +1

    Thanks so much for this, great tutorial! Do you know if it's possible to run viewport tests with Chromatic?

    • @SwashbucklingwithCode
      @SwashbucklingwithCode  3 года назад

      Thank you. You can set the viewport for stories and Chromatic will take a screenshot of that.
      I can't recall which repo I had that example in, but if I come across it soon I'll reply with it.

    • @SwashbucklingwithCode
      @SwashbucklingwithCode  3 года назад

      This is some example code:
      export default {
      title: 'Example/InputGroup',
      component: InputGroup,
      parameters: {
      chromatic: { viewports: [360, 1200] },
      }
      }

    • @ruimendes6517
      @ruimendes6517 3 года назад +1

      @@SwashbucklingwithCode Really appreciate your quick help, thanks!

  • @marcustulliuscicero9512
    @marcustulliuscicero9512 2 года назад +1

    This seems very spish :)

  • @jaspreetsidhu1606
    @jaspreetsidhu1606 3 года назад

    Thank you for the video, really helpful. But I got stuck at one point, can you help please.
    I have added the Chromatic project token in Secrets, Added .yml file in workflow and
    updated my package.json as scripts : "chromatic": "npx chromatic " and devdependencies: "chromatic": "^5.8.3"
    But still while I get error in github while setting up for CI:
    Run chromaui/action@v1
    with:
    token: ***
    projectToken: ***
    Chromatic CLI v5.8.3
    www.chromatic.com/docs/cli
    ✖ Build script not found
    The CLI didn't find a script called "build-storybook" in your package.json.
    Make sure you set the --build-script-name option to the value of the script name that builds your Storybook.