Skip to content

Commit

Permalink
test: [ANDROAPP-6030] shouldCompleteAnEventAndReopenIt (#3624)
Browse files Browse the repository at this point in the history
* test: [ANDROAPP-6030] shouldCompleteAnEventAndReopenIt

* test: [ANDROAPP-6030] shouldCompleteAnEventAndReopenIt

* test: shouldShowQRWhenClickOnShare

* test: shouldOpenEventAndSaveSuccessfully

* test: ignore
  • Loading branch information
mmmateos authored May 15, 2024
1 parent 944b812 commit 05945d8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -128,7 +126,6 @@ class ProgramEventTest : BaseTest() {

@Test
fun shouldOpenEventAndShowMap() {

prepareProgramAndLaunchActivity(informationCampaign)

programEventsRobot(composeTestRule) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class TeiDashboardTest : BaseTest() {
}

eventRobot(composeTestRule) {
scrollToBottomForm()
enableComposeForms()
clickOnFormFabButton()
clickOnNotNow()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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++
}
Expand Down

0 comments on commit 05945d8

Please sign in to comment.