Skip to content

Instantly share code, notes, and snippets.

@heitorcolangelo
Created July 25, 2016 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heitorcolangelo/efac0cc32c415b2fbaac72e6a1c93017 to your computer and use it in GitHub Desktop.
Save heitorcolangelo/efac0cc32c415b2fbaac72e6a1c93017 to your computer and use it in GitHub Desktop.
LoginActivityTest - wrong test
@Test
public void whenBothFieldsAreFilled_andClickOnLoginButton_shouldOpenMainActivity() {
onView(withId(R.id.login_username)).perform(typeText("defaultText"), closeSoftKeyboard());
onView(withId(R.id.login_password)).perform(typeText("defaultText"), closeSoftKeyboard());
onView(withId(R.id.login_button)).perform(click());
onView(withId(R.id.main_activity_container)).check(matches(isDisplayed()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment