Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83fef2d6 authored by Jagrut Desai's avatar Jagrut Desai Committed by Android (Google) Code Review
Browse files

Merge "Fixing TaplUninstallRemoveTest#uninstallWorkspaceIcon test" into main

parents f2ae4d30 49d44298
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -39,6 +39,7 @@ import com.android.launcher3.ui.AbstractLauncherUiTest;
import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape;
import com.android.launcher3.util.TestUtil;
import com.android.launcher3.util.Wait;
import com.android.launcher3.util.rule.ScreenRecordRule;
import com.android.launcher3.util.rule.TestStabilityRule;

import org.junit.Test;
@@ -132,6 +133,7 @@ public class TaplUninstallRemoveTest extends AbstractLauncherUiTest<Launcher> {
     */
    @Test
    @PlatinumTest(focusArea = "launcher")
    @ScreenRecordRule.ScreenRecord // b/319501259
    public void uninstallWorkspaceIcon() throws IOException {
        Point[] gridPositions = TestUtil.getCornersAndCenterPositions(mLauncher);
        StringBuilder sb = new StringBuilder();
@@ -162,12 +164,10 @@ public class TaplUninstallRemoveTest extends AbstractLauncherUiTest<Launcher> {
            mLauncher.getWorkspace().verifyWorkspaceAppIconIsGone(
                    DUMMY_APP_NAME + " was expected to disappear after uninstall.", DUMMY_APP_NAME);

            if (!TestStabilityRule.isPresubmit()) { // b/315847371
            Log.d(UIOBJECT_STALE_ELEMENT, "second getWorkspaceIconsPositions()");
            Map<String, Point> finalPositions =
                    mLauncher.getWorkspace().getWorkspaceIconsPositions();
            assertThat(finalPositions).doesNotContainKey(DUMMY_APP_NAME);
            }
        } finally {
            TestUtil.uninstallDummyApp();
        }
+1 −0
Original line number Diff line number Diff line
@@ -347,6 +347,7 @@ public final class Workspace extends Home {
     */
    public Map<String, Point> getWorkspaceIconsPositions() {
        final UiObject2 workspace = verifyActiveContainer();
        mLauncher.waitForLauncherInitialized(); // b/319501259
        List<UiObject2> workspaceIcons =
                mLauncher.waitForObjectsInContainer(workspace, AppIcon.getAnyAppIconSelector());
        return workspaceIcons.stream()