Merge "Test Uninstall Flakiness" into udc-qpr-dev am: ee1e3b3686

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23680187

Change-Id: I20d98ebbb3a198323b7dc53c309a41b7aeca08f7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Andrew Cole
2023-06-14 17:03:38 +00:00
committed by Automerger Merge Worker
@@ -23,7 +23,6 @@ import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeTrue;
@@ -58,6 +57,7 @@ import com.android.launcher3.tapl.Workspace;
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
import com.android.launcher3.util.LauncherLayoutBuilder;
import com.android.launcher3.util.TestUtil;
import com.android.launcher3.util.Wait;
import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord;
import com.android.launcher3.util.rule.TISBindRule;
import com.android.launcher3.widget.picker.WidgetsFullSheet;
@@ -507,13 +507,9 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
private void verifyAppUninstalledFromAllApps(Workspace workspace, String appName) {
final HomeAllApps allApps = workspace.switchToAllApps();
allApps.freeze();
try {
assertNull(appName + " app was found on all apps after being uninstalled",
allApps.tryGetAppIcon(appName));
} finally {
allApps.unfreeze();
}
Wait.atMost(appName + " app was found on all apps after being uninstalled",
() -> allApps.tryGetAppIcon(appName) == null,
DEFAULT_UI_TIMEOUT, mLauncher);
}
@Ignore("b/256615483")
@@ -540,7 +536,6 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
Workspace workspace = mLauncher.getWorkspace();
final HomeAllApps allApps = workspace.switchToAllApps();
workspace = allApps.getAppIcon(DUMMY_APP_NAME).uninstall();
waitForLauncherUIUpdate();
verifyAppUninstalledFromAllApps(workspace, DUMMY_APP_NAME);
} finally {
TestUtil.uninstallDummyApp();