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

Commit 0cde81a5 authored by Schneider Victor-tulias's avatar Schneider Victor-tulias
Browse files

Fix failing test TaplTaskbarTest#testHideShowTaskbar

Closing the Taskbar all apps page doesn't automatically close any open popup menus. This lead to the popup menu opened in TaplTaskbarTests#testOpenMenu_FromTaskbarAllApps remaining open after going home in setUp (before running TaplTaskbarTest#testHideShowTaskbar). The the workspace is not visible to the tests while the popup menu is open, so this test would consistenly fail.

Bug: 215218813
Fixes: 224597087
Test: Ran tests locally and remotely
Change-Id: I81d8eb1e99a264611749eb3c508f707988c0fcb1
parent 763fd21b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static com.android.launcher3.taskbar.allapps.TaskbarAllAppsSlideInView.DE
import static com.android.launcher3.taskbar.allapps.TaskbarAllAppsSlideInView.DEFAULT_OPEN_DURATION;
import static com.android.launcher3.util.OnboardingPrefs.ALL_APPS_VISITED_COUNT;

import com.android.launcher3.AbstractFloatingView;
import com.android.launcher3.appprediction.AppsDividerView;
import com.android.launcher3.appprediction.PredictionRowView;
import com.android.launcher3.taskbar.TaskbarStashController;
@@ -83,6 +84,8 @@ final class TaskbarAllAppsViewController {
        mTaskbarStashController.updateStateForFlag(FLAG_STASHED_IN_APP_ALL_APPS, true);
        mTaskbarStashController.applyState(DEFAULT_OPEN_DURATION);
        mSlideInView.setOnCloseBeginListener(() -> {
            AbstractFloatingView.closeOpenContainer(
                    mContext, AbstractFloatingView.TYPE_ACTION_POPUP);
            mTaskbarStashController.updateStateForFlag(
                    FLAG_STASHED_IN_APP_ALL_APPS, false);
            mTaskbarStashController.applyState(DEFAULT_CLOSE_DURATION);