Increase timeout and additional logs for WorkTabTest#testWorkEduFlow

Bug: 159671700
Test: WorkTabTest#testWorkEduFlow
Change-Id: I5c015fbb9555be0e3e74c721873da4edd0393c8a
This commit is contained in:
Samuel Fufa 2021-01-13 10:26:00 -06:00
parent 992ab43390
commit a5f289a605
1 changed files with 5 additions and 1 deletions

View File

@ -150,11 +150,15 @@ public class WorkTabTest extends AbstractLauncherUiTest {
waitForLauncherCondition("Launcher did not show the next edu screen", l -> {
Log.d(TestProtocol.WORK_PROFILE_REMOVED,
"running test attempt" + attempt.getAndIncrement());
if (!(l.getAppsView().getContentView() instanceof AllAppsPagedView)) {
Log.d(TestProtocol.WORK_PROFILE_REMOVED, "Work tab not setup. Skipping test");
return false;
}
return ((AllAppsPagedView) l.getAppsView().getContentView()).getCurrentPage()
== WORK_PAGE && ((TextView) workEduView.findViewById(
R.id.content_text)).getText().equals(
l.getResources().getString(R.string.work_profile_edu_work_apps));
});
}, 60000);
}
@Test