Asking the test to wait for launcher to commit the uninstall transaction before opening all apps.
Bug: 258071914
Test: Run testUnintallFromAllApps
Change-Id: Iceba2650e24b06c162f42767955fa6ae3e3b19c8
diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
index 5f516eb..0507f0a 100644
--- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
+++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
@@ -506,7 +506,6 @@
@Test
@PortraitLandscape
- @ScreenRecord // (b/256659409)
public void testUninstallFromAllApps() throws Exception {
installDummyAppAndWaitForUIUpdate();
try {
@@ -515,6 +514,8 @@
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();
}