Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. @Test
  2. public void whenPasswordIsEmpty_andClickOnLoginButton_shouldDisplayDialog() {
  3. onView(withId(R.id.login_username)).perform(typeText("admin"));
  4. onView(withId(R.id.login_button)).perform(click());
  5. onView(withText(R.string.not_empty_field)).check(matches(isDisplayed()));
  6. onView(withText(R.string.ok)).perform(click());
  7. }
  8.  
  9. @Test
  10. public void whenUserNameIsEmpty_andClickOnLoginButton_shouldDisplayDialog() {
  11. onView(withId(R.id.login_password)).perform(typeText("pass123"));
  12. onView(withId(R.id.login_button)).perform(click());
  13. onView(withText(R.string.not_empty_field)).check(matches(isDisplayed()));
  14. onView(withText(R.string.ok)).perform(click());
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement