Waiting for Launcher stop when dropping a widget that starts an activity
This will help to ensure that Launcher state has settled before continuing the test. Bug: 313926097 Flag: N/A Test: presubmit Change-Id: I810c3bd1da2839a482422396536acd664f3e4b82
This commit is contained in:
@@ -20,8 +20,6 @@ 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 {
|
||||
|
||||
@@ -61,12 +59,9 @@ public class OverviewTaskMenu {
|
||||
try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck();
|
||||
LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
|
||||
"before tapping the app info menu item")) {
|
||||
mLauncher.executeAndWaitForLauncherEvent(
|
||||
mLauncher.executeAndWaitForLauncherStop(
|
||||
() -> 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(
|
||||
|
||||
Reference in New Issue
Block a user