Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 691eb84c authored by Nataniel Borges's avatar Nataniel Borges
Browse files

12/ Stabilize IME tests

Fix setup and wait condition to ensure tests aren't flaky

Bug: 236131465
Test: atest FlickerTests
Change-Id: If0db5ae8b85de14f1e6b13eb5ef5b7b5d9ecdb1f
parent c40b0313
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -69,12 +69,12 @@ class CloseImeAutoOpenWindowToAppTest(private val testSpec: FlickerTestParameter
    fun buildFlicker(): FlickerBuilder {
        return FlickerBuilder(instrumentation).apply {
            setup {
                test {
                eachRun {
                    testApp.launchViaIntent(wmHelper)
                }
            }
            teardown {
                test {
                eachRun {
                    testApp.exit(wmHelper)
                }
            }
+2 −3
Original line number Diff line number Diff line
@@ -104,11 +104,10 @@ class OpenImeWindowToOverViewTest(private val testSpec: FlickerTestParameter) {
     */
    private fun waitNavStatusBarVisibility(stateSync: WindowManagerStateHelper.StateSyncBuilder) {
        when {
            testSpec.isLandscapeOrSeascapeAtStart && !testSpec.isGesturalNavigation ->
                stateSync.add(statusBarInvisible)
            testSpec.isLandscapeOrSeascapeAtStart ->
                stateSync.add(statusBarInvisible)
                    .add(navBarInvisible)
            else ->
                stateSync.withNavBarStatusBarVisible()
        }
    }