Wait On Received Actions To Facilitate Snapshot Testing #3814
TicTocCroc
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We use TCA in our application, and we make use of extensive image-based snapshot tests in our test suite.
Many of our screens have multi-step loading processes before they are completely loaded and ready to snapshot. And some of our screens even render intermediate states during the loading process, so there are several loading snapshots we'd like to capture.
These tests usually rely on the
waitsnapshot strategy to wait an arbitrary amount of time before capturing the snapshot. But this strategy is imprecise, and often fails to capture the view when it's in a known good state for testing.A facility to wait on received actions on a regular store (similar to
TestStore) would help us wait for our loading processes to finish, and ensure that we are capturing the screen in the state we intended.Alternatively,
TestStorecould expose a regularStorethat we could use to drive our view renders.I took a shot at implementing this myself, but the complexity of
TestStoredefeated me.Beta Was this translation helpful? Give feedback.
All reactions