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

Commit 878784aa authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Waiting for Launcher activity to stop in OverviewTaskMenu.tapAppInfoMenuItem" into main

parents 85cea3e0 01444246
Loading
Loading
Loading
Loading
+9 −2
Original line number Diff line number Diff line
@@ -20,6 +20,8 @@ import androidx.annotation.NonNull;
import androidx.test.uiautomator.By;
import androidx.test.uiautomator.UiObject2;

import com.android.launcher3.testing.shared.TestProtocol;

/** Represents the menu of an overview task. */
public class OverviewTaskMenu {

@@ -59,8 +61,13 @@ public class OverviewTaskMenu {
        try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck();
             LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
                     "before tapping the app info menu item")) {
            mLauncher.clickLauncherObject(
                    mLauncher.findObjectInContainer(mMenu, By.text("App info")));
            mLauncher.executeAndWaitForLauncherEvent(
                    () -> mLauncher.clickLauncherObject(
                            mLauncher.findObjectInContainer(mMenu, By.text("App info"))),
                    event -> TestProtocol.LAUNCHER_ACTIVITY_STOPPED_MESSAGE
                            .equals(event.getClassName().toString()),
                    () -> "Launcher activity didn't stop",
                    "tapped app info menu item");

            try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer(
                    "tapped app info menu item")) {