diff --git a/app/src/androidTest/java/org/dhis2/usescases/flow/syncFlow/SyncFlowTest.kt b/app/src/androidTest/java/org/dhis2/usescases/flow/syncFlow/SyncFlowTest.kt index 4f350bb9b5..baec4bd5f5 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/flow/syncFlow/SyncFlowTest.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/flow/syncFlow/SyncFlowTest.kt @@ -116,6 +116,7 @@ class SyncFlowTest : BaseTest() { cleanLocalDatabase() } + @Ignore("TO FIX IN ANDROAPP-6139") @Test fun shouldShowErrorWhenSyncEventFails() { mockWebServerRobot.addResponse(GET, "/api/system/ping", API_PING_RESPONSE_OK) diff --git a/app/src/androidTest/java/org/dhis2/usescases/programevent/ProgramEventTest.kt b/app/src/androidTest/java/org/dhis2/usescases/programevent/ProgramEventTest.kt index 68549602fa..ca6add7033 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/programevent/ProgramEventTest.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/programevent/ProgramEventTest.kt @@ -12,7 +12,6 @@ import org.dhis2.usescases.programEventDetail.ProgramEventDetailActivity import org.dhis2.usescases.programevent.robot.programEventsRobot import org.dhis2.usescases.teidashboard.robot.eventRobot import org.junit.Before -import org.junit.Ignore import org.junit.Rule import org.junit.Test @@ -77,7 +76,6 @@ class ProgramEventTest : BaseTest() { } } - @Ignore("Flaky test, will be look om issue ANDROAPP-6030") @Test fun shouldCompleteAnEventAndReopenIt() { val eventDate = "15/3/2020" @@ -128,7 +126,6 @@ class ProgramEventTest : BaseTest() { @Test fun shouldOpenEventAndShowMap() { - prepareProgramAndLaunchActivity(informationCampaign) programEventsRobot(composeTestRule) { diff --git a/app/src/androidTest/java/org/dhis2/usescases/programevent/robot/ProgramEventsRobot.kt b/app/src/androidTest/java/org/dhis2/usescases/programevent/robot/ProgramEventsRobot.kt index d430956e6d..0b27883ed4 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/programevent/robot/ProgramEventsRobot.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/programevent/robot/ProgramEventsRobot.kt @@ -62,7 +62,9 @@ class ProgramEventsRobot(val composeTestRule: ComposeContentTestRule) : BaseRobo ).check(matches(isDisplayed())) } + @OptIn(ExperimentalTestApi::class) fun checkEventIsComplete(eventDate: String) { + composeTestRule.waitUntilAtLeastOneExists(hasText("Event completed")) composeTestRule.onNodeWithText(eventDate).assertIsDisplayed() composeTestRule.onNodeWithText("Event completed").assertIsDisplayed() } diff --git a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/TeiDashboardTest.kt b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/TeiDashboardTest.kt index 4557f174bf..a0bfe45df3 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/TeiDashboardTest.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/TeiDashboardTest.kt @@ -182,7 +182,7 @@ class TeiDashboardTest : BaseTest() { } eventRobot(composeTestRule) { - scrollToBottomForm() + enableComposeForms() clickOnFormFabButton() clickOnNotNow() } diff --git a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/TeiDashboardRobot.kt b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/TeiDashboardRobot.kt index dc50165dbe..b6424bc050 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/TeiDashboardRobot.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/teidashboard/robot/TeiDashboardRobot.kt @@ -197,6 +197,7 @@ class TeiDashboardRobot(val composeTestRule: ComposeTestRule) : BaseRobot() { var qrLenght = 1 while (qrLenght < 8) { + waitForView(withId(R.id.next)) onView(withId(R.id.next)).perform(click()) qrLenght++ }