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

Commit fe35d069 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Update split with self test since it didn't account for contextual split

* Right now we split from all apps and we stay in all apps with
contextual split.
* We now have 2 paths, if we are in contextual split then we
should select the same app from all apps again

Fixes: 323418145
Change-Id: I3bde59847b9e47951a6acdc93660b600114c3ddd
parent d4b2c8a8
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.quickstep;


import static com.android.launcher3.config.FeatureFlags.enableSplitContextually;
import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL;
import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT;

@@ -40,6 +41,7 @@ import com.android.wm.shell.Flags;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;

@@ -103,11 +105,19 @@ public class TaplTestsSplitscreen extends AbstractQuickStepTest {
                .getSplitScreenMenuItem()
                .click();

        if (enableSplitContextually()) {
            // We're staying in all apps, use same instance
            mLauncher.getAllApps()
                    .getAppIcon(CALCULATOR_APP_NAME)
                    .launch(CALCULATOR_APP_PACKAGE);
        } else {
            // We're in overview, use taskbar instance
            mLauncher.getLaunchedAppState()
                    .getTaskbar()
                    .getAppIcon(CALCULATOR_APP_NAME)
                    .launchIntoSplitScreen();
        }
    }

    @Test
    public void testSaveAppPairMenuItemExistsOnSplitPair() throws Exception {