use of com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName in project android_packages_apps_Launcher3 by AOSPA.
the class TaplTestsLauncher3 method testLaunchMenuItem.
@Test
@PortraitLandscape
public void testLaunchMenuItem() throws Exception {
final AllApps allApps = mLauncher.getWorkspace().switchToAllApps();
allApps.freeze();
try {
final AppIconMenu menu = allApps.getAppIcon(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();
}
}
use of com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName in project android_packages_apps_Launcher3 by AOSPA.
the class AddWidgetTest method testDragIcon.
@Test
@PortraitLandscape
public void testDragIcon() throws Throwable {
clearHomescreen();
mDevice.pressHome();
final LauncherAppWidgetProviderInfo widgetInfo = TestViewHelpers.findWidgetProvider(this, false);
WidgetResizeFrame resizeFrame = mLauncher.getWorkspace().openAllWidgets().getWidget(widgetInfo.getLabel(mTargetContext.getPackageManager())).dragWidgetToWorkspace();
assertTrue(mActivityMonitor.itemExists((info, view) -> info instanceof LauncherAppWidgetInfo && ((LauncherAppWidgetInfo) info).providerName.getClassName().equals(widgetInfo.provider.getClassName())).call());
assertNotNull("Widget resize frame not shown after widget add", resizeFrame);
resizeFrame.dismiss();
final Widget widget = mLauncher.getWorkspace().tryGetWidget(widgetInfo.label, DEFAULT_UI_TIMEOUT);
assertNotNull("Widget not found on the workspace", widget);
widget.launch(getAppPackageName());
}
use of com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName in project android_packages_apps_Trebuchet by LineageOS.
the class TaplTestsLauncher3 method testDragShortcut.
@Test
@PortraitLandscape
public void testDragShortcut() throws Throwable {
// 1. Open all apps and wait for load complete.
// 2. Find the app and long press it to show shortcuts.
// 3. Press icon center until shortcuts appear
final AllApps allApps = mLauncher.getWorkspace().switchToAllApps();
allApps.freeze();
try {
final AppIconMenuItem menuItem = allApps.getAppIcon(APP_NAME).openMenu().getMenuItem(0);
final String shortcutName = menuItem.getText();
menuItem.dragToWorkspace(false, false);
mLauncher.getWorkspace().getWorkspaceAppIcon(shortcutName).launch(getAppPackageName());
} finally {
allApps.unfreeze();
}
}
use of com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName in project android_packages_apps_Trebuchet by LineageOS.
the class TaplTestsQuickstep method testAppIconLaunchFromAllAppsFromOverview.
@Test
public void testAppIconLaunchFromAllAppsFromOverview() throws Exception {
if (!mLauncher.hasAllAppsInOverview()) {
return;
}
final AllApps allApps = mLauncher.getWorkspace().switchToOverview().switchToAllApps();
assertTrue("Launcher internal state is not All Apps", isInState(() -> LauncherState.ALL_APPS));
TaplTestsLauncher3.runIconLaunchFromAllAppsTest(this, allApps);
}
use of com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName in project Neo-Launcher by NeoApplications.
the class TaplTestsQuickstep method testAppIconLaunchFromAllAppsFromOverview.
@Test
public void testAppIconLaunchFromAllAppsFromOverview() throws Exception {
final AllApps allApps = mLauncher.getWorkspace().switchToOverview().switchToAllApps();
assertTrue("Launcher internal state is not All Apps", isInState(LauncherState.ALL_APPS));
TaplTestsLauncher3.runIconLaunchFromAllAppsTest(this, allApps);
}
Aggregations