Testing to see if waiting for resume will fix flaky tests.

Similar to how AbstractLauncherUITest waits for resume after
switching state to Normal.

Bug: 202735477
Test: presubmit
Change-Id: I61834d32f8005491a4e14a354dc0097b05267f7b
This commit is contained in:
Jon Miranda
2021-11-08 11:56:55 -08:00
parent 3555ef3b31
commit b9f5602d96

View File

@@ -93,6 +93,7 @@ public class WorkProfileTest extends AbstractLauncherUiTest {
waitForLauncherCondition("Launcher didn't start", Objects::nonNull);
waitForStateTransitionToEnd("Launcher internal state didn't switch to Normal",
() -> NORMAL);
waitForResumed("Launcher internal state is still Background");
executeOnLauncher(launcher -> launcher.getStateManager().goToState(ALL_APPS));
waitForStateTransitionToEnd("Launcher internal state didn't switch to All Apps",
() -> ALL_APPS);