Fix RevenueCatUI snapshot tests#3526
Merged
Merged
Conversation
dfda8c8 to
2657ef2
Compare
c491b54 to
42795db
Compare
RevenueCatUI snapshot tests
27d6cf6 to
9f42a5c
Compare
NachoSoto
commented
Dec 20, 2023
| xcode_version: '14.3.0' | ||
| - spm-revenuecat-ui-ios-17: | ||
| xcode_version: '15.1' | ||
| - spm-revenuecat-ui-watchos: |
Contributor
Author
There was a problem hiding this comment.
TODO: remove commit
9f42a5c to
3826e04
Compare
RevenueCatUI snapshot testsRevenueCatUI snapshot tests
| expect(MTLCreateSystemDefaultDevice()).toNot( | ||
| beNil(), | ||
| description: "Metal is required for perceptuallyCompare, but not available on this machine." | ||
| ) |
|
|
||
| private let perceptualPrecision: Float = 0.97 | ||
| private let timeout: DispatchTimeInterval = .seconds(5) | ||
| private let perceptualPrecision: Float = 0.94 |
Member
There was a problem hiding this comment.
Just out of curiosity, what failed if we keep it at 97?
Contributor
Author
There was a problem hiding this comment.
No idea, the diff produced showing the inconsistency was completely black to the naked eye. So just very tiny color differences.
MarkVillacampa
approved these changes
Dec 20, 2023
This was referenced Dec 21, 2023
NachoSoto
pushed a commit
that referenced
this pull request
Dec 22, 2023
**This is an automatic release.** ### RevenueCatUI * `Paywalls`: add header image to `watchOS` paywalls (#3542) via NachoSoto (@NachoSoto) * `Paywalls`: improve template 5 landscape layout (#3534) via NachoSoto (@NachoSoto) * `Paywalls`: fix template 5 footer loading view alignment (#3537) via NachoSoto (@NachoSoto) * `Paywalls`: improve template 1 landscape layout (#3532) via NachoSoto (@NachoSoto) * `Paywalls`: fix `ColorInformation.multiScheme` on `watchOS` (#3530) via NachoSoto (@NachoSoto) ### Other Changes * `Trusted Entitlements`: tests for signature verification without header hash (#3505) via NachoSoto (@NachoSoto) * `.debugRevenueCatOverlay`: added `Locale` (#3539) via NachoSoto (@NachoSoto) * `Trusted Entitlements`: add support for signing request headers (#3424) via NachoSoto (@NachoSoto) * `CI`: Add architecture to cache keys (#3538) via Mark Villacampa (@MarkVillacampa) * `Paywalls Tester`: remove double close button (#3531) via NachoSoto (@NachoSoto) * Fix `RevenueCatUI` snapshot tests (#3526) via NachoSoto (@NachoSoto)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Turns out that because neither pointfreeco/swift-snapshot-testing#702 or pointfreeco/swift-snapshot-testing#666 had been merged, we had been getting false positives on snapshot tests on CI since the very beginning.
The
perceptualPrecisionimplementation requiresMetalsupport, and without itswift-snapshot-testingwas silently passing.This fixes that, and prevents it from happening again.
Changes:
CircleCIto useM1instances, which do supportMetalProgressViewwith a static version in snapshots to prevent failures from the spinning indicator