Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating history base hangs when used in 'reload' mode #437

Open
3 tasks done
ertrzyiks opened this issue May 18, 2016 · 0 comments
Open
3 tasks done

Creating history base hangs when used in 'reload' mode #437

ertrzyiks opened this issue May 18, 2016 · 0 comments

Comments

@ertrzyiks
Copy link

I've copied example history.yml generated with wraith setup. After changing resize_or_reload to reload (default value), wraith history process hung, but works when used with resize. I've read notice regarding performance of 'reload', but it's just one page and it hung on first resolution for at least ten minutes.

Issue checklist:

  • I have validated my config file against YAML Validator to make sure it is valid YAML.
  • I have run the command in verbose mode (by adding verbose: true to my config) and pasted the output below:
Mateuszs-MacBook-Pro:platform mateuszderks$ wraith history wraith/history.yaml 
DEBUG: #################################################
DEBUG:   Command run:        history wraith/history.yaml
DEBUG:   Wraith version:     3.2.0
DEBUG:   Ruby version:       ruby 2.2.4p230 (2015-12-16 revision 53155) [x86_64-darwin15]

DEBUG:   ImageMagick:        Version: ImageMagick 6.9.3-7 Q16 x86_64 2016-03-27 http://www.imagemagick.org

DEBUG:   PhantomJS version:  2.1.1

DEBUG:   CasperJS version:   1.1.0-beta4

DEBUG: #################################################
DEBUG: 
Config validated. No serious issues found.
Creating Folders
SAVING IMAGES
DEBUG: casperjs  '/Users/mateuszderks/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/wraith-3.2.0/lib/wraith/javascript/casper.js' 'http://localhost:3000/' '320' 'shots/homepage/320_casperjs_local.png' 'body' 'false' 'false'
DEBUG: casperjs  '/Users/mateuszderks/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/wraith-3.2.0/lib/wraith/javascript/casper.js' 'http://localhost:3000/' '600x768' 'shots/homepage/600x768_casperjs_local.png' 'body' 'false' 'false'
DEBUG: casperjs  '/Users/mateuszderks/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/wraith-3.2.0/lib/wraith/javascript/casper.js' 'http://localhost:3000/' '768' 'shots/homepage/768_casperjs_local.png' 'body' 'false' 'false'
DEBUG: casperjs  '/Users/mateuszderks/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/wraith-3.2.0/lib/wraith/javascript/casper.js' 'http://localhost:3000/' '1024' 'shots/homepage/1024_casperjs_local.png' 'body' 'false' 'false'
DEBUG: casperjs  '/Users/mateuszderks/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/wraith-3.2.0/lib/wraith/javascript/casper.js' 'http://localhost:3000/' '1280' 'shots/homepage/1280_casperjs_local.png' 'body' 'false' 'false'
Snapping http://localhost:3000/ at: 600x768

  • I have pasted the contents of my config file below:
##############################################################
##############################################################
# This is an example configuration provided by Wraith.
# Feel free to amend for your own requirements.
# ---
# 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: "casperjs"

# (required) The domain to take screenshots of.
domains:
  local: "http://localhost:3000"

# before_capture: 'wraith/javascripts/before_each.js'

# (required) The paths to capture. This particular config is using casperjs, so we can take screenshots of selectors rather than the entire page.
paths:
  homepage:
    path: /

# (required) Screen widths (and optional height) to resize the browser to before taking the screenshot.
screen_widths:
  - 320
  - 600x768
  - 768
  - 1024
  - 1280

# (optional) Resize to each screen width (efficient), or reload at each screen width (costly). Default: 'reload'
resize_or_reload: 'reload'

# (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%'

# (optional) The maximum acceptable level of difference (in %) between two images before Wraith reports a failure. Default: 0
threshold: 5

# (optional) Specify the template (and generated thumbnail sizes) for the gallery output.
gallery:
  template: 'slideshow_template' # Examples: 'basic_template' (default), 'slideshow_template'
  thumb_width:  200
  thumb_height: 200

# (optional) Choose which results are displayed in the gallery, and in what order. Default: alphanumeric
# Options:
#   alphanumeric - all paths (with or without a difference) are shown, sorted by path
#   diffs_first - all paths (with or without a difference) are shown, sorted by difference size (largest first)
#   diffs_only - only paths with a difference are shown, sorted by difference size (largest first)
# Note: different screen widths are always grouped together.
mode: diffs_first

# (optional) Choose to run Wraith in verbose mode, for easier debugging. Default: false
verbose: true

# (optional) Color to highlight the image diff. Default: 'blue'
highlight_color: red
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant