Loading quickstep/tests/src/com/android/quickstep/TaplTestsSplitscreen.java +10 −7 Original line number Diff line number Diff line Loading @@ -117,18 +117,21 @@ public class TaplTestsSplitscreen extends AbstractQuickStepTest { } @Test public void testSaveAppPairMenuItemExistsOnSplitPair() throws Exception { public void testSaveAppPairMenuItemOrActionExistsOnSplitPair() { assumeTrue("App pairs feature is currently not enabled, no test needed", Flags.enableAppPairs()); createAndLaunchASplitPair(); Overview overview = mLauncher.goHome().switchToOverview(); if (mLauncher.isGridOnlyOverviewEnabled() || !mLauncher.isTablet()) { assertTrue("Save app pair menu item is missing", mLauncher.goHome() .switchToOverview() .getCurrentTask() overview.getCurrentTask() .tapMenu() .hasMenuItem("Save app pair")); } else { overview.getOverviewActions().assertHasAction("Save app pair"); } } @Test Loading tests/tapl/com/android/launcher3/tapl/OverviewActions.java +9 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.launcher3.tapl; import androidx.annotation.NonNull; import androidx.test.uiautomator.By; import androidx.test.uiautomator.UiObject2; /** Loading Loading @@ -110,4 +111,12 @@ public class OverviewActions { } } } /** Asserts that an item matching the given string is present in the overview actions. */ public void assertHasAction(String text) { try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "want to check if the action [" + text + "] is present")) { mLauncher.waitForObjectInContainer(mOverviewActions, By.text(text)); } } } Loading
quickstep/tests/src/com/android/quickstep/TaplTestsSplitscreen.java +10 −7 Original line number Diff line number Diff line Loading @@ -117,18 +117,21 @@ public class TaplTestsSplitscreen extends AbstractQuickStepTest { } @Test public void testSaveAppPairMenuItemExistsOnSplitPair() throws Exception { public void testSaveAppPairMenuItemOrActionExistsOnSplitPair() { assumeTrue("App pairs feature is currently not enabled, no test needed", Flags.enableAppPairs()); createAndLaunchASplitPair(); Overview overview = mLauncher.goHome().switchToOverview(); if (mLauncher.isGridOnlyOverviewEnabled() || !mLauncher.isTablet()) { assertTrue("Save app pair menu item is missing", mLauncher.goHome() .switchToOverview() .getCurrentTask() overview.getCurrentTask() .tapMenu() .hasMenuItem("Save app pair")); } else { overview.getOverviewActions().assertHasAction("Save app pair"); } } @Test Loading
tests/tapl/com/android/launcher3/tapl/OverviewActions.java +9 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ package com.android.launcher3.tapl; import androidx.annotation.NonNull; import androidx.test.uiautomator.By; import androidx.test.uiautomator.UiObject2; /** Loading Loading @@ -110,4 +111,12 @@ public class OverviewActions { } } } /** Asserts that an item matching the given string is present in the overview actions. */ public void assertHasAction(String text) { try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer( "want to check if the action [" + text + "] is present")) { mLauncher.waitForObjectInContainer(mOverviewActions, By.text(text)); } } }