summaryrefslogtreecommitdiffstats
path: root/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java')
-rw-r--r--tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java19
1 files changed, 13 insertions, 6 deletions
diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
index 25c461b59..06c56f2c4 100644
--- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
+++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
@@ -216,8 +216,7 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
final AppIcon app = allApps.getAppIcon("TestActivity7");
assertNotNull("AppIcon.launch returned null", app.launch(getAppPackageName()));
test.executeOnLauncher(launcher -> assertTrue(
- "Launcher activity is the top activity; expecting another activity to be the "
- + "top "
+ "Launcher activity is the top activity; expecting another activity to be the top "
+ "one",
test.isInBackground(launcher)));
} finally {
@@ -307,8 +306,11 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
switchToAllApps();
allApps.freeze();
try {
- allApps.getAppIcon(APP_NAME).dragToWorkspace();
- mLauncher.getWorkspace().getWorkspaceAppIcon(APP_NAME).launch(getAppPackageName());
+ allApps.
+ getAppIcon(APP_NAME).
+ dragToWorkspace().
+ getWorkspaceAppIcon(APP_NAME).
+ launch(getAppPackageName());
} finally {
allApps.unfreeze();
}
@@ -337,8 +339,13 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
getMenuItem(0);
final String shortcutName = menuItem.getText();
- menuItem.dragToWorkspace();
- mLauncher.getWorkspace().getWorkspaceAppIcon(shortcutName).launch(getAppPackageName());
+ // 4. Drag the first shortcut to the home screen.
+ // 5. Verify that the shortcut works on home screen
+ // (the app opens and has the same text as the shortcut).
+ menuItem.
+ dragToWorkspace().
+ getWorkspaceAppIcon(shortcutName).
+ launch(getAppPackageName());
} finally {
allApps.unfreeze();
}