Loading tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java +0 −23 Original line number Original line Diff line number Diff line Loading @@ -18,10 +18,6 @@ package com.android.launcher3.ui; import static androidx.test.InstrumentationRegistry.getInstrumentation; import static androidx.test.InstrumentationRegistry.getInstrumentation; import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_PRESUBMIT; import static com.android.launcher3.util.rule.TestStabilityRule.RUN_FLAFOR; import static com.android.launcher3.util.rule.TestStabilityRule.UNBUNDLED_PRESUBMIT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull; Loading @@ -38,7 +34,6 @@ import com.android.launcher3.tapl.AllApps; import com.android.launcher3.tapl.AppIcon; import com.android.launcher3.tapl.AppIcon; import com.android.launcher3.tapl.AppIconMenu; import com.android.launcher3.tapl.AppIconMenu; import com.android.launcher3.tapl.AppIconMenuItem; import com.android.launcher3.tapl.AppIconMenuItem; import com.android.launcher3.tapl.TestHelpers; import com.android.launcher3.tapl.Widgets; import com.android.launcher3.tapl.Widgets; import com.android.launcher3.tapl.Workspace; import com.android.launcher3.tapl.Workspace; import com.android.launcher3.views.OptionsPopupView; import com.android.launcher3.views.OptionsPopupView; Loading Loading @@ -344,24 +339,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() { if (!TestHelpers.isInLauncherProcess()) return; // b/143725213 mLauncher.getWorkspace().openAllWidgets() .getWidget("com.android.launcher3.testcomponent.CustomShortcutConfigActivity") .dragToWorkspace(); mLauncher.getWorkspace().getWorkspaceAppIcon("Shortcut") .launch(getAppPackageName()); } public static String getAppPackageName() { public static String getAppPackageName() { return getInstrumentation().getContext().getPackageName(); return getInstrumentation().getContext().getPackageName(); } } Loading tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java +18 −2 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.launcher3.ui.widget; package com.android.launcher3.ui.widget; import static com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName; import static com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName; import static com.android.launcher3.util.rule.TestStabilityRule.UNBUNDLED_POSTSUBMIT; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue; Loading @@ -30,7 +29,6 @@ import com.android.launcher3.tapl.Widget; import com.android.launcher3.ui.AbstractLauncherUiTest; import com.android.launcher3.ui.AbstractLauncherUiTest; import com.android.launcher3.ui.TestViewHelpers; import com.android.launcher3.ui.TestViewHelpers; import com.android.launcher3.util.rule.ShellCommandRule; import com.android.launcher3.util.rule.ShellCommandRule; import com.android.launcher3.util.rule.TestStabilityRule.Stability; import org.junit.Rule; import org.junit.Rule; import org.junit.Test; import org.junit.Test; Loading Loading @@ -71,4 +69,22 @@ public class AddWidgetTest extends AbstractLauncherUiTest { assertNotNull("Widget not found on the workspace", widget); assertNotNull("Widget not found on the workspace", widget); widget.launch(getAppPackageName()); 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()); } } } Loading
tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java +0 −23 Original line number Original line Diff line number Diff line Loading @@ -18,10 +18,6 @@ package com.android.launcher3.ui; import static androidx.test.InstrumentationRegistry.getInstrumentation; import static androidx.test.InstrumentationRegistry.getInstrumentation; import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_PRESUBMIT; import static com.android.launcher3.util.rule.TestStabilityRule.RUN_FLAFOR; import static com.android.launcher3.util.rule.TestStabilityRule.UNBUNDLED_PRESUBMIT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull; Loading @@ -38,7 +34,6 @@ import com.android.launcher3.tapl.AllApps; import com.android.launcher3.tapl.AppIcon; import com.android.launcher3.tapl.AppIcon; import com.android.launcher3.tapl.AppIconMenu; import com.android.launcher3.tapl.AppIconMenu; import com.android.launcher3.tapl.AppIconMenuItem; import com.android.launcher3.tapl.AppIconMenuItem; import com.android.launcher3.tapl.TestHelpers; import com.android.launcher3.tapl.Widgets; import com.android.launcher3.tapl.Widgets; import com.android.launcher3.tapl.Workspace; import com.android.launcher3.tapl.Workspace; import com.android.launcher3.views.OptionsPopupView; import com.android.launcher3.views.OptionsPopupView; Loading Loading @@ -344,24 +339,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() { if (!TestHelpers.isInLauncherProcess()) return; // b/143725213 mLauncher.getWorkspace().openAllWidgets() .getWidget("com.android.launcher3.testcomponent.CustomShortcutConfigActivity") .dragToWorkspace(); mLauncher.getWorkspace().getWorkspaceAppIcon("Shortcut") .launch(getAppPackageName()); } public static String getAppPackageName() { public static String getAppPackageName() { return getInstrumentation().getContext().getPackageName(); return getInstrumentation().getContext().getPackageName(); } } Loading
tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java +18 −2 Original line number Original line Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.launcher3.ui.widget; package com.android.launcher3.ui.widget; import static com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName; import static com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName; import static com.android.launcher3.util.rule.TestStabilityRule.UNBUNDLED_POSTSUBMIT; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue; Loading @@ -30,7 +29,6 @@ import com.android.launcher3.tapl.Widget; import com.android.launcher3.ui.AbstractLauncherUiTest; import com.android.launcher3.ui.AbstractLauncherUiTest; import com.android.launcher3.ui.TestViewHelpers; import com.android.launcher3.ui.TestViewHelpers; import com.android.launcher3.util.rule.ShellCommandRule; import com.android.launcher3.util.rule.ShellCommandRule; import com.android.launcher3.util.rule.TestStabilityRule.Stability; import org.junit.Rule; import org.junit.Rule; import org.junit.Test; import org.junit.Test; Loading Loading @@ -71,4 +69,22 @@ public class AddWidgetTest extends AbstractLauncherUiTest { assertNotNull("Widget not found on the workspace", widget); assertNotNull("Widget not found on the workspace", widget); widget.launch(getAppPackageName()); 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()); } } }