diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b175bb0..60b6065 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -59,7 +59,9 @@ jobs: arch: x86_64 disable-animations: true emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim - script: ./gradlew connectedFossDebugAndroidTest connectedPlayDebugAndroidTest --stacktrace + # One rerun on the same emulator: a slow software-rendered emulator flakes now and then, and a + # real crash fails both runs. + script: ./gradlew connectedFossDebugAndroidTest connectedPlayDebugAndroidTest --stacktrace || ./gradlew connectedFossDebugAndroidTest connectedPlayDebugAndroidTest --stacktrace - uses: actions/upload-artifact@v7 if: failure() with: diff --git a/app/src/androidTest/kotlin/com/apollof/protocoltracker/SmokeTest.kt b/app/src/androidTest/kotlin/com/apollof/protocoltracker/SmokeTest.kt index 12caed5..84f39bd 100644 --- a/app/src/androidTest/kotlin/com/apollof/protocoltracker/SmokeTest.kt +++ b/app/src/androidTest/kotlin/com/apollof/protocoltracker/SmokeTest.kt @@ -112,6 +112,9 @@ class SmokeTest { waitFor(log, unmerged = true) compose.onNode(log, useUnmergedTree = true).click() waitForText("Systolic, diastolic and pulse") + // Same as closeSheet: the menu's text shows before its window takes focus, and a row tapped in between did nothing. + Espresso.onView(isRoot()).inRoot(isDialog()).check { _, _ -> } + compose.waitForIdle() } /** Opens a Log menu row, waits for [shows] and closes the sheet. */