-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Recording too large screenshots produces false-positive results. Can't configure max screenshot size #264
Comments
How big is the screenshot you are taking? |
I don't know how big the screenshot I take is, but I can share it fails here: https://github.com/facebook/screenshot-tests-for-android/blob/cdb5bd36b9be745bb3ba3378bf102815d2165144/core/src/main/java/com/facebook/testing/screenshot/internal/ScreenshotImpl.java#L206 so the plugin starts misbehaving when captured screenshot has more than: |
Ok so then the issue is not on our side 😢 I'm afraid there is nothing we can do to fix this issue. I'm closing it for now. Thanks for reporting @mateuszkwiecinski |
I think it is 100% on the Shot's side 🤔 I mean facebook's library allows to configure the maximum screenshot size (and not to rely on the default value I linked). I claim Shot plugin should also expose such ability. |
Also, the behavior where plugin fails silently which leads to false positives is also something needs fixing. That's a clear bug to me which makes the plugin unreliable 👀 Failing screenshot should always fail the build, no? |
Ok, I get what you mean now. I'm going to open the issue again and update the description to specify that the change we should implement is to let configure the max screenshot size instead of relaying on the default value. Thanks for the clarification btw. The catch preventing Shot to crash when this happens is a different bug I think you've already reported. Thanks for the info, I really appreciate it. |
@nrotonda fixed the issue and I'll release the fix with Shot 6.1.0 |
Expected behaviour
It seems like I stumbled upon 2 issues at once, but the behavior I expect is:
Actual behaviour
If someone doesn't expect changed screenshot, or trusts the verification task such behavior can easily sneak in an unwanted behavior change.
Steps to reproduce
./gradlew executeScreenshotTests -Precord
./gradlew executeScreenshotTests
The workaround for this particual issue is to use facebook library directly to capture the view.
Version of the library
5.11.2
The text was updated successfully, but these errors were encountered: