Good morning <@UHAJKUSTU>! I was hoping to get so...
# decompose
o
Good morning @Arkadii Ivanov! I was hoping to get some more information on how to properly set up UI testing for Compose content with Decompose. Our composable functions take a component as a parameter, and those components need access to a ComponentContext to be setup properly. However Decompose seems to need an Activity/Fragment to generate a ComponentContext, and JUnit only supports accessing Activity after the content has been set. Is there a way you'd recommend setting up UI tests with Decompose? Thanks for your time and any information!
a
It's evening in London, but hello! Yes, the testing story is often underestimated when comparing Decompose with other solutions, but this is where Decompose shines. You can check the sample, it contains some simple UI tests, but it should shed some lights on ideas. https://github.com/arkivanov/Decompose/tree/master/sample/shared/compose/src/jvmTest/kotlin/com/arkivanov/sample/shared/counters/counter
o
Oh I must have missed that, I'll take a look and compare how the components are set up. Thanks again, and enjoy your evening!
👍 1