Merge "Remove IME state assertions from Helper" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
179ae14e8c
@@ -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() {
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user