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

Commit 583e0ed3 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Remove IME state assertions from Helper

To display additional error information, these assertions should be tests and not part of the transition.

Test: atest FlickerTests WMShellFlickerTests
Bug: 162925924
Change-Id: I94bd751a37487af49f9b12e55fce60305367200a
parent 80e87134
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ class ImeAppAutoFocusHelper @JvmOverloads constructor(
        wmHelper: WindowManagerStateHelper?
    ) {
        // do nothing (the app is focused automatically)
        waitAndAssertIMEShown(device, wmHelper)
        waitIMEShown(device, wmHelper)
    }

    override fun open() {
+4 −4
Original line number Diff line number Diff line
@@ -51,17 +51,17 @@ open class ImeAppHelper @JvmOverloads constructor(
                "was left in an unknown state (e.g. in split screen)"
        }
        editText.click()
        waitAndAssertIMEShown(device, wmHelper)
        waitIMEShown(device, wmHelper)
    }

    protected fun waitAndAssertIMEShown(
    protected fun waitIMEShown(
        device: UiDevice,
        wmHelper: WindowManagerStateHelper? = null
    ) {
        if (wmHelper == null) {
            device.waitForIdle()
        } else {
            require(wmHelper.waitImeWindowShown()) { "IME did not appear" }
            wmHelper.waitImeWindowShown()
        }
    }

@@ -78,7 +78,7 @@ open class ImeAppHelper @JvmOverloads constructor(
        if (wmHelper == null) {
            device.waitForIdle()
        } else {
            require(wmHelper.waitImeWindowGone()) { "IME did did not close" }
            wmHelper.waitImeWindowGone()
        }
    }
}
 No newline at end of file