From 66e5c91380041974ddb850dad75d629e9e30b11a Mon Sep 17 00:00:00 2001 From: Andrew Cole Date: Fri, 10 Mar 2023 11:12:46 -0800 Subject: [PATCH] Asking the test to wait for launcher to commit the uninstall transaction before opening all apps. Bug: 258071914 Test: Run testUnintallFromAllApps Change-Id: Iceba2650e24b06c162f42767955fa6ae3e3b19c8 --- tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java index 5f516eb7fc..0507f0a7ef 100644 --- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java +++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java @@ -506,7 +506,6 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest { @Test @PortraitLandscape - @ScreenRecord // (b/256659409) public void testUninstallFromAllApps() throws Exception { installDummyAppAndWaitForUIUpdate(); try { @@ -515,6 +514,8 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest { allApps.freeze(); try { workspace = allApps.getAppIcon(DUMMY_APP_NAME).uninstall(); + // After the toast clears, then the model tries to commit the uninstall transaction + mLauncher.waitForModelQueueCleared(); } finally { allApps.unfreeze(); }