Open katekligman opened 8 years ago
Hmm, thanks for this. We solved a similar issue with adding/removing paths: #293. I don't think we've ever changed the screen sizes after the initial choice so have not run into this before, but yes, Wraith ought to be able to cope with this!
I am also receiving this issue but I did not remove 320 from screen_widths at all. I got this error when I use PhantomJS and remove the clickable_guide and clickable_guide__after_click:
CROPPING IMAGES /usr/local/lib/ruby/gems/2.1.0/gems/wraith-3.1.2/lib/wraith/crop.rb:48:in `initialize': no implicit conversion of nil into String (TypeError)
And I got this error when I am using the script (history.yml) as is:
GENERATING GALLERY /usr/local/lib/ruby/gems/2.1.0/gems/wraith-3.1.2/lib/wraith/gallery.rb:114:in `each': comparison of NilClass with 0.0 failed (ArgumentError)
Perhaps there is more to it than changing widths?
There's another situation where exactly the same error comes up (regarding crop.rb
): If you're performing a latest
against a history
that happened to have a different list of paths. In my case, I had a sort of complicated setup (which was also CPU intensive) that made it tough to track down:
master
wraith history config.yml
feature-branch
wraith history config.yml
<-- 💣💥Irritating that it'd die on that last step with no explanation for why until I went through all 54 directories (yeah, I have that many VQA regression tests 😄) and found the one that was missing. I keep my config.yml
file checked into git
, so since that differed, wraith
was exploding.
I often suggest Wraith to folks who are new to visual regression testing. I've noticed that when new users experiment with history mode they often run into a couple of similar issues when editing the screen_widths: parameter in their configs. Here are two use cases and steps to reproduce the issues with Wraith 3.1.2 and the default configs.
Wraith will error out with:
GENERATING GALLERY /usr/local/lib/ruby/gems/2.1.0/gems/wraith-3.1.2/lib/wraith/gallery.rb:114:in `each': comparison of NilClass with 0.0 failed (ArgumentError)
Here's slightly different error that happens when the default configs/capture.yaml is used:
Wraith will error out with:
CROPPING IMAGES /usr/local/lib/ruby/gems/2.1.0/gems/wraith-3.1.2/lib/wraith/crop.rb:48:in `initialize': no implicit conversion of nil into String (TypeError)
It seems that the stale 320* files in the history_dir are the cause of the issues. I think that Wraith should be a little smarter if 'wraith history' leaves old baseline files hanging around. :)