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

Commit 1c7ca891 authored by Anushree Ganjam's avatar Anushree Ganjam Committed by Android (Google) Code Review
Browse files

Merge "Add Uninstall App test for private space apps." into main

parents 9af43dfd 7690f874
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(),