Skip to content

Commit 809e4ee

Browse files
TASK-1818257: Print all UI trees for debugging
1 parent 93c757b commit 809e4ee

File tree

1 file changed

+12
-2
lines changed
  • samples/android-cmp-app/src/androidInstrumentedTest/kotlin/com/pega/constellation/sdk/kmp/samples/androidcmpapp/test/cases

1 file changed

+12
-2
lines changed

samples/android-cmp-app/src/androidInstrumentedTest/kotlin/com/pega/constellation/sdk/kmp/samples/androidcmpapp/test/cases/CaseProcessingTest.kt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,18 @@ class CaseProcessingTest : ComposeTest() {
5454
runCatching {
5555
onNodeWithText("Today123, ", substring = true).performClick()
5656
}.onFailure {
57-
val tree = onAllNodes(isRoot()).get(2).printToString()
58-
error("Failed to find today's date, tree: $tree")
57+
val tree1 = onAllNodes(isRoot()).get(0).printToString()
58+
val tree2 = onAllNodes(isRoot()).get(1).printToString()
59+
error(
60+
"""
61+
Failed to find today's date. Printing UI trees for debugging:
62+
63+
tree1: $tree1
64+
65+
tree2: $tree2
66+
67+
""".trimIndent()
68+
)
5969
}
6070
onNodeWithText("OK").performClick()
6171
onNodeWithText("Submit").performClick()

0 commit comments

Comments
 (0)