Skip to content

Commit d626ad7

Browse files
MohitMaliDeveloperkelson42
authored andcommitted
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.
1 parent f869a9e commit d626ad7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

app/src/androidTest/java/org/kiwix/kiwixmobile/webserver/ZimHostFragmentTest.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,16 @@ class ZimHostFragmentTest {
4949

5050
private lateinit var activityScenario: ActivityScenario<KiwixMainActivity>
5151

52-
private val permissions = if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M) {
52+
private val permissions = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
5353
arrayOf(
54-
Manifest.permission.READ_EXTERNAL_STORAGE,
55-
Manifest.permission.WRITE_EXTERNAL_STORAGE,
56-
Manifest.permission.SYSTEM_ALERT_WINDOW,
5754
Manifest.permission.NEARBY_WIFI_DEVICES
5855
)
5956
} else {
6057
arrayOf(
6158
Manifest.permission.READ_EXTERNAL_STORAGE,
6259
Manifest.permission.WRITE_EXTERNAL_STORAGE,
63-
Manifest.permission.ACCESS_COARSE_LOCATION
60+
Manifest.permission.ACCESS_COARSE_LOCATION,
61+
Manifest.permission.ACCESS_FINE_LOCATION
6462
)
6563
}
6664

0 commit comments

Comments
 (0)