Last active
April 8, 2018 10:20
-
-
Save hanneskaeufler/28bd5cf945630b04f943f4ef7c90453d to your computer and use it in GitHub Desktop.
Using BackstopJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install backstopjs locally | |
yarn add backstopjs | |
# Setup folders, configuration etc. | |
./node_modules/.bin/backstopjs init | |
# Edit backstop.json to configure the viewports you want to test on. | |
# I use the following: | |
# "viewports": [ | |
# { | |
# "label": "phone", | |
# "width": 320, | |
# "height": 480 | |
# }, | |
# { | |
# "label": "tablet", | |
# "width": 1024, | |
# "height": 768 | |
# }, | |
# { | |
# "label": "desktop", | |
# "width": 2880, | |
# "height": 1800 | |
# } | |
# ] | |
# Define some pages you want to visit/compare, e.g. | |
# "scenarios": [ | |
# { | |
# "label": "Blog Index", | |
# "url": "http://localhost:5000" | |
# } | |
# Finally run backstop tests to go ahead and capture first set of images | |
./node_modules/.bin/backstop test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment