Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @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.not_empty_field)).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.not_empty_field)).check(matches(isDisplayed()));
- onView(withText(R.string.ok)).perform(click());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement