I find myself reaching for `rule.waitForIdle()` a ...
# compose-desktop
m
I find myself reaching for
rule.waitForIdle()
a lot more in compose for desktop tests than in android tests. I vaguely remember reading something about compose tests waiting for idleness by default, but can’t find anything right now. Does the desktop rule not do this?
i
Those tests are written in the very early stage of
ui-test-desktop
, when synchronization was not properly implemented. There was a lot of things changed after that in
ui-test-desktop
If android doesn't require a manual waiting in a similar test, then desktop shouldn't too. If it not the case, we should fix that. Also, there is one pending change, that replaces
Swing
dispatcher by
TestCoroutineDispatcher
. It changes synchronization behavior too, and will help avoid manual calls of
waitForIdle
. It will be available in a week.
🙌 2