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

Commit 3a2fde4d authored by Pat Manning's avatar Pat Manning
Browse files

Go home before getting overview in test to ensure overview will exist.

Also when opening settings, do not wait for A11Y event which never fires. (added in ag/24777489, but seems to fail as mentioned here b/303329286#comment2 and tracked here b/298114205)

Fix: 307379525
Fix: 307397957
Bug: 298114205
Flag: ACONFIG com.android.launcher3.enable_overview_icon_menu TRUNKFOOD
Test: TaplOverviewIconTest
Change-Id: Icd8a47b47d22ddb32db7df6882ec655f0e6f54c1
parent fbc8b715
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ public class TaplOverviewIconTest extends AbstractLauncherUiTest {
        taskMenu.touchOutsideTaskMenuToDismiss();

        OverviewTaskMenu splitMenu =
                mLauncher.getOverview().getCurrentTask().tapSplitTaskMenu();
                mLauncher.goHome().switchToOverview().getCurrentTask().tapSplitTaskMenu();
        assertTrue("App info item not appearing in expanded split task's menu.",
                splitMenu.hasMenuItem("App info"));
        splitMenu.touchOutsideTaskMenuToDismiss();
+2 −10
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package com.android.launcher3.tapl;

import static android.view.accessibility.AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED;

import androidx.annotation.NonNull;
import androidx.test.uiautomator.By;
import androidx.test.uiautomator.UiObject2;
@@ -61,14 +59,8 @@ public class OverviewTaskMenu {
        try (LauncherInstrumentation.Closable e = mLauncher.eventsCheck();
             LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
                     "before tapping the app info menu item")) {

            mLauncher.executeAndWaitForLauncherEvent(
                    () -> mLauncher.clickLauncherObject(
                            mLauncher.findObjectInContainer(mMenu, By.text("App info"))),
                    accessibilityEvent ->
                            accessibilityEvent.getEventType() == TYPE_WINDOW_STATE_CHANGED,
                    () -> "Unable to start Settings by clicking App Info",
                    "Tap the app info menu item");
            mLauncher.clickLauncherObject(
                    mLauncher.findObjectInContainer(mMenu, By.text("App info")));

            try (LauncherInstrumentation.Closable c1 = mLauncher.addContextLayer(
                    "tapped app info menu item")) {