Open georgegillams opened 4 years ago
This repository has been archived, please open this PR here: https://github.com/uber/ios-snapshot-test-case
This repository has been archived, please open this PR here: https://github.com/uber/ios-snapshot-test-case
Thanks for the heads-up. New issue opened here https://github.com/uber/ios-snapshot-test-case/issues/122
This seems to be an issue with XCTest/XCode as it happens even if I use native methods to convert a view to an image within a XCTest context, but I thought it would still be worth tracking here too, in case you have any ideas or workarounds.
Open radar bug: http://www.openradar.appspot.com/7404933
Essentially I have a test where I define two dynamic colours:
For the light mode snapshot, I simply take a screenshot of the UIView. For the dark mode snapshot, I create a new instance of the View, set
userInterfaceStyle
todark
and take a screenshot of the UIViewAs you can see in the test snapshots, the dynamic text colour is being correctly applied when I force
userInterfaceStyle
on the UIView, while the dynamic background colour is not.