diff --git a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/EventRobot.kt b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/EventRobot.kt index 9f3cdc87f7..7c0e9e095d 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/EventRobot.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/EventRobot.kt @@ -4,12 +4,16 @@ import androidx.compose.ui.test.assertIsDisplayed import androidx.compose.ui.test.hasAnySibling import androidx.compose.ui.test.hasTestTag import androidx.compose.ui.test.hasText +import androidx.compose.ui.test.isDialog +import androidx.compose.ui.test.isRoot import androidx.compose.ui.test.junit4.ComposeTestRule import androidx.compose.ui.test.onNodeWithContentDescription import androidx.compose.ui.test.onNodeWithTag import androidx.compose.ui.test.onNodeWithText +import androidx.compose.ui.test.onRoot import androidx.compose.ui.test.performClick import androidx.compose.ui.test.performTextReplacement +import androidx.compose.ui.test.printToLog import androidx.test.espresso.Espresso.onView import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.assertion.ViewAssertions.matches @@ -114,7 +118,8 @@ class EventRobot(val composeTestRule: ComposeTestRule) : BaseRobot() { fun selectSpecificDate(currentDate: String, date: String) { composeTestRule.onNodeWithTag("DATE_PICKER").assertIsDisplayed() composeTestRule.onNodeWithContentDescription( - "Switch to text input mode", + label = "text", + substring = true, useUnmergedTree = true, ).performClick() composeTestRule.onNodeWithText(currentDate).performTextReplacement(date)