swift-snapshot-testing
swift-snapshot-testing copied to clipboard
Run snapshot test directly in Swift Package Manager (SPM) containing SwiftUI views
Greetings everyone! The title pretty much says it all. Im currently exporting the UI in a SwiftPM and because there are already XCTest I was wondering if there is a way to directly snapshot the UI in the package...
You can set up and run the tests from your package.
You can take a look here:
https://github.com/criticalmaps/criticalmaps-ios/tree/main/CriticalMapsKit/Tests/StyleguideTests
@mltbnz
Thank You! By chance, I managed to make them work. But still, your answer is beneficial to me.
One thing I couldn't do, however, is to generate images for the failing tests... Help will be much appreciated! 🍻
I think I don't know what you referring to. If you mean the failure screenshot when a test fails you will see them in Xcode