mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-19 10:48:19 +00:00
Merge "Add test to long press icon on home screen" into udc-qpr-dev am: f209443be9
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24497519 Change-Id: I8eb135cf3271c1cdaa18860d46063e62599d159c Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -395,6 +395,28 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLaunchHomeScreenMenuItem() {
|
||||
// Drag the test app icon to home screen and open short cut menu from the icon
|
||||
final HomeAllApps allApps = mLauncher.getWorkspace().switchToAllApps();
|
||||
allApps.freeze();
|
||||
try {
|
||||
allApps.getAppIcon(APP_NAME).dragToWorkspace(false, false);
|
||||
final AppIconMenu menu = mLauncher.getWorkspace().getWorkspaceAppIcon(
|
||||
APP_NAME).openDeepShortcutMenu();
|
||||
|
||||
executeOnLauncher(
|
||||
launcher -> assertTrue("Launcher internal state didn't switch to Showing Menu",
|
||||
isOptionsPopupVisible(launcher)));
|
||||
|
||||
final AppIconMenuItem menuItem = menu.getMenuItem(1);
|
||||
assertEquals("Wrong menu item", "Shortcut 2", menuItem.getText());
|
||||
menuItem.launch(getAppPackageName());
|
||||
} finally {
|
||||
allApps.unfreeze();
|
||||
}
|
||||
}
|
||||
|
||||
@PlatinumTest(focusArea = "launcher")
|
||||
@Test
|
||||
@PortraitLandscape
|
||||
|
||||
Reference in New Issue
Block a user