Last active
November 1, 2017 21:00
-
-
Save drawers/b5e49e5d68dac4d70055ba919e6501dd to your computer and use it in GitHub Desktop.
An Espresso test
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 testShowAlertDialog() throws Exception { | |
//act | |
registrationActivity.showAlertDialog("No internet available.") | |
ScreenShotter.takeScreenshot("details", activity); | |
//assert | |
onView(withId(R.id.custom_alert_dialog_picture)).check(matches(isCompletelyDisplayed())); | |
onView(withId(R.id.custom_alert_dialog_button)).check(matches(withText("Shucks"))); | |
onView(withId(R.id.custom_alert_dialog_button)).check(matches("No internet available.")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment