Compare commits
1 Commits
6e80198695
...
bf395a6804
Author | SHA1 | Date | |
---|---|---|---|
bf395a6804 |
@ -42,6 +42,8 @@ jobs:
|
||||
uses: reactivecircus/android-emulator-runner@v2
|
||||
with:
|
||||
api-level: 29
|
||||
arch: x86_64
|
||||
cores: 6
|
||||
script: |
|
||||
./gradlew androidApp:createScreenshotDirectory
|
||||
./gradlew JacocoDebugCodeCoverage || true
|
||||
|
@ -153,6 +153,7 @@ open class WithANRException {
|
||||
"default root matcher, it may be picking a root that never takes focus. " +
|
||||
"Root:",
|
||||
)
|
||||
private val otherException = "System Ul isn't responding"
|
||||
|
||||
private fun handleAnrDialogue() {
|
||||
val device = UiDevice.getInstance(getInstrumentation())
|
||||
@ -167,7 +168,10 @@ open class WithANRException {
|
||||
Espresso.setFailureHandler { error, viewMatcher ->
|
||||
|
||||
takeScreenshot()
|
||||
if (error.message!!.contains(rootViewWithoutFocusExceptionMsg) && anrCount < 3) {
|
||||
if (error.message!!.contains(rootViewWithoutFocusExceptionMsg) &&
|
||||
error.message!!.contains(otherException) &&
|
||||
anrCount < 3
|
||||
) {
|
||||
anrCount++
|
||||
handleAnrDialogue()
|
||||
} else { // chain all failures down to the default espresso handler
|
||||
|
Loading…
x
Reference in New Issue
Block a user