mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-02-20 11:18:21 +00:00
Merge "Fix tapl tests for overview actions in fallback recents." into sc-v2-dev am: 22d7524f53
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16182391 Change-Id: Iedec936c8c9c904b2be13d4589958b0ccc5f9a73
This commit is contained in:
@@ -212,7 +212,7 @@ public class BaseOverview extends LauncherInstrumentation.VisibleContainer {
|
||||
try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
|
||||
"want to get overview actions")) {
|
||||
verifyActiveContainer();
|
||||
UiObject2 overviewActions = mLauncher.waitForLauncherObject("action_buttons");
|
||||
UiObject2 overviewActions = mLauncher.waitForOverviewObject("action_buttons");
|
||||
return new OverviewActions(overviewActions, mLauncher);
|
||||
}
|
||||
}
|
||||
@@ -224,19 +224,16 @@ public class BaseOverview extends LauncherInstrumentation.VisibleContainer {
|
||||
return mLauncher.hasLauncherObject(mLauncher.getOverviewObjectSelector("clear_all"));
|
||||
}
|
||||
|
||||
/* TODO(b/197630182): Once b/188790554 is fixed, remove instanceof check. Currently, when
|
||||
swiping from app to overview in Fallback Recents, taskbar remains and no action buttons
|
||||
are visible, so we are only testing Overview for now, not BaseOverview. */
|
||||
private void verifyActionsViewVisibility() {
|
||||
if (!(this instanceof Overview) || !hasTasks()) {
|
||||
if (!hasTasks()) {
|
||||
return;
|
||||
}
|
||||
try (LauncherInstrumentation.Closable c = mLauncher.addContextLayer(
|
||||
"want to assert overview actions view visibility")) {
|
||||
if (mLauncher.isTablet() && !isOverviewSnappedToFocusedTaskForTablet()) {
|
||||
mLauncher.waitUntilLauncherObjectGone("action_buttons");
|
||||
mLauncher.waitUntilOverviewObjectGone("action_buttons");
|
||||
} else {
|
||||
mLauncher.waitForLauncherObject("action_buttons");
|
||||
mLauncher.waitForOverviewObject("action_buttons");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1029,6 +1029,10 @@ public final class LauncherInstrumentation {
|
||||
waitUntilGoneBySelector(getLauncherObjectSelector(resId));
|
||||
}
|
||||
|
||||
void waitUntilOverviewObjectGone(String resId) {
|
||||
waitUntilGoneBySelector(getOverviewObjectSelector(resId));
|
||||
}
|
||||
|
||||
void waitUntilLauncherObjectGone(BySelector selector) {
|
||||
waitUntilGoneBySelector(makeLauncherSelector(selector));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user