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
This commit is contained in:
Pat Manning
2023-10-24 11:33:50 +01:00
parent fbc8b715c3
commit 3a2fde4db4
2 changed files with 3 additions and 11 deletions
@@ -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")) {