wait
strategy used with custom Snapshotting
extension?
#543
Unanswered
simondelphia
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If you have a
Snapshotting
extension that takes in whatever type and transforms it to aUIView
and try to usewait
with it to try to capture some delayed change to the view, it doesn't seem to have the desired effect.Here I used an
Int
and some viewMyView
which has an initializer that accepts anInt
as input just as an example. Let's sayMyView
animates some label such that it animates from a default state to one showing the passed value.The view is produced but the resulting snapshot is as if there was no wait. If Instead I don't use a
Snapshotting
extension and just callassertSnapshot
on aMyView
instance directly, it seems to work properly.Plus if you put a long delay on the
wait
and put a breakpoint inside thepullback
, the breakpoint is only hit after the delay, so the view isn't getting initialized until after the delay and thus thewait
is pointless here.Is this expected behaviour? Are you supposed to do something differently for
wait
when usingpullback
in aSnapshotting
extension?Beta Was this translation helpful? Give feedback.
All reactions