From 8a4056592e4328e1a3100d8b42ac27bd0ef16a9d Mon Sep 17 00:00:00 2001 From: MohitMali Date: Mon, 16 Oct 2023 12:52:48 +0530 Subject: [PATCH] Improved ZimHostFragmentTest. * We have made improvements to `ZimHostFragmentTest`. We added the `ACCESS_FINE_LOCATION` permission, which is required for running this test case on real devices. Additionally, we have enhanced the permission array and removed unnecessary permissions from the test case. --- .../org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt b/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt index 251be3edc..af9f008e0 100644 --- a/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt +++ b/app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt @@ -49,7 +49,7 @@ class ZimHostFragmentTest { private lateinit var activityScenario: ActivityScenario - private val permissions = if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) { + private val permissions = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { arrayOf( Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, @@ -60,7 +60,8 @@ class ZimHostFragmentTest { arrayOf( Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE, - Manifest.permission.ACCESS_COARSE_LOCATION + Manifest.permission.ACCESS_COARSE_LOCATION, + Manifest.permission.ACCESS_FINE_LOCATION ) }