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

Commit 71e8dcca authored by Jagrut Desai's avatar Jagrut Desai
Browse files

Migrating Tapl Overview test to platform scenario project

 - Removes tapl overview test form platinum test suite
 - adds individual overview test to platform scenario test.

Test: Presubmit, Manual
Bug: 303256981
Flag: NONE
Change-Id: I7d04dc5dc63ba3a5e63ad03d98760dbd24c974f8
parent 39e4b611
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ import com.android.launcher3.touch.PagedOrientationHandler;
import com.android.launcher3.util.DisplayController;
import com.android.quickstep.util.LayoutUtils;
import com.android.quickstep.util.TISBindHelper;
import com.android.quickstep.views.RecentsView;

import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
@@ -77,6 +78,11 @@ public class QuickstepTestInformationHandler extends TestInformationHandler {
                return response;
            }

            case TestProtocol.REQUEST_GET_OVERVIEW_CURRENT_PAGE_INDEX: {
                return getLauncherUIProperty(Bundle::putInt,
                        launcher -> launcher.<RecentsView>getOverviewPanel().getCurrentPage());
            }

            case TestProtocol.REQUEST_HAS_TIS: {
                response.putBoolean(TestProtocol.TEST_INFO_RESPONSE_FIELD, true);
                return response;
+0 −3
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import static org.junit.Assume.assumeTrue;

import android.content.Intent;
import android.content.res.Configuration;
import android.platform.test.annotations.PlatinumTest;

import androidx.test.filters.LargeTest;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -112,7 +111,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {

    @Test
    @PortraitLandscape
    @PlatinumTest(focusArea = "launcher")
    public void testOverview() throws Exception {
        startTestAppsWithCheck();
        // mLauncher.pressHome() also tests an important case of pressing home while in background.
@@ -369,7 +367,6 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest {
    @Test
    @PortraitLandscape
    @TaskbarModeSwitch()
    @PlatinumTest(focusArea = "launcher")
    @TestStabilityRule.Stability(flavors = LOCAL | PLATFORM_POSTSUBMIT) // b/309820115
    @ScreenRecord // b/309820115
    public void testOverviewForTablet() throws Exception {
+1 −0
Original line number Diff line number Diff line
@@ -330,6 +330,7 @@ public class TestInformationHandler implements ResourceBasedOverride {
                return null;
            }
            T value = provider.apply(target);

            Bundle response = new Bundle();
            bundleSetter.set(response, TestProtocol.TEST_INFO_RESPONSE_FIELD, value);
            return response;
+2 −0
Original line number Diff line number Diff line
@@ -147,6 +147,8 @@ public final class TestProtocol {
    public static final String REQUEST_GET_GRID_TASK_SIZE_RECT_FOR_TABLET =
            "get-grid-task-size-rect-for-tablet";
    public static final String REQUEST_GET_OVERVIEW_PAGE_SPACING = "get-overview-page-spacing";
    public static final String REQUEST_GET_OVERVIEW_CURRENT_PAGE_INDEX =
            "get-overview-current-page-index";
    public static final String REQUEST_ENABLE_ROTATION = "enable_rotation";
    public static final String REQUEST_ENABLE_SUGGESTION = "enable-suggestion";
    public static final String REQUEST_MODEL_QUEUE_CLEARED = "model-queue-cleared";
+5 −0
Original line number Diff line number Diff line
@@ -406,6 +406,11 @@ public final class LauncherInstrumentation {
                .getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD);
    }

    public int getOverviewCurrentPageIndex() {
        return getTestInfo(TestProtocol.REQUEST_GET_OVERVIEW_CURRENT_PAGE_INDEX)
                .getInt(TestProtocol.TEST_INFO_RESPONSE_FIELD);
    }

    float getExactScreenCenterX() {
        return getRealDisplaySize().x / 2f;
    }