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

Commit 9e43839b authored by vadimt's avatar vadimt Committed by Automerger Merge Worker
Browse files

TAPL waits for widgets recycler to become scrollable am: 9915a7c6

Change-Id: I53115310c8d8aad654e5ef7b8bcbad042f773eab
parents fdcbe6ca 9915a7c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -193,6 +193,7 @@ public class WidgetsFullSheet extends BaseWidgetSheet
                    .setDuration(DEFAULT_OPEN_DURATION)
                    .setInterpolator(AnimationUtils.loadInterpolator(
                            getContext(), android.R.interpolator.linear_out_slow_in));
            mRecyclerView.setLayoutFrozen(true);
            mOpenCloseAnimator.addListener(new AnimatorListenerAdapter() {
                @Override
                public void onAnimationEnd(Animator animation) {
@@ -202,7 +203,6 @@ public class WidgetsFullSheet extends BaseWidgetSheet
                }
            });
            post(() -> {
                mRecyclerView.setLayoutFrozen(true);
                mOpenCloseAnimator.start();
                mContent.animate().alpha(1).setDuration(FADE_IN_DURATION);
            });
+5 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.launcher3.tapl;

import static com.android.launcher3.tapl.LauncherInstrumentation.WAIT_TIME_MS;

import android.graphics.Point;
import android.graphics.Rect;

@@ -23,6 +25,7 @@ import androidx.test.uiautomator.By;
import androidx.test.uiautomator.BySelector;
import androidx.test.uiautomator.Direction;
import androidx.test.uiautomator.UiObject2;
import androidx.test.uiautomator.Until;

import com.android.launcher3.tapl.LauncherInstrumentation.GestureScope;

@@ -91,6 +94,8 @@ public final class Widgets extends LauncherInstrumentation.VisibleContainer {
        try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
                "getting widget " + labelText + " in widgets list")) {
            final UiObject2 widgetsContainer = verifyActiveContainer();
            mLauncher.assertTrue("Widgets container didn't become scrollable",
                    widgetsContainer.wait(Until.scrollable(true), WAIT_TIME_MS));
            final Point displaySize = mLauncher.getRealDisplaySize();
            final BySelector labelSelector = By.clazz("android.widget.TextView").text(labelText);