Skip to content
Open
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 @@ -20,9 +20,11 @@
import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
import static androidx.test.espresso.assertion.ViewAssertions.matches;
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
import static androidx.test.espresso.matcher.ViewMatchers.isRoot;
import static androidx.test.espresso.matcher.ViewMatchers.withClassName;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static androidx.test.espresso.matcher.ViewMatchers.withText;
import static org.commcare.utils.InstrumentationUtility.waitForView;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.endsWith;

Expand Down Expand Up @@ -126,6 +128,8 @@ public void testCaseClaimByDifferentUser() {
.perform(click());

// Close the new case of cordelia with this user.
onView(withId(R.id.screen_entity_select_list))
.perform(waitForView(withText(name), 10000, true));
onView(withText(name))
.perform(click());
onView(withText("Continue"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class LoginTest: BaseTest() {
InstrumentationUtility.logout()

// login offline with bad password
InstrumentationUtility.changeWifi(false)
InstrumentationUtility.login("user_with_no_data", "badpass")
onView(withText("Either the password you entered was incorrect, or CommCare couldn't reach the server"))
.check(matches(isDisplayed()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import org.commcare.annotations.BrowserstackTests
import org.commcare.utils.InstrumentationUtility
import org.commcare.views.DrawView
import org.commcare.dalvik.R
import org.commcare.utils.InstrumentationUtility.sleep
import org.commcare.utils.doesNotExist
import org.commcare.utils.isDisplayed
import org.hamcrest.Matchers
Expand Down Expand Up @@ -127,6 +128,7 @@ class SignatureTests: BaseTest() {
Espresso.pressBack()
withText(R.string.keep_changes).doesNotExist()
Espresso.pressBack()
sleep(1)
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ object InstrumentationUtility {
// Click on About CommCare 4 times to become developer.
for (i in 0..3) {
openOptionsMenu()
onView(isRoot()).perform(waitForView(withText("About CommCare")))
onView(withText("About CommCare"))
.perform(click())
onView(withText(R.string.ok))
Expand Down
Loading