Created
July 17, 2016 11:57
-
-
Save Egorand/13d7e83431349cea37fb9d7a8836a5c1 to your computer and use it in GitHub Desktop.
android-testing-runtime-permissions-should-display-long-rationale
This file contains hidden or 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 c_shouldDisplayLongRationaleIfPermissionWasDeniedPermanently() throws Exception { | |
denyCurrentPermissionPermanently(device); | |
onView(withText(R.string.permission_denied_rationale_long)).check(matches(isDisplayed())); | |
onView(withText(R.string.grant_permission)).check(matches(isDisplayed())); | |
// will grant the permission for the next test | |
onView(withText(R.string.grant_permission)).perform(click()); | |
openPermissions(device); | |
grantPermission(device, "Contacts"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment