diff --git a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DialogFragmentIT.java b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DialogFragmentIT.java index 1a2bd2367fdf..a440e88a8bce 100644 --- a/app/src/androidTest/java/com/owncloud/android/ui/dialog/DialogFragmentIT.java +++ b/app/src/androidTest/java/com/owncloud/android/ui/dialog/DialogFragmentIT.java @@ -92,6 +92,7 @@ import androidx.annotation.NonNull; import androidx.fragment.app.DialogFragment; import androidx.test.espresso.intent.rule.IntentsTestRule; +import androidx.test.rule.GrantPermissionRule; import kotlin.Unit; import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; @@ -108,6 +109,9 @@ private FileDisplayActivity getFileDisplayActivity() { return activityRule.launchActivity(intent); } + @Rule + public GrantPermissionRule permissionRule = GrantPermissionRule.grant( + android.Manifest.permission.POST_NOTIFICATIONS); @After public void quitLooperIfNeeded() {