Wait for RecentsActivity to stop after dismissing all tasks
Bug: 313926097 Flag: N/A Test: presubmit Change-Id: I9afc27d4096417acaa1d4fb39de08b2a1ed8712a
This commit is contained in:
1 parent
2d3e5d4e8f
commit
2152b04520
1 file changed
+5
@@ -223,6 +223,10 @@ public class FallbackRecentsTest {
|
||||
|
||||
private void pressHomeAndWaitForOverviewClose() {
|
||||
mDevice.pressHome();
|
||||
waitForRecentsActivityStop();
|
||||
}
|
||||
|
||||
private void waitForRecentsActivityStop() {
|
||||
Wait.atMost("Recents activity didn't stop",
|
||||
() -> getFromRecents(recents -> !recents.isStarted()),
|
||||
DEFAULT_UI_TIMEOUT, mLauncher);
|
||||
@@ -276,6 +280,7 @@ public class FallbackRecentsTest {
|
||||
|
||||
// Test dismissing all tasks.
|
||||
pressHomeAndGoToOverview().dismissAllTasks();
|
||||
waitForRecentsActivityStop(); // dismissAllTasks() will close Recents
|
||||
assertTrue("Fallback Launcher not visible", TestHelpers.wait(Until.hasObject(By.pkg(
|
||||
mOtherLauncherActivity.packageName).text(FALLBACK_LAUNCHER_TITLE)), WAIT_TIME_MS));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user