summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPinyao Ting <pinyaoting@google.com>2019-11-14 10:51:39 -0800
committerPinyao Ting <pinyaoting@google.com>2019-11-15 01:55:13 +0000
commit838f4393b6a308a89b49eb1edb38ba98e0fac514 (patch)
tree603b1b75d9ad32157d263168b3a2c6eddd132e8b /tests
parent49e72ac059ea24642c07e0a4046f7d7964c4a65c (diff)
downloadandroid_packages_apps_Trebuchet-838f4393b6a308a89b49eb1edb38ba98e0fac514.tar.gz
android_packages_apps_Trebuchet-838f4393b6a308a89b49eb1edb38ba98e0fac514.tar.bz2
android_packages_apps_Trebuchet-838f4393b6a308a89b49eb1edb38ba98e0fac514.zip
fix custom shortcut test
Bug: 143725213 Change-Id: I296452faea67568b39a35968bb813dc4e51a51fc Merged-In: I296452faea67568b39a35968bb813dc4e51a51fc
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java17
-rw-r--r--tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java18
2 files changed, 18 insertions, 17 deletions
diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
index 98a0a01a4..2cf6c2ba7 100644
--- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
+++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
@@ -342,23 +342,6 @@ 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
- @Ignore // b/143725213
- @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();
}
diff --git a/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java
index b8ca5ded3..f9d1d93b3 100644
--- a/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java
@@ -69,4 +69,22 @@ public class AddWidgetTest extends AbstractLauncherUiTest {
assertNotNull("Widget not found on the workspace", widget);
widget.launch(getAppPackageName());
}
+
+ /**
+ * 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() throws Throwable {
+ clearHomescreen();
+ mDevice.pressHome();
+ mLauncher.getWorkspace().openAllWidgets()
+ .getWidget("com.android.launcher3.testcomponent.CustomShortcutConfigActivity")
+ .dragToWorkspace();
+ mLauncher.getWorkspace().getWorkspaceAppIcon("Shortcut")
+ .launch(getAppPackageName());
+ }
}