Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: shouldCheckDisplayInList #3733

Merged
merged 4 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ class SearchTETest : BaseTest() {
}
}

@Ignore("Test needs to be fixed in ANDROAPP-6340")
@Test
fun shouldSuccessfullySearchUsingMoreThanOneField() {
mockWebServerRobot.addResponse(
Expand Down Expand Up @@ -140,8 +141,8 @@ class SearchTETest : BaseTest() {
}
}

@Ignore("Test needs to be fixed in ANDROAPP-6340")
@Test
@Ignore("Actions are being performed, but the test fails upon selecting the option in the spinner")
fun shouldSuccessfullyChangeBetweenPrograms() {
val tbProgram = "TB program"

Expand All @@ -154,6 +155,7 @@ class SearchTETest : BaseTest() {
}
}

@Ignore("Test needs to be fixed in ANDROAPP-6340")
@Test
fun shouldCheckDisplayInList() {
mockWebServerRobot.addResponse(
Expand Down Expand Up @@ -205,6 +207,7 @@ class SearchTETest : BaseTest() {
}
}

@Ignore("Test needs to be fixed in ANDROAPP-6340")
@Test
fun shouldSuccessfullyFilterByEventStatusOverdue() {
mockWebServerRobot.addResponse(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import androidx.test.espresso.contrib.RecyclerViewActions.actionOnItemAtPosition
import androidx.test.espresso.matcher.ViewMatchers.hasDescendant
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.platform.app.InstrumentationRegistry
import org.dhis2.R
import org.dhis2.common.BaseRobot
import org.dhis2.common.matchers.RecyclerviewMatchers
Expand Down Expand Up @@ -157,8 +158,10 @@ class SearchTeiRobot(val composeTestRule: ComposeTestRule) : BaseRobot() {
//Given the title is the first attribute
val title = "First name: ${displayListFieldsUIModel.name}"
val displayedAttributes = createAttributesList(displayListFieldsUIModel)
val showMoreText = InstrumentationRegistry.getInstrumentation()
.targetContext.getString(R.string.show_more)
//When we expand all attribute list
composeTestRule.onNodeWithText("Show more").performClick()
composeTestRule.onNodeWithText(showMoreText, useUnmergedTree = true).performClick()
composeTestRule.waitForIdle()
//Then The title and all attributes are displayed
composeTestRule.onNodeWithText(title).assertIsDisplayed()
Expand Down