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

Commit 7690f874 authored by Anushree Ganjam's avatar Anushree Ganjam
Browse files

Add Uninstall App test for private space apps.

Doc: go/private-space-tapl

Bug: 322882655
Test: Manual, TAPL
Flag: NA

Change-Id: I96598ad2d78e68ea0ac3bd7872243c231810023b
parent b9d8cdd9
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -123,6 +123,21 @@ public class TaplPrivateSpaceTest extends AbstractQuickStepTest {
        psContainer.verifyInstalledAppIsPresent(INSTALLED_APP_NAME);
    }

    @Test
    @ScreenRecordRule.ScreenRecord // b/334946529
    public void testPrivateSpaceAppLongPressUninstallMenu() throws IOException {
        // Ensure that the App is not installed in main user otherwise, it may not be found in
        // PS container.
        TestUtil.uninstallDummyApp();
        // Install the app in Private Profile
        TestUtil.installDummyAppForUser(mProfileUserId);
        waitForLauncherUIUpdate();
        // Scroll to the bottom of All Apps
        executeOnLauncher(launcher -> launcher.getAppsView().resetAndScrollToPrivateSpaceHeader());
        // Get the "uninstall" menu item.
        mLauncher.getAllApps().getAppIcon(INSTALLED_APP_NAME).openMenu().getMenuItem("Uninstall");
    }

    private void waitForPrivateSpaceSetup() {
        waitForLauncherCondition("Private Profile not setup",
                launcher -> launcher.getAppsView().hasPrivateProfile(),