Skip to content

Instantly share code, notes, and snippets.

@Egorand
Created July 17, 2016 11:54
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 Egorand/7ed9e1553b1b3fc702b74bc2ca0bf95c to your computer and use it in GitHub Desktop.
Save Egorand/7ed9e1553b1b3fc702b74bc2ca0bf95c to your computer and use it in GitHub Desktop.
android-testing-runtime-permissions-should-display-short-rationale
@Test
public void b_shouldDisplayShortRationaleIfPermissionWasDenied() throws Exception {
denyCurrentPermission(device);
onView(withText(R.string.permission_denied_rationale_short)).check(matches(isDisplayed()));
onView(withText(R.string.grant_permission)).check(matches(isDisplayed()));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment