cashapp / redwood

Multiplatform reactive UI for Android, iOS, and web using Kotlin and Jetpack Compose
https://cashapp.github.io/redwood/0.x/docs/
Apache License 2.0
1.63k stars 70 forks source link

Introduce a Snapshotter interface for tests #2322

Closed swankjesse closed 1 week ago

swankjesse commented 1 week ago

I'm attempting to test that changes to the view hierarchy don't cause unnecessary extra layouts, so I need the parent view to remain stable across multiple snapshots. This new Snapshotter interface makes that straightforward.

This is currently only implemented for 'layout' tests. I'll follow up with 'lazylayout' tests next.