diff options
author | vadimt <vadimt@google.com> | 2019-07-16 16:19:58 -0700 |
---|---|---|
committer | vadimt <vadimt@google.com> | 2019-07-16 16:46:53 -0700 |
commit | 6a75e52f85c751b4b2832c312abd09e7812611e2 (patch) | |
tree | ad5808d385c03302b3b04534542aa8ccd9dc8ef2 /tests/tapl | |
parent | d3bff6043aca5d7fc97e947805ca7c17178fbc68 (diff) | |
download | android_packages_apps_Trebuchet-6a75e52f85c751b4b2832c312abd09e7812611e2.tar.gz android_packages_apps_Trebuchet-6a75e52f85c751b4b2832c312abd09e7812611e2.tar.bz2 android_packages_apps_Trebuchet-6a75e52f85c751b4b2832c312abd09e7812611e2.zip |
Getting starting point of swipe from overview to all apps via protocol
Change-Id: Idf04579b67011dac45b081a81367cde2d1274117
Diffstat (limited to 'tests/tapl')
-rw-r--r-- | tests/tapl/com/android/launcher3/tapl/Overview.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/tapl/com/android/launcher3/tapl/Overview.java b/tests/tapl/com/android/launcher3/tapl/Overview.java index 058831f18..da68da3ba 100644 --- a/tests/tapl/com/android/launcher3/tapl/Overview.java +++ b/tests/tapl/com/android/launcher3/tapl/Overview.java @@ -19,9 +19,9 @@ package com.android.launcher3.tapl; import static com.android.launcher3.testing.TestProtocol.ALL_APPS_STATE_ORDINAL; import androidx.annotation.NonNull; -import androidx.test.uiautomator.UiObject2; import com.android.launcher3.tapl.LauncherInstrumentation.ContainerType; +import com.android.launcher3.testing.TestProtocol; /** * Overview pane. @@ -51,11 +51,15 @@ public final class Overview extends BaseOverview { // Swipe from an app icon to the top. LauncherInstrumentation.log("Overview.switchToAllApps before swipe"); - final UiObject2 allApps = mLauncher.waitForLauncherObject("apps_view"); - mLauncher.swipeToState(mLauncher.getDevice().getDisplayWidth() / 2, - allApps.getVisibleBounds().top, + mLauncher.swipeToState( mLauncher.getDevice().getDisplayWidth() / 2, - 0, 50, ALL_APPS_STATE_ORDINAL); + mLauncher.getTestInfo( + TestProtocol.REQUEST_HOTSEAT_TOP). + getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD), + mLauncher.getDevice().getDisplayWidth() / 2, + 0, + 50, + ALL_APPS_STATE_ORDINAL); try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer( "swiped all way up from overview")) { |