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

Commit bced74f7 authored by Cosmin Băieș's avatar Cosmin Băieș Committed by Android (Google) Code Review
Browse files

Merge "Wait for the IME nav bar to become visible" into main

parents 486a59fc 82d9e978
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -866,6 +866,9 @@ public class InputMethodServiceTest {
                    () -> mActivity.showImeWithWindowInsetsController(),
                    EVENT_SHOW, true /* eventExpected */, true /* shown */, "IME is shown");

            eventually(() -> assertWithMessage("IME navigation bar is shown")
                    .that(mInputMethodService.isImeNavigationBarShownForTesting()).isTrue());

            final var backButton = getUiObject(By.res(INPUT_METHOD_NAV_BACK_ID));
            verifyInputViewStatus(
                    () -> {
@@ -892,6 +895,9 @@ public class InputMethodServiceTest {
                    () -> mActivity.showImeWithWindowInsetsController(),
                    EVENT_SHOW, true /* eventExpected */, true /* shown */, "IME is shown");

            eventually(() -> assertWithMessage("IME navigation bar is shown")
                    .that(mInputMethodService.isImeNavigationBarShownForTesting()).isTrue());

            final var backButton = getUiObject(By.res(INPUT_METHOD_NAV_BACK_ID));
            verifyInputViewStatus(
                    () -> {
@@ -927,6 +933,9 @@ public class InputMethodServiceTest {
                    },
                    EVENT_SHOW, true /* eventExpected */, true /* shown */, "IME is shown");

            eventually(() -> assertWithMessage("IME navigation bar is shown")
                    .that(mInputMethodService.isImeNavigationBarShownForTesting()).isTrue());

            final var imeSwitcherButton = getUiObject(By.res(INPUT_METHOD_NAV_IME_SWITCHER_ID));
            imeSwitcherButton.click();
            mInstrumentation.waitForIdleSync();
@@ -965,6 +974,9 @@ public class InputMethodServiceTest {
                    },
                    EVENT_SHOW, true /* eventExpected */, true /* shown */, "IME is shown");

            eventually(() -> assertWithMessage("IME navigation bar is shown")
                    .that(mInputMethodService.isImeNavigationBarShownForTesting()).isTrue());

            final var imeSwitcherButton = getUiObject(By.res(INPUT_METHOD_NAV_IME_SWITCHER_ID));
            imeSwitcherButton.longClick();
            mInstrumentation.waitForIdleSync();