From fb00467445e5d799714870fd11c0259b7dfb1901 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Thu, 26 Oct 2023 14:50:41 +0200 Subject: [PATCH] Grant permission for notifications to see dialog tests Signed-off-by: alperozturk --- .../java/com/owncloud/android/ui/dialog/DialogFragmentIT.java | 4 ++++ 1 file changed, 4 insertions(+) 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() {