Last active
June 6, 2019 18:03
-
-
Save pgwillia/0769c420da87888e4c8a17ebbe64cc4a to your computer and use it in GitHub Desktop.
wraith for visual comparison
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
cd discovery | |
git checkout master | |
bundle exec rails s & | |
wraith history discovery.yml | |
fg | |
git checkout upgrade_bootstrap | |
bundle exec rails s & | |
wraith latest discovery.yml |
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
############################################################## | |
############################################################## | |
# This particular config is intended to demonstrate how | |
# to use Wraith in 'history' mode, which is best suited to | |
# making sure your site's appearance remains consistent over | |
# time. | |
# | |
# `wraith history history.yaml` # generate base screenshots | |
# `wraith latest history.yaml` # take new shots and compare | |
# | |
############################################################## | |
############################################################## | |
# (required) The engine to run Wraith with. Examples: 'phantomjs', 'casperjs', 'slimerjs' | |
browser: "phantomjs" | |
# (required) The domain to take screenshots of. | |
domains: | |
discovery: "http://localhost:3000" | |
# (required) Screen widths (and optional height) to resize the browser to before taking the screenshot. | |
screen_widths: | |
- 375x667 | |
- 768x1024 | |
- 360x640 | |
- 414x736 | |
- 375x812 | |
- 320x568 | |
- 360x740 | |
- 414x896 | |
- 412x846 | |
- 834x1112 | |
- 1280x950 | |
- 1440x900 | |
- 1920x1080 | |
paths: | |
home: / | |
advanced: /advanced | |
catalog: /?q=shakespeare | |
bookmarks: /bookmarks | |
finding_aid: /catalog/4072071 | |
email: /catalog/email?id=4072071 | |
citation: /catalog/citation?id=4072071 | |
journal: /catalog/954921332003 | |
# (required for history mode, otherwise optional) The directory that your base screenshots will be stored in. | |
history_dir: 'shots_base' | |
# (required) The directory that your latest screenshots will be stored in | |
directory: 'shots' | |
# (required) Amount of fuzz ImageMagick will use when comparing images. A higher fuzz makes the comparison less strict. | |
fuzz: '20%' | |
threshold: 5 | |
mode: diffs_first | |
# (optional) Choose to run Wraith in verbose mode, for easier debugging. Default: false | |
verbose: true | |
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
source 'https://rubygems.org' | |
gem 'wraith' |
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
sudo apt-get install phantomjs | |
bundle install | |
wraith setup |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment