Alerts not displaying in Xcode Cloud snapshot tests #880
Unanswered
Alexminator99
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I've created a simple test to get around swift-snapshot library before fully implement the rest of tests in the codebase. I noticed that Alerts are displayed correctly in local tests but not in Xcode Cloud (when test is an action to be executed).
In order to get the Alert to be displayed in the screenshot I've used one of the snippets presented in one of the PointFree videos related to snapshotting:
Just some minor caveat with UIWindow to get ride of the deprecation warning.
Here are reference, failure and difference pngs generated by Xcode Cloud:

The definition of
assertIPadSnapshot
is extracted from another discussion on how to provide the correct path to Xcode Cloud to make the comparisons:Has anyone experienced this before? Am I missing something?
Xcode: 15.3
Swift: 5.10
swift-snapshot-test: 1.17.2
Beta Was this translation helpful? Give feedback.
All reactions