mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-27 23:36:47 +00:00
Merge "Locking the All Apps view before asserting PS components." into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
f7ed35fc87
@@ -27,6 +27,7 @@ import android.util.Log;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import androidx.test.filters.LargeTest;
|
||||
|
||||
import com.android.launcher3.tapl.HomeAllApps;
|
||||
import com.android.launcher3.tapl.LauncherInstrumentation;
|
||||
import com.android.launcher3.tapl.PrivateSpaceContainer;
|
||||
import com.android.launcher3.util.TestUtil;
|
||||
@@ -100,10 +101,18 @@ public class TaplPrivateSpaceTest extends AbstractQuickStepTest {
|
||||
public void testPrivateSpaceContainerIsPresent() {
|
||||
// Scroll to the bottom of All Apps
|
||||
executeOnLauncher(launcher -> launcher.getAppsView().resetAndScrollToPrivateSpaceHeader());
|
||||
// Freeze All Apps
|
||||
HomeAllApps homeAllApps = mLauncher.getAllApps();
|
||||
homeAllApps.freeze();
|
||||
|
||||
// Verify Unlocked View elements are present.
|
||||
assertNotNull("Private Space Unlocked View not found, or is not correct",
|
||||
mLauncher.getAllApps().getPrivateSpaceUnlockedView());
|
||||
try {
|
||||
// Verify Unlocked View elements are present.
|
||||
assertNotNull("Private Space Unlocked View not found, or is not correct",
|
||||
homeAllApps.getPrivateSpaceUnlockedView());
|
||||
} finally {
|
||||
// UnFreeze
|
||||
homeAllApps.unfreeze();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -117,10 +126,18 @@ public class TaplPrivateSpaceTest extends AbstractQuickStepTest {
|
||||
waitForLauncherUIUpdate();
|
||||
// Scroll to the bottom of All Apps
|
||||
executeOnLauncher(launcher -> launcher.getAppsView().resetAndScrollToPrivateSpaceHeader());
|
||||
// Freeze All Apps
|
||||
HomeAllApps homeAllApps = mLauncher.getAllApps();
|
||||
homeAllApps.freeze();
|
||||
|
||||
// Verify the Installed App is displayed in correct position.
|
||||
PrivateSpaceContainer psContainer = mLauncher.getAllApps().getPrivateSpaceUnlockedView();
|
||||
psContainer.verifyInstalledAppIsPresent(INSTALLED_APP_NAME);
|
||||
try {
|
||||
// Verify the Installed App is displayed in correct position.
|
||||
PrivateSpaceContainer psContainer = homeAllApps.getPrivateSpaceUnlockedView();
|
||||
psContainer.verifyInstalledAppIsPresent(INSTALLED_APP_NAME);
|
||||
} finally {
|
||||
// UnFreeze
|
||||
homeAllApps.unfreeze();
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -134,8 +151,17 @@ public class TaplPrivateSpaceTest extends AbstractQuickStepTest {
|
||||
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");
|
||||
// Freeze All Apps
|
||||
HomeAllApps homeAllApps = mLauncher.getAllApps();
|
||||
homeAllApps.freeze();
|
||||
|
||||
try {
|
||||
// Get the "uninstall" menu item.
|
||||
homeAllApps.getAppIcon(INSTALLED_APP_NAME).openMenu().getMenuItem("Uninstall");
|
||||
} finally {
|
||||
// UnFreeze
|
||||
homeAllApps.unfreeze();
|
||||
}
|
||||
}
|
||||
|
||||
private void waitForPrivateSpaceSetup() {
|
||||
|
||||
Reference in New Issue
Block a user