I am trying to add commonTest UTs for compose UI w...
# compose
a
I am trying to add commonTest UTs for compose UI which uses shared elements, but it's getting stuck when when run on desktop target. This is happening in commonTest Desktop run, if the same TC is run in androidInstrumentation test then it runs fine. If there is no usage of
sharedEleemnt
modifier then also it runs fine Is this some known issue? or are there some extra steps needed to run this in commonTest UT?
SampleTest -> testUiWithOutSharedElements
this successfully passes
SampleTest -> testUiWithSharedElements
this hangs
Create a JB issue for the same https://youtrack.jetbrains.com/issue/CMP-6847/Test-freezes-when-run-in-desktop-environment-when-UI-uses-sharedElement Would appreciate any updates on this! 🙏 Thanks
d
This is not a known issue. I took a look at the test, seems like the shared element transition isn't even active in the test. But since it only hangs on desktop, it's most likely specific to the desktop test framework.
a
Thanks for the reply. Yes, you are right, that's why filed this issue in JB. Interestingly found one similar closed issue where desktop TC hangs indefinitely https://youtrack.jetbrains.com/issue/CMP-965/Tests-hang-if-theres-an-infinite-loop-in-LaunchedEffect There could be some similar issue here as well.
This issue is fixed on and after compose plugin version: 1.7.0-rc01. I am able to see the fix in that version
👍 1