Skip to content

Instantly share code, notes, and snippets.

@makovkastar
Created January 9, 2018 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makovkastar/241cdca5d5e61f198977ef533edadf06 to your computer and use it in GitHub Desktop.
Save makovkastar/241cdca5d5e61f198977ef533edadf06 to your computer and use it in GitHub Desktop.
@Test
fun navigateToForgotPasswordPage_StartsBrowser() {
intending(not(isInternal())).respondWith(
Instrumentation.ActivityResult(Activity.RESULT_OK, null))
navigateToForgotPasswordPage.call()
intended(allOf(hasAction(Intent.ACTION_VIEW),
hasData(Urls.FORGOT_PASSWORD)))
}
@Test
fun navigateToNextScreen_StartsHomeActivity() {
navigateToNextScreen.call()
intended(hasComponent(HomeActivity::class.java.name))
}
@Test
fun showErrorToast_ShowsToastWithCorrectText() {
showErrorToast.value = "Error signing in."
onView(withText("Error signing in."))
.inRoot(isToast()).check(matches(isDisplayed()))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment