@@ -17,6 +17,7 @@ import androidx.compose.ui.test.performClick
1717import androidx.compose.ui.test.performScrollTo
1818import androidx.compose.ui.test.performTextInput
1919import androidx.compose.ui.test.runComposeUiTest
20+ import androidx.compose.ui.test.waitUntilExactlyOneExists
2021import androidx.compose.ui.test.waitUntilNodeCount
2122import com.pega.constellation.sdk.kmp.samples.androidcmpapp.test.ComposeTest
2223import com.pega.constellation.sdk.kmp.samples.androidcmpapp.test.waitForNode
@@ -44,6 +45,7 @@ class EmbeddedDataTest : ComposeTest(PegaVersion.v24_2_2) {
4445 waitForNode(" Cars repeating view readonly" )
4546
4647 // remove and verify empty list
48+ waitUntilExactlyOneExists(hasContentDescription(" Delete item 1" ))
4749 onNodeWithContentDescription(" Delete item 1" ).performClick()
4850 waitForNodes(" No items" , count = 2 )
4951 waitUntilNodeCount(hasContentDescription(" No items" ), count = 2 )
@@ -59,11 +61,11 @@ class EmbeddedDataTest : ComposeTest(PegaVersion.v24_2_2) {
5961 it.findFirstWithText(" model" ).performTextInput(" A5" )
6062 it.findFirstWithText(" Price" ).performTextInput(" 123000" )
6163 it.findFirstWithText(" IsFirstOwner" ).onSiblings().onFirst().performClick()
62- it.findFirstWithText(" interior" ).performClick()
64+ it.findFirstWithText(" interior" ).performScrollTo(). performClick()
6365 onNodeWithText(" comfort" ).performClick()
64- it.findFirstWithText(" Insurance" ).performClick()
66+ it.findFirstWithText(" Insurance" ).performScrollTo(). performClick()
6567 onNodeWithText(" gold" ).performClick()
66- it.findFirstWithText(" client meeting date" ).performClick()
68+ it.findFirstWithText(" client meeting date" ).performScrollTo(). performClick()
6769 onNodeWithText(" Today, " , substring = true ).performClick()
6870 onNodeWithText(" OK" ).performClick()
6971 it.findFirstWithText(" Client meeting time" ).performScrollTo().performClick()
@@ -94,7 +96,7 @@ class EmbeddedDataTest : ComposeTest(PegaVersion.v24_2_2) {
9496 }
9597
9698 // adding row 2
97- onNodeWithText(" Add" , substring = true ).performClick()
99+ onNodeWithText(" Add" , substring = true ).performScrollTo(). performClick()
98100
99101 // enter data in row 2
100102 waitForNodes(" cars 2" , count = 2 )
@@ -108,7 +110,7 @@ class EmbeddedDataTest : ComposeTest(PegaVersion.v24_2_2) {
108110 // verify data in row 2 propagated to duplicated
109111 onAllNodes(hasAnyAncestor(hasTestTag(" field_group_template_[Cars repeating view readonly]" ))).let { nodes ->
110112 nodes.filter(hasAnyAncestor(hasTestTag(" field_group_item_2" ))).let {
111- it.findFirstWithText (" Ford" ).assertExists( )
113+ waitUntilAtLeastOneExists(it, hasText (" Ford" ), timeoutMillis = 5000L )
112114 }
113115 }
114116
0 commit comments