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

Commit 2152b045 authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Wait for RecentsActivity to stop after dismissing all tasks

Bug: 313926097
Flag: N/A
Test: presubmit
Change-Id: I9afc27d4096417acaa1d4fb39de08b2a1ed8712a
parent 2d3e5d4e
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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));
    }