From 79e4a07f846516337d37363ff2b09871728cc8eb Mon Sep 17 00:00:00 2001 From: Xavier Molloy Date: Fri, 12 Jul 2024 08:17:36 +0200 Subject: [PATCH] fix: [ANDROAPP-6315] fix failing test --- .../java/org/dhis2/usescases/searchte/SearchTETest.kt | 2 +- .../java/org/dhis2/usescases/searchte/robot/SearchTeiRobot.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/androidTest/java/org/dhis2/usescases/searchte/SearchTETest.kt b/app/src/androidTest/java/org/dhis2/usescases/searchte/SearchTETest.kt index 753fe13556..4216f6bfd5 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/searchte/SearchTETest.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/searchte/SearchTETest.kt @@ -341,7 +341,7 @@ class SearchTETest : BaseTest() { openNextSearchParameter("Last name") typeOnNextSearchTextParameter(teiLastName) clickOnSearch() - clickOnTEI(teiLastName, composeTestRule) + clickOnTEI(teiName, composeTestRule) } teiDashboardRobot(composeTestRule) { diff --git a/app/src/androidTest/java/org/dhis2/usescases/searchte/robot/SearchTeiRobot.kt b/app/src/androidTest/java/org/dhis2/usescases/searchte/robot/SearchTeiRobot.kt index debeab18c7..230a03aa87 100644 --- a/app/src/androidTest/java/org/dhis2/usescases/searchte/robot/SearchTeiRobot.kt +++ b/app/src/androidTest/java/org/dhis2/usescases/searchte/robot/SearchTeiRobot.kt @@ -44,9 +44,9 @@ fun searchTeiRobot( class SearchTeiRobot(val composeTestRule: ComposeTestRule) : BaseRobot() { - fun clickOnTEI( teiLastName: String,composeTestRule: ComposeTestRule) { + fun clickOnTEI( teiName: String,composeTestRule: ComposeTestRule) { composeTestRule.waitForIdle() - composeTestRule.onNodeWithText("Last name: $teiLastName", true).performClick() + composeTestRule.onNodeWithText("First name: $teiName", true).performClick() composeTestRule.waitForIdle() }