Comments (16)
does expect(page).to look_like("Profile", fuzz_factor: 15)
work?
Checking the rspec tests that looks like the syntax you are looking for - let me know!
from motion-juxtapose.
Just tried it and unfortunately its still failing with a very minor differences between the two screen shots. Any other ideas.
from motion-juxtapose.
I'd try a higher percent. passing in 100 will make an image pass if they are the same size but completely different. so 15% differential may still be below the change threshold you are looking at. I remember discussing the fuzz factor at the #inspect conference, and I believe people were talking about using 85% or so for the fuzz factor, so that the clock on an iphone didnt fail - not sure if thats too much and then will loose the things you are going to test...but my gut says play with this number and see if it impacts your test. Go with 100, make sure that passes, then go down from there 👍
If you have a sample repo I could give it a look too, I've never used juxtapose with a rails app, so I am just throwing out ideas but I bet we can track it down. If i have time later this evening or tomorrow morning Ill throw together a quick app to see if i can reproduce this (assuming you dont have a public repo I can just clone)
from motion-juxtapose.
I usually use 4% on RubyMotion iOS.
from motion-juxtapose.
...so i was totally wrong on the percent, I was going to tag you @jamonholmgren for clarity :)
from motion-juxtapose.
I watch this repo, so I saw it. :)
from motion-juxtapose.
Looked through the source code and can't find a way around this:
Is fuzz_factor included for capybara specs?
from motion-juxtapose.
I'll dig around. Or maybe @thegreatape can answer quicker! :)
from motion-juxtapose.
@squidpunch Thanks!
from motion-juxtapose.
@zberkom pretty sure fuzz_factor isnt setup in rails
https://github.com/terriblelabs/motion-juxtapose/blob/master/lib/juxtapose/rspec.rb#L4-L5
want to throw together a PR for it? I can do it probably sometime after the weekend but I'd gladly review one if you want to work it out before then :)
from motion-juxtapose.
@zberkom pretty sure I have a working fix put together for you. I just want to have @thegreatape review the PR before we merge/release!
you could test this out locally if you wanted by updating your gemfile as the following....
gem "motion-juxtapose", github: "squidpunch/motion-juxtapose", branch: "working-with-rails-matcher"
it would be great to let me know if that fixes your problem - my quick sample app seemed to allow me to use the fuzz factor, but like I said before, I had never used this gem in rails previously.
from motion-juxtapose.
once its merged and released, you can go back to the rubygems released version - but it would be great to verify this is a working fix on your project as well, and I am not overlooking something.
from motion-juxtapose.
@squidpunch fuzz_factor seems to be working, but only if I put it at 80-90, otherwise it still throws errors for minor differences. Btw. thanks for looking into this for me!
from motion-juxtapose.
@zberkom I'll change up this PR to not include the require stuff, and get this merged. Thanks for reporting it - as far as the percentage you need to use....this is simply being passed down to imagemagick on how they handle the fuzz. I wouldnt expect it to be so high, but at least you have a way to get it working, and maybe there is a way to enhance fuzz a bit more in a future change if someone has time to dive a bit more into how imagemagick actually works :)
from motion-juxtapose.
@zberkom releasing momentarily!
from motion-juxtapose.
@squidpunch Great, thanks!
from motion-juxtapose.
Related Issues (18)
- Fail loudly if ImageMagick is not installed
- Cleanup task to remove all screenshots not currently used
- Scroll bar causing intermittent failure HOT 3
- Rails gem like this? HOT 4
- Screenshots are different sizes (even though they aren't) HOT 3
- Two identical screenshots not being matched HOT 3
- Escape certain characters in the file path
- Support for device_name HOT 11
- Improve error messages HOT 1
- Failures when simulator is in non-portrait orientation HOT 1
- In Rails/Ember.js app, screenshots are not fully loaded
- Add support for web-front end examining multiple directories of screenshots HOT 1
- Don't require ios_version to be implemented in app_delegate
- Show changed screenshots since master HOT 1
- handle mismatched screenshot sizes gracefully HOT 1
- If your screenshot name has the word "current" in it, juxtapose's webui gets confused.
- Add Frank steps that can be imported instead of just an example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from motion-juxtapose.