Closed Vacxe closed 2 years ago
ComposeTestRule can provide functionality for awaiting views what can be useful for many test cases. However code below don't looks great to me.
ComposeTestRule
fun BaseNode<*>.waitFor(composeTestRule: ComposeTestRule, timeoutMillis: Long = 1_000) { composeTestRule.waitUntil(timeoutMillis) { try { this.delegate.interaction.semanticsNodeInteraction.assertExists() true } catch (e: AssertionError) { false } } }
Want to find a way how to do the same way but without composeTestRule reinjection to the function
At the end wanna have something like
ComposeScreen.onComposeScreen<MyScreen>(composeTestRule) { waitFor() heading { waitFor() hasText(it) } }
As we have discussed earlier, there is the same functionality in Kaspresso. Do we need to duplicate it here?
ComposeTestRule
can provide functionality for awaiting views what can be useful for many test cases. However code below don't looks great to me.Want to find a way how to do the same way but without composeTestRule reinjection to the function
At the end wanna have something like