react-styleguidist-visual icon indicating copy to clipboard operation
react-styleguidist-visual copied to clipboard

[feature] skip a visual test

Open DimitarChristoff opened this issue 7 years ago • 3 comments
trafficstars

So, I have a few components that use spinning animations and every time the test runs, it catches the spinner at a different phase, causing false positives.

I would like to be able to skip an example or a particular element from being considered in the screenshots.

DimitarChristoff avatar Jun 11 '18 13:06 DimitarChristoff

The other option (the one we use in our current project) is to disable animations by injecting a CSS file with the following contents:

* {
  animation: none !important;
  transition: none !important;
}

unindented avatar Jun 11 '18 15:06 unindented

I guess this could be possibly implemented by adding custom action type named "skip"

kot-lex avatar Jun 11 '18 17:06 kot-lex

I think the filter argument is for that: https://github.com/unindented/react-styleguidist-visual/blob/master/src/commands/test.js --filter "spinner" "spinner2" or something like that

jkarttunen avatar Jul 06 '18 22:07 jkarttunen