Compose composeTestRule.onRoot(useUnmergedTree = true).printToLog() hides composables

939 views Asked by At

I can only see half of the view when using Googles advice for debugging UITests:


@get:Rule(order = 1)
val composeTestRule = createAndroidComposeRule<MainActivity>()
... .
composeTestRule.onRoot(useUnmergedTree = true).printToLog("T:")

It's not printing the full view. I can however retrive the "hidden" views using a matcher. Like this: composeTestRule.onNode(hasText(R.string.detail)).assertExists()

The problem here is i want to debug the view and to be able to debug it i need way to inspect it. Following Googles guidelines leads to failure. Is this a bug from jetpack compose?

0

There are 0 answers