Last active
January 9, 2018 13:51
-
-
Save makovkastar/8f8150ac157a14b6a234f09d76adcd57 to your computer and use it in GitHub Desktop.
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 | |
fun isSignInButtonEnabledBinding() { | |
isSignInButtonEnabled.set(true) | |
onView(withId(R.id.button_sign_in)).check(matches(isEnabled())) | |
} | |
@Test | |
fun isProgressBarVisibleBinding() { | |
isProgressBarVisible.set(true) | |
onView(withId(R.id.progress_overlay)).check(matches(isDisplayed())) | |
} | |
@Test | |
fun emailTextChangedListenerBinding() { | |
onView(withId(R.id.edit_text_email)).perform( | |
typeText("email"), closeSoftKeyboard()) | |
verify(emailTextChangedListener, times(5)).afterTextChanged(any()) | |
} | |
@Test | |
fun passwordTextChangedListenerBinding() { | |
onView(withId(R.id.edit_text_password)).perform( | |
typeText("password"), closeSoftKeyboard()) | |
verify(passwordTextChangedListener, times(8)).afterTextChanged(any()) | |
} | |
@Test | |
fun emailFieldBinding() { | |
onView(withId(R.id.edit_text_email)).perform( | |
typeText("email"), closeSoftKeyboard()) | |
assertThat(emailField.get(), `is`("email")) | |
} | |
@Test | |
fun passwordFieldBinding() { | |
onView(withId(R.id.edit_text_password)).perform( | |
typeText("password"), closeSoftKeyboard()) | |
assertThat(passwordField.get(), `is`("password")) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment