Skip to content

Commit

Permalink
Improved ZimHostFragmentTest.
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
MohitMaliDeveloper committed Oct 26, 2023
1 parent c37cd71 commit e45eaff
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ZimHostFragmentTest {

private lateinit var activityScenario: ActivityScenario<KiwixMainActivity>

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,
Expand All @@ -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
)
}

Expand Down

0 comments on commit e45eaff

Please sign in to comment.