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

Commit f75709e7 authored by randypfohl's avatar randypfohl
Browse files

fixing tests to match new abstraction

This change will let us move from activity to other parent views for recent viewss

Change-Id: I2424d94f799f87b2d2262da96b289aac6dfadee9
parent 547d6fc4
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@ import android.os.SystemProperties;
import androidx.test.uiautomator.By;
import androidx.test.uiautomator.Until;

import com.android.launcher3.Launcher;
import com.android.launcher3.tapl.LaunchedAppState;
import com.android.launcher3.ui.AbstractLauncherUiTest;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.quickstep.views.RecentsView;

import org.junit.rules.RuleChain;
@@ -34,7 +34,7 @@ import org.junit.rules.TestRule;
/**
 * Base class for all instrumentation tests that deal with Quickstep.
 */
public abstract class AbstractQuickStepTest extends AbstractLauncherUiTest {
public abstract class AbstractQuickStepTest extends AbstractLauncherUiTest<QuickstepLauncher> {
    public static final boolean ENABLE_SHELL_TRANSITIONS =
            SystemProperties.getBoolean("persist.wm.debug.shell_transit", true);
    @Override
@@ -46,7 +46,7 @@ public abstract class AbstractQuickStepTest extends AbstractLauncherUiTest {
    }

    @Override
    protected void onLauncherActivityClose(Launcher launcher) {
    protected void onLauncherActivityClose(QuickstepLauncher launcher) {
        RecentsView recentsView = launcher.getOverviewPanel();
        if (recentsView != null) {
            recentsView.finishRecentsAnimation(false /* toRecents */, null);
+2 −1
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@ import com.android.launcher3.Launcher
import com.android.launcher3.logging.StatsLogManager
import com.android.launcher3.logging.StatsLogManager.LauncherEvent
import com.android.launcher3.model.data.WorkspaceItemInfo
import com.android.launcher3.uioverrides.QuickstepLauncher
import com.android.launcher3.util.SplitConfigurationOptions
import com.android.quickstep.views.LauncherRecentsView
import com.android.quickstep.views.TaskView
@@ -45,7 +46,7 @@ class DesktopSystemShortcutTest {

    @get:Rule val setFlagsRule = SetFlagsRule(SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT)

    private val launcher: Launcher = mock()
    private val launcher: QuickstepLauncher = mock()
    private val statsLogManager: StatsLogManager = mock()
    private val statsLogger: StatsLogManager.StatsLogger = mock()
    private val recentsView: LauncherRecentsView = mock()
+2 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.platform.test.annotations.PlatinumTest;
import com.android.launcher3.tapl.OverviewTask.OverviewSplitTask;
import com.android.launcher3.tapl.OverviewTaskMenu;
import com.android.launcher3.ui.AbstractLauncherUiTest;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.launcher3.util.rule.TestStabilityRule;

import org.junit.Test;
@@ -35,7 +36,7 @@ import org.junit.Test;
 * This test run in both Out of process (Oop) and in-process (Ipc).
 * Tests the app Icon in overview.
 */
public class TaplOverviewIconTest extends AbstractLauncherUiTest {
public class TaplOverviewIconTest extends AbstractLauncherUiTest<QuickstepLauncher> {

    private static final String CALCULATOR_APP_PACKAGE =
            resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR);
+2 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import android.view.MotionEvent;
import androidx.test.filters.SmallTest;

import com.android.launcher3.statemanager.StatefulActivity;
import com.android.launcher3.uioverrides.QuickstepLauncher;
import com.android.quickstep.util.BorderAnimator;
import com.android.quickstep.views.TaskView;

@@ -47,7 +48,7 @@ import org.mockito.MockitoAnnotations;
public class TaskViewTest {

    @Mock
    private StatefulActivity mContext;
    private QuickstepLauncher mContext;
    @Mock
    private Resources mResource;
    @Mock
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ import org.junit.runner.RunWith;

@LargeTest
@RunWith(AndroidJUnit4.class)
public class LauncherIntentTest extends AbstractLauncherUiTest {
public class LauncherIntentTest extends AbstractLauncherUiTest<Launcher> {

    public final Intent allAppsIntent = new Intent(Intent.ACTION_ALL_APPS);

Loading