You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will place images currently in `src/__image_snapshots__` based on the stories described in storybook stories.
17
+
18
+
If any of the files are changed (e.g. related styles in `styles.css`) the related test may break (depending on the threshold of the difference check) and there will be an additional folder with the visual diff of the base and the new images in `src/__image_snapshots__/__diff_output__`.
19
+
20
+
### For dev
21
+
22
+
Webpack dev server (with live reload)
23
+
```
24
+
npm start
25
+
```
26
+
27
+
Storybook (with live reload)
28
+
```
29
+
npm run storybook
30
+
```
31
+
32
+
### Notes
33
+
34
+
`test/jest.setup.js` runs only on desktop (via puppeteer) by default, device emulation (apple and android devices) can be added if the commented part at the bottom is uncommented.
35
+
After this device emulation is added the device related image snapshots will contain the suffix of the device name.
36
+
This way e.g. media-queries can be checked or device related functionality (code based on UA, etc).
37
+
38
+
Because I wanted to keep it light everything is very basic and currently only `.css` files are supported.
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
0 commit comments