-
Notifications
You must be signed in to change notification settings - Fork 316
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
Fix RevenueCatUI
snapshot tests
#3526
Conversation
dfda8c8
to
2657ef2
Compare
c491b54
to
42795db
Compare
RevenueCatUI
snapshot tests
27d6cf6
to
9f42a5c
Compare
.circleci/config.yml
Outdated
- spm-revenuecat-ui-ios-15: | ||
xcode_version: '14.3.0' | ||
- spm-revenuecat-ui-ios-16: | ||
xcode_version: '14.3.0' | ||
- spm-revenuecat-ui-ios-17: | ||
xcode_version: '15.1' | ||
- spm-revenuecat-ui-watchos: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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." | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
@@ -155,8 +155,8 @@ private let traits: UITraitCollection = .init(displayScale: 1) | |||
|
|||
#endif | |||
|
|||
private let perceptualPrecision: Float = 0.97 | |||
private let timeout: DispatchTimeInterval = .seconds(5) | |||
private let perceptualPrecision: Float = 0.94 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity, what failed if we keep it at 97?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No idea, the diff produced showing the inconsistency was completely black to the naked eye. So just very tiny color differences.
**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)
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
perceptualPrecision
implementation requiresMetal
support, and without itswift-snapshot-testing
was silently passing.This fixes that, and prevents it from happening again.
Changes:
CircleCI
to useM1
instances, which do supportMetal
ProgressView
with a static version in snapshots to prevent failures from the spinning indicator