Feature: SwiftUI text-based snapshot testing #503
Replies: 5 comments
-
I've also posted on Swift Forums: https://forums.swift.org/t/swiftui-debugdescription/39099 |
Beta Was this translation helpful? Give feedback.
-
Does this do anything for you? assertSnapshot(matching: view, as: .dump) |
Beta Was this translation helpful? Give feedback.
-
This is also something I'd be interested in, have you tested the approach you are suggesting @darknoon ? |
Beta Was this translation helpful? Give feedback.
-
dump doesn't seem to work. I have tried and I only see a description of the store, which takes forever and has a lock and pointer properties that change on every run. |
Beta Was this translation helpful? Give feedback.
-
I'm going to convert this to a discussion for further collaboration. We'd definitely be interested in a strategy here! We want to keep issues focussed on bugs, though. |
Beta Was this translation helpful? Give feedback.
-
I would very much prefer a text based "recursiveDescription" of SwiftUI hierarchy. Even if I pull all my business logic out into a Store/Reducer/State, I still have branch logic within the Views.
Personal preference is to exclude frame rects. Just the hierarchy and properties where possible.
I have no suggestion for what this should look like, but here is an issue to track the discussion/progress.
Beta Was this translation helpful? Give feedback.
All reactions