Waiting for the drop bar to go away after dragging an icon

This should remove test flakes like: https://sponge.corp.google.com/target?show=FAILED&sortBy=STATUS&id=2c560d05-9d50-4fad-9798-dc77858f2d11&target=com.android.launcher3.tests

Test: AOSP TAPL tests
Change-Id: I01899bec349ed507a03fd02196a35990c48fd46b
This commit is contained in:
Vadim Tryshev
2019-02-05 08:37:17 -08:00
committed by vadimt
parent fa8df691d1
commit 2015b3bf65
2 changed files with 2 additions and 1 deletions
@@ -350,7 +350,7 @@ public final class LauncherInstrumentation {
return new AllAppsFromOverview(this);
}
private void waitUntilGone(String resId) {
void waitUntilGone(String resId) {
assertTrue("Unexpected launcher object visible: " + resId,
mDevice.wait(Until.gone(getLauncherObjectSelector(resId)),
WAIT_TIME_MS));
@@ -115,6 +115,7 @@ public final class Workspace extends Home {
final Point dest = new Point(
mLauncher.getDevice().getDisplayWidth(), workspace.getVisibleBounds().centerY());
app.getObject().drag(dest, ICON_DRAG_SPEED);
mLauncher.waitUntilGone("drop_target_bar");
verifyActiveContainer();
}