Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/commands/connected-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ gcloud firebase test android run \
--type instrumentation \
--app app/build/outputs/apk/debug/app-debug.apk \
--test app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk \
--device model=Nexus5X,version=26,locale=en,orientation=portrait \
--device model=MediumPhone.arm,version=34,locale=en,orientation=portrait \
--verbosity info
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

package org.wordpress.aztec.demo

import android.os.Build
import android.util.Log
import androidx.test.rule.GrantPermissionRule
import androidx.test.runner.AndroidJUnit4
Expand All @@ -12,8 +13,11 @@ import org.junit.runner.RunWith
abstract class BaseTest {
@Rule
@JvmField
val grantPermissionRule: GrantPermissionRule = GrantPermissionRule.grant(android.Manifest.permission.CAMERA,
android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
val grantPermissionRule: GrantPermissionRule = if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
GrantPermissionRule.grant(android.Manifest.permission.CAMERA)
} else {
GrantPermissionRule.grant(android.Manifest.permission.CAMERA, android.Manifest.permission.WRITE_EXTERNAL_STORAGE)
}

companion object {
fun label(label: String) {
Expand Down
Loading