Last active
July 25, 2016 18:04
-
-
Save heitorcolangelo/f0a59a1ec7bf32eb1daa71223aeb0493 to your computer and use it in GitHub Desktop.
LoginActivityTest - empty state refactor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void whenPasswordIsEmpty_andClickOnLoginButton_shouldDisplayDialog() { | |
onView(withId(R.id.login_username)).perform(typeText("admin")); | |
onView(withId(R.id.login_button)).perform(click()); | |
onView(withText(R.string.validation_message)).check(matches(isDisplayed())); | |
onView(withText(R.string.ok)).perform(click()); | |
} | |
@Test | |
public void whenUserNameIsEmpty_andClickOnLoginButton_shouldDisplayDialog() { | |
onView(withId(R.id.login_password)).perform(typeText("pass123")); | |
onView(withId(R.id.login_button)).perform(click()); | |
onView(withText(R.string.validation_message)).check(matches(isDisplayed())); | |
onView(withText(R.string.ok)).perform(click()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment