Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bfbc121e authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Waiting for Normal state when closing search result by touching outside" into main

parents d586d054 a705fdf7
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
 */
package com.android.launcher3.tapl;

import static com.android.launcher3.testing.shared.TestProtocol.NORMAL_STATE_ORDINAL;

import android.widget.TextView;

import androidx.test.uiautomator.By;
@@ -87,7 +89,7 @@ public class SearchResultFromQsb implements SearchInputSource {
                             + (tapRight ? "right" : "left"))) {
            final UiObject2 allAppsBottomSheet =
                    mLauncher.waitForLauncherObject(BOTTOM_SHEET_RES_ID);
            mLauncher.touchOutsideContainer(allAppsBottomSheet, tapRight);
            tapOutside(tapRight, allAppsBottomSheet);
            try (LauncherInstrumentation.Closable tapped = mLauncher.addContextLayer(
                    "tapped outside AllApps bottom sheet")) {
                verifyVisibleContainerOnDismiss();
@@ -95,6 +97,13 @@ public class SearchResultFromQsb implements SearchInputSource {
        }
    }

    protected void tapOutside(boolean tapRight, UiObject2 allAppsBottomSheet) {
        mLauncher.runToState(
                () -> mLauncher.touchOutsideContainer(allAppsBottomSheet, tapRight),
                NORMAL_STATE_ORDINAL,
                "tappig outside");
    }

    protected void verifyVisibleContainerOnDismiss() {
        mLauncher.getWorkspace();
    }
+5 −0
Original line number Diff line number Diff line
@@ -50,4 +50,9 @@ public class SearchResultFromTaskbarQsb extends SearchResultFromQsb {
    protected void verifyVisibleContainerOnDismiss() {
        mLauncher.getLaunchedAppState().assertTaskbarVisible();
    }

    @Override
    protected void tapOutside(boolean tapRight, UiObject2 allAppsBottomSheet) {
        mLauncher.touchOutsideContainer(allAppsBottomSheet, tapRight);
    }
}