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

Commit 0edb04ca authored by vadimt's avatar vadimt
Browse files

Fixing flakiness of widget tests

Change-Id: I1af6a733a3a7a89899c83d6714117ff9a51528d2
parent fc65c357
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.graphics.Point;
import android.os.Process;
import android.os.SystemClock;
import android.util.Log;
import android.view.KeyEvent;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
@@ -186,10 +187,8 @@ public class TestViewHelpers {
     */
    public static UiObject2 openWidgetsTray() {
        final UiDevice device = getDevice();
        device.pressMenu(); // Enter overview mode.
        device.wait(Until.findObject(
                By.text(getTargetContext().getString(R.string.widget_button_text))),
                AbstractLauncherUiTest.DEFAULT_UI_TIMEOUT).click();
        device.pressKeyCode(KeyEvent.KEYCODE_W, KeyEvent.META_CTRL_ON);
        device.waitForIdle();
        return findViewById(R.id.widgets_list_view);
    }