Last active
October 25, 2016 12:41
-
-
Save heitorcolangelo/1bfbcf5c211a2c7b098e3ed0e80085e2 to your computer and use it in GitHub Desktop.
LoginActivityTest - Empty fields state
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 whenAnyEditTextIsEmpty_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()); | |
onView(withId(R.id.login_username)).perform(clearText()); | |
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