Replies: 1 comment 1 reply
-
Commenting to bring more visibility. I would love to make use of this framework in my projects but I have a good number of async SwiftUI views and as far as I can tell there's no good way to snapshot them. This same limitation has also been highlighted in #582 and #701. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have been trying out the swift-snapshot-testing framework with little success. Basically the snapshots are being taken before our state has updated.
I've created an example for the problem we are facing... We we have a SwiftUI, that displays a list of numbers, those numbers are generated asynchronously, there is a loading state which will be initial, loading or finished, the updates to these are done using MainActor.run
Then our test looks like this...
The snapshot always takes a screenshot of the loading screen instead of the list of numbers. If I remove the async await and MainActor stuff I can get it to work properly, but as in our main app we're doing network requests and the like it would be useful to understand what we are doing wrong here?
Can any help?
Thanks
Andy.
Beta Was this translation helpful? Give feedback.
All reactions