From 1c794082a7b6eabd45533e34d49cac66554bc004 Mon Sep 17 00:00:00 2001 From: Jagrut Desai Date: Tue, 11 Jun 2024 15:02:36 -0700 Subject: [PATCH] Fixing TaplUninstallRemoveTest#uninstallWorkspaceIcon Test: Presubmit Bug: 319501259 Flag: TEST_ONLY Change-Id: I69d64ac8a0a496c947acf7fdce142a37005aeedc --- tests/tapl/com/android/launcher3/tapl/Workspace.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tapl/com/android/launcher3/tapl/Workspace.java b/tests/tapl/com/android/launcher3/tapl/Workspace.java index 4fa93ef2ca..9ac6768f42 100644 --- a/tests/tapl/com/android/launcher3/tapl/Workspace.java +++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java @@ -444,6 +444,8 @@ public final class Workspace extends Home { Runnable expectLongClickEvents) { try (LauncherInstrumentation.Closable c = launcher.addContextLayer( "uninstalling app icon")) { + + final String appNameToUninstall = homeAppIcon.getAppName(); dragIconToWorkspace( launcher, homeAppIcon, @@ -468,7 +470,10 @@ public final class Workspace extends Home { try (LauncherInstrumentation.Closable c1 = launcher.addContextLayer( "uninstalled app by dragging to the drop bar")) { - return new Workspace(launcher); + final Workspace newWorkspace = new Workspace(launcher); + launcher.waitUntilLauncherObjectGone( + AppIcon.getAppIconSelector(appNameToUninstall)); + return newWorkspace; } } }