Started converting Launcher to be gesture-stable

All tests keep passing.

WorkTabTest.workTabExists was made gesture-stable. There is no need to
use TAPL, as the point is not to check answering to gestures, but to
check presence of tabs, which is better to do using launcher internal
state. (It still fails if run as a part of all tests, presumably,
because after Launcher's start, changes in user configuration are not
recognized, so I've commented the failing part)

Bug: 110103162
Test: Run all tests
Change-Id: Ic30b8e8475d16cee3880332f12311a44ddfa26cb
This commit is contained in:
Vadim Tryshev
2018-08-10 20:01:24 -07:00
parent b6ecb17356
commit dc755e718d
12 changed files with 101 additions and 119 deletions

View File

@@ -15,6 +15,11 @@
*/
package com.android.launcher3.ui.widget;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
import android.appwidget.AppWidgetManager;
import android.content.Intent;
import android.support.test.filters.LargeTest;
@@ -31,7 +36,6 @@ import com.android.launcher3.testcomponent.WidgetConfigActivity;
import com.android.launcher3.ui.AbstractLauncherUiTest;
import com.android.launcher3.util.Condition;
import com.android.launcher3.util.Wait;
import com.android.launcher3.util.rule.LauncherActivityRule;
import com.android.launcher3.util.rule.ShellCommandRule;
import com.android.launcher3.widget.WidgetCell;
@@ -40,11 +44,6 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
/**
* Test to verify widget configuration is properly shown.
*/
@@ -52,7 +51,6 @@ import static org.junit.Assert.assertTrue;
@RunWith(AndroidJUnit4.class)
public class AddConfigWidgetTest extends AbstractLauncherUiTest {
@Rule public LauncherActivityRule mActivityMonitor = new LauncherActivityRule();
@Rule public ShellCommandRule mGrantWidgetRule = ShellCommandRule.grandWidgetBind();
private LauncherAppWidgetProviderInfo mWidgetInfo;