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

Commit 05511943 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias Committed by Android (Google) Code Review
Browse files

Merge "Add TAPL test cases for KQS from taskbar all apps." into main

parents 548add27 853d7d3b
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ import androidx.test.filters.LargeTest;
import androidx.test.runner.AndroidJUnit4;

import com.android.launcher3.tapl.KeyboardQuickSwitch;
import com.android.launcher3.tapl.LaunchedAppState;
import com.android.launcher3.tapl.Taskbar;
import com.android.launcher3.taskbar.KeyboardQuickSwitchController;
import com.android.launcher3.ui.AbstractLauncherUiTest;

@@ -36,6 +38,7 @@ public class TaplTestsKeyboardQuickSwitch extends AbstractQuickStepTest {
    private enum TestSurface {
        HOME(true),
        LAUNCHED_APP(false),
        TASKBAR_ALL_APPS(false),
        HOME_ALL_APPS(true),
        WIDGETS(true);

@@ -81,6 +84,11 @@ public class TaplTestsKeyboardQuickSwitch extends AbstractQuickStepTest {
        runTest(TestSurface.LAUNCHED_APP, TestCase.DISMISS);
    }

    @Test
    public void testDismiss_fromTaskbarAllApps() {
        runTest(TestSurface.TASKBAR_ALL_APPS, TestCase.DISMISS);
    }

    @Test
    public void testDismiss_fromHomeAllApps() {
        runTest(TestSurface.HOME_ALL_APPS, TestCase.DISMISS);
@@ -101,6 +109,11 @@ public class TaplTestsKeyboardQuickSwitch extends AbstractQuickStepTest {
        runTest(TestSurface.LAUNCHED_APP, TestCase.LAUNCH_LAST_APP);
    }

    @Test
    public void testLaunchLastTask_fromTaskbarAllApps() {
        runTest(TestSurface.TASKBAR_ALL_APPS, TestCase.LAUNCH_LAST_APP);
    }

    @Test
    public void testLaunchLastTask_fromHomeAllApps() {
        runTest(TestSurface.HOME_ALL_APPS, TestCase.LAUNCH_LAST_APP);
@@ -121,6 +134,11 @@ public class TaplTestsKeyboardQuickSwitch extends AbstractQuickStepTest {
        runTest(TestSurface.LAUNCHED_APP, TestCase.LAUNCH_SELECTED_APP);
    }

    @Test
    public void testLaunchSelectedTask_fromTaskbarAllApps() {
        runTest(TestSurface.TASKBAR_ALL_APPS, TestCase.LAUNCH_SELECTED_APP);
    }

    @Test
    public void testLaunchSelectedTask_fromHomeAllApps() {
        runTest(TestSurface.HOME_ALL_APPS, TestCase.LAUNCH_SELECTED_APP);
@@ -141,6 +159,11 @@ public class TaplTestsKeyboardQuickSwitch extends AbstractQuickStepTest {
        runTest(TestSurface.LAUNCHED_APP, TestCase.LAUNCH_OVERVIEW);
    }

    @Test
    public void testLaunchOverviewTask_fromTaskbarAllApps() {
        runTest(TestSurface.TASKBAR_ALL_APPS, TestCase.LAUNCH_OVERVIEW);
    }

    @Test
    public void testLaunchOverviewTask_fromHomeAllApps() {
        runTest(TestSurface.HOME_ALL_APPS, TestCase.LAUNCH_OVERVIEW);
@@ -165,6 +188,12 @@ public class TaplTestsKeyboardQuickSwitch extends AbstractQuickStepTest {
                mLauncher.setIgnoreTaskbarVisibility(true);
                kqs = mLauncher.getLaunchedAppState().showQuickSwitchView();
                break;
            case TASKBAR_ALL_APPS:
                LaunchedAppState launchedApp = mLauncher.getLaunchedAppState();
                Taskbar taskbar = mLauncher.isTransientTaskbar()
                        ? launchedApp.swipeUpToUnstashTaskbar() : launchedApp.getTaskbar();
                kqs = taskbar.openAllApps().showQuickSwitchView();
                break;
            case HOME_ALL_APPS:
                kqs = mLauncher.goHome().switchToAllApps().showQuickSwitchView();
                break;