Run snapshot test directly in Swift Package Manager (SPM) containing SwiftUI views
XRadevFRT opened this issue · 3 comments
XRadevFRT commented
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...
mltbnz commented
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
XRadevFRT commented
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! 🍻
mltbnz commented