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.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
index 2cf6c2ba7..709822bbb 100644
--- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
+++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
@@ -342,6 +342,22 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
}
}
+ /**
+ * Test dragging a custom shortcut to the workspace and launch it.
+ *
+ * A custom shortcut is a 1x1 widget that launches a specific intent when user tap on it.
+ * Custom shortcuts are replaced by deep shortcuts after api 25.
+ */
+ @Test
+ @PortraitLandscape
+ public void testDragCustomShortcut() {
+ mLauncher.getWorkspace().openAllWidgets()
+ .getWidget("com.android.launcher3.testcomponent.CustomShortcutConfigActivity")
+ .dragToWorkspace();
+ mLauncher.getWorkspace().getWorkspaceAppIcon("Shortcut")
+ .launch(getAppPackageName());
+ }
+
public static String getAppPackageName() {
return getInstrumentation().getContext().getPackageName();
}