Skip to content

Commit

Permalink
test: fix shouldSuccessfullySearchUsingMoreThanOneField (#3732)
Browse files Browse the repository at this point in the history
Signed-off-by: andresmr <[email protected]>
  • Loading branch information
andresmr authored Jul 17, 2024
1 parent 6683176 commit a0cbcee
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.dhis2.usescases.searchte.robot

import androidx.compose.ui.test.ExperimentalTestApi
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.hasParent
import androidx.compose.ui.test.hasTestTag
Expand Down Expand Up @@ -108,9 +109,10 @@ class SearchTeiRobot(val composeTestRule: ComposeTestRule) : BaseRobot() {
composeTestRule.waitForIdle()
}

@OptIn(ExperimentalTestApi::class)
fun checkListOfSearchTEI(title: String, attributes: Map<String?, String>) {
//Checks title and all attributes are displayed
composeTestRule.waitForIdle()
composeTestRule.waitUntilAtLeastOneExists(hasText(title))
composeTestRule.onNodeWithText(title).assertIsDisplayed()
attributes.forEach { item ->
item.key?.let { composeTestRule.onNodeWithText("$it:",true).assertIsDisplayed() }
Expand Down

0 comments on commit a0cbcee

Please sign in to comment.