Moving Wait to kotlin

Making LauncherInstrumentation optional and removing some reduntant constants.
This allows less dependency on AbstractLauncherUITest

Bug: 377772352
Test: Presubmit
Flag: EXEMPT test refactor
Change-Id: I7cf78d6acc5fef0359dee141a06fd51ff9d4f5a8
This commit is contained in:
Sunny Goyal committed 2024-11-07 13:51:27 -08:00
1 parent d39c31da74
commit 8bbe47c31b
14 files changed
+118 -117

No files matched your search

@@ -103,12 +103,12 @@ public class TaplAddConfigWidgetTest extends AbstractLauncherUiTest<Launcher> {
setResultAndWaitForAnimation(acceptConfig);
if (acceptConfig) {
Wait.atMost("", new WidgetSearchCondition(), DEFAULT_ACTIVITY_TIMEOUT, mLauncher);
Wait.atMost("", new WidgetSearchCondition(), mLauncher);
assertNotNull(mAppWidgetManager.getAppWidgetInfo(mWidgetId));
} else {
// Verify that the widget id is deleted.
Wait.atMost("", () -> mAppWidgetManager.getAppWidgetInfo(mWidgetId) == null,
DEFAULT_ACTIVITY_TIMEOUT, mLauncher);
mLauncher);
}
}