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

Commit 7f6baf9f authored by Samuel Fufa's avatar Samuel Fufa
Browse files

[Flake test] add state checks for WorkTabTest#testWorkEduIntermittent

Bug: 151768149
Test: labtest
Change-Id: I676175629c60662763b26ce24eba4a361784fbeb
parent ef1d1b93
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
package com.android.launcher3.ui;

import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -158,9 +159,11 @@ public class WorkTabTest extends AbstractLauncherUiTest {

        // dismiss personal edu
        mDevice.pressHome();
        waitForState("Launcher did not go home", () -> NORMAL);

        // open work tab
        executeOnLauncher(launcher -> launcher.getStateManager().goToState(ALL_APPS));
        waitForState("Launcher did not switch to all apps", () -> ALL_APPS);
        executeOnLauncher(launcher -> {
            AllAppsPagedView pagedView = (AllAppsPagedView) launcher.getAppsView().getContentView();
            pagedView.setCurrentPage(WORK_PAGE);