diff --git a/reference-app/src/androidTest/java/org/smartregister/anc/activity/anc/AdvancedSearchTests.java b/reference-app/src/androidTest/java/org/smartregister/anc/activity/anc/AdvancedSearchTests.java index 7a77b1e3e..320874b8c 100644 --- a/reference-app/src/androidTest/java/org/smartregister/anc/activity/anc/AdvancedSearchTests.java +++ b/reference-app/src/androidTest/java/org/smartregister/anc/activity/anc/AdvancedSearchTests.java @@ -66,7 +66,7 @@ public void A_setUp() throws InterruptedException { public void userCanSearchOutsideAndInsideMyHealthFacilityByFirstName() throws InterruptedException { onView(withId(R.id.action_search)).perform(click()); Thread.sleep(2000); - onView(withId(R.id.first_name)).perform(typeText(Configs.TestDataConfigs.firstName),ViewActions.closeSoftKeyboard()); + onView(withId(R.id.first_name)).perform(typeText(Configs.TestDataConfigs.firstNameA),ViewActions.closeSoftKeyboard()); onView(withId(R.id.search)).perform(click()); Thread.sleep(5000); Matcher parentMatcher = withId(R.id.list_view_layout); @@ -77,7 +77,7 @@ public void userCanSearchOutsideAndInsideMyHealthFacilityByFirstName() throws In public void userCanSearchOutsideAndInsideMyHealthFacilityByLastName() throws InterruptedException { onView(withId(R.id.action_search)).perform(click()); Thread.sleep(2000); - onView(withId(R.id.last_name)).perform(typeText(Configs.TestDataConfigs.lastName),ViewActions.closeSoftKeyboard()); + onView(withId(R.id.last_name)).perform(typeText(Configs.TestDataConfigs.lastNameA),ViewActions.closeSoftKeyboard()); onView(withId(R.id.search)).perform(click()); Matcher parentMatcher = withId(R.id.list_view_layout); Thread.sleep(5000); @@ -130,7 +130,7 @@ public void userCanSearchOutsideAndInsideMyHealthFacilityByPhoneNumber() throws Thread.sleep(2000); onView(withHint("Expected date of delivery")).perform(swipeUp()); onView(withId(R.id.dob)).perform(swipeUp()); - onView(withId(R.id.phone_number)).perform(typeText(Configs.TestDataConfigs.phoneNumber)); + onView(withId(R.id.phone_number)).perform(typeText(Configs.TestDataConfigs.phoneNumberA)); onView(withId(R.id.search)).perform(click()); Thread.sleep(5000); Matcher parentMatcher = withId(R.id.list_view_layout); @@ -162,7 +162,7 @@ public void userCanSearchOutsideAndInsideMyHealthFacilityByScanningAQRCOde() thr public void userCanSearchInMyHealthFacilityByFirstName () { onView(withId(R.id.action_search)).perform(click()); onView(withId(R.id.my_catchment)).perform(click()); - onView(withId(R.id.first_name)).perform(typeText(Configs.TestDataConfigs.firstName),ViewActions.closeSoftKeyboard()); + onView(withId(R.id.first_name)).perform(typeText(Configs.TestDataConfigs.firstNameA),ViewActions.closeSoftKeyboard()); onView(withId(R.id.search)).perform(click()); } diff --git a/reference-app/src/androidTest/java/org/smartregister/anc/activity/utils/Configs.java b/reference-app/src/androidTest/java/org/smartregister/anc/activity/utils/Configs.java index 4559e1e85..7b7e44b2c 100644 --- a/reference-app/src/androidTest/java/org/smartregister/anc/activity/utils/Configs.java +++ b/reference-app/src/androidTest/java/org/smartregister/anc/activity/utils/Configs.java @@ -5,10 +5,10 @@ public class Configs { public static class TestDataConfigs{ public static final String clientName = "Lauren Hill"; public static final String clientID = "7138845"; - public static final String firstName = "Terence"; - public static final String lastName = "Direction"; + public static final String firstNameA = "Terence"; + public static final String lastNameA = "Direction"; public static final String clientName2 = "Lily Woods"; - public static final String phoneNumber = "584555"; + public static final String phoneNumberA = "584555"; public static final String alternateContactName = "Lu"; public static final String firstName = "Test"; public static final String lastName = "Client"; diff --git a/reference-app/src/androidTest/java/org/smartregister/anc/activity/utils/Constants.java b/reference-app/src/androidTest/java/org/smartregister/anc/activity/utils/Constants.java index 1c27087d8..dc7bd6879 100644 --- a/reference-app/src/androidTest/java/org/smartregister/anc/activity/utils/Constants.java +++ b/reference-app/src/androidTest/java/org/smartregister/anc/activity/utils/Constants.java @@ -1,13 +1,10 @@ package org.smartregister.anc.activity.utils; public class Constants { public static class ancConstants { - public static final String ancUsername = ""; - public static final String ancPassword = ""; //values to be input each time a test is run + public static final String ancUsername = ""; public static final String ancPassword = ""; - - } }