Hi all! In our team we are implementing the first ...
# compose
m
Hi all! In our team we are implementing the first feature with Compose. There are ui End to End tests practice in project. When there are compose and view in one Activity we have problem with switching between Espresso and Compose matchers. It looks like compose keeps main thread.
androidx.test.espresso.IdlingResourceTimeoutException: Wait for [Compose-Espresso link] to become idle timed out
I created simple project to reproduce issues: https://github.com/Maksim-Novikov/ComposeUiTestsBug Just run EspressoComposeLinkTest. In real project problems arise when we go back from compose to view, but In sample it begins earlier. I found the only one similar problem, but it associated with infinity animation https://issuetracker.google.com/issues/160259537
l
Hi, I got the same problem. The issue was having a ComposeView Gone and a setContent. Try to remove the visibility Gone in your XML and in your setContent and add a If statement in your setContent code @Max Novikov
m
Thanks for the answer! As I can see, there is already a solution and it will be in 1.2.0 release
z
@Max Novikov where did you see there’s a solution coming in 1.2.0? We are facing the problem as you so would love to learn more
m
z
nice it even has a workaround, thank you Max!