From 458825a3fc6e5ac68227b0c4ff622d134c0dbba7 Mon Sep 17 00:00:00 2001 From: Shamali P Date: Thu, 25 Jan 2024 15:07:23 +0000 Subject: [PATCH] Add the `testDragCustomShortcut` back for phones. testDragCustomShortcut was ignored, but as discussed, enabling it for phones - where the layout of picker is unchanged. Bug: 322820039 Test: Un-ignoring the test Flag: N/A Change-Id: I3607812befc58c8a46b49a2587dfa6a1b572cd5b --- .../launcher3/ui/widget/TaplAddWidgetTest.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/src/com/android/launcher3/ui/widget/TaplAddWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/TaplAddWidgetTest.java index db38c682bd..ec226af64b 100644 --- a/tests/src/com/android/launcher3/ui/widget/TaplAddWidgetTest.java +++ b/tests/src/com/android/launcher3/ui/widget/TaplAddWidgetTest.java @@ -15,6 +15,9 @@ */ package com.android.launcher3.ui.widget; +import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL; +import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT; + import static org.junit.Assert.assertNotNull; import android.platform.test.annotations.PlatinumTest; @@ -30,10 +33,11 @@ import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape; import com.android.launcher3.ui.TestViewHelpers; import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord; import com.android.launcher3.util.rule.ShellCommandRule; +import com.android.launcher3.util.rule.TestStabilityRule.Stability; import com.android.launcher3.widget.LauncherAppWidgetProviderInfo; +import org.junit.Assume; import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -89,10 +93,13 @@ public class TaplAddWidgetTest extends AbstractLauncherUiTest { * 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. */ - @Ignore + @Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) @Test @PortraitLandscape public void testDragCustomShortcut() throws Throwable { + // TODO(b/322820039): Enable test for tablets - the picker UI has changed and test needs to + // be updated to look for appropriate UI elements. + Assume.assumeFalse(mLauncher.isTablet()); new FavoriteItemsTransaction(mTargetContext).commitAndLoadHome(mLauncher); mLauncher.getWorkspace().openAllWidgets()