Skip to content

Storyshots does it really checks based on screenshots? #2346

@AlexanderTserkovniy

Description

@AlexanderTserkovniy

Hi guys,

Sorry for bothering you with such a silly question, but I can't make heads of the comparison feature of the addon.

In all the examples (in README.md of Storyshots project and in the Jest snapshot testing) is shown only the process of comparing attributes and text inside a component.

But what about CSS and Styling?

What if I change padding from let's say 16px to 0 I bet the component will change significantly, so what should the snapshot do then? Pass test or fail down? I am 100% that it must fail, because just comparing a screenshot with another screenshot will show the underlying difference.

I mean I have checked it, it really gives:

 PASS  .storybook/storyshots.test.js
  Storyshots
    Button
      ✓ With text (26ms)

I cannot believe that it bothers only me, there must me someone else, who asked the same question.

Thanks for the answering in advance.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions