Add back waitForStateTransitionToEnd to fix flakiness.

Bug: 202735477
Test: presubmit
Change-Id: I03c7e8b0c40177f4e6e38a7d9aa3e01b029effd6
This commit is contained in:
Jon Miranda
2021-11-09 17:02:31 -08:00
parent f37d7a21f2
commit 8568602aaf
2 changed files with 12 additions and 2 deletions

View File

@@ -62,10 +62,12 @@ public class WorkProfileTest extends AbstractLauncherUiTest {
mDevice.pressHome();
waitForLauncherCondition("Launcher didn't start", Objects::nonNull);
waitForState("Launcher internal state didn't switch to Normal", () -> NORMAL);
waitForStateTransitionToEnd("Launcher internal state didn't switch to Normal",
() -> NORMAL);
waitForResumed("Launcher internal state is still Background");
executeOnLauncher(launcher -> launcher.getStateManager().goToState(ALL_APPS));
waitForState("Launcher internal state didn't switch to All Apps", () -> ALL_APPS);
waitForStateTransitionToEnd("Launcher internal state didn't switch to All Apps",
() -> ALL_APPS);
}
@After