diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2016-06-22 17:00:41 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2016-06-22 17:00:41 +0000 |
commit | fce71421bf4b2e069e4a6404b851bdcefe24a4ae (patch) | |
tree | 162f19a153b2c67d603d3d29672049889e54aa4a /tests | |
parent | 803896767b37e447bcdff7be6b9872612e93b7bf (diff) | |
parent | 8cea8194e0fac3e8a175fc4ea80acdd931e8e614 (diff) | |
download | android_packages_apps_Trebuchet-fce71421bf4b2e069e4a6404b851bdcefe24a4ae.tar.gz android_packages_apps_Trebuchet-fce71421bf4b2e069e4a6404b851bdcefe24a4ae.tar.bz2 android_packages_apps_Trebuchet-fce71421bf4b2e069e4a6404b851bdcefe24a4ae.zip |
Merge "Fix LauncherInstrumentationTestCase#openAllApps() method. b/29535532" into ub-launcher3-calgary
Diffstat (limited to 'tests')
-rw-r--r-- | tests/src/com/android/launcher3/ui/LauncherInstrumentationTestCase.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/src/com/android/launcher3/ui/LauncherInstrumentationTestCase.java b/tests/src/com/android/launcher3/ui/LauncherInstrumentationTestCase.java index a59f0ffc9..e858d17f3 100644 --- a/tests/src/com/android/launcher3/ui/LauncherInstrumentationTestCase.java +++ b/tests/src/com/android/launcher3/ui/LauncherInstrumentationTestCase.java @@ -28,6 +28,7 @@ import com.android.launcher3.LauncherSettings; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.compat.AppWidgetManagerCompat; +import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.util.ManagedProfileHeuristic; import java.io.FileInputStream; @@ -101,8 +102,14 @@ public class LauncherInstrumentationTestCase extends InstrumentationTestCase { * Opens all apps and returns the recycler view */ protected UiObject2 openAllApps() { - mDevice.wait(Until.findObject( - By.desc(mTargetContext.getString(R.string.all_apps_button_label))), DEFAULT_UI_TIMEOUT).click(); + if (FeatureFlags.LAUNCHER3_ALL_APPS_PULL_UP) { + // clicking on the page indicator brings up all apps tray on non tablets. + findViewById(R.id.page_indicator).click(); + } else { + mDevice.wait(Until.findObject( + By.desc(mTargetContext.getString(R.string.all_apps_button_label))), + DEFAULT_UI_TIMEOUT).click(); + } return findViewById(R.id.apps_list_view); } |