https://kotlinlang.org logo
#compose
Title
# compose
b

Bradleycorn

11/22/2021, 4:29 PM
When testing using the various
onAllNodes*
finders, can I make assumptions about the order of nodes that are in the result? Example code in the 🧵
Another contrived example, but:
Copy code
LazyColumn {
    items(10) { item ->
        Text("Item $item",
            modifier = Modifier.clearAndSetSemantics { contentDescription = "List Item" }
        )
    }
}
In a test, if I do:
Copy code
composeTestRule.onAllNodesWithContentDescription("List Item")
Can I make assumptions that the nodes in the returned list will represent the text items in the same order as they are rendered in the UI?