Removing methods from BaseLauncherActivityTest to make tests by composition

Bug: 324261526
Flag: EXEMPT test only
Test: All test using BaseLauncherActivityTest
Change-Id: If7cbe84b219b174cd51fac20f104080f735c03f4
This commit is contained in:
Sebastian Franco committed 2025-05-23 10:08:57 -07:00
1 parent 48e7365190
commit c5f5569f52
4 files changed
+45 -42

No files matched your search

@@ -63,7 +63,7 @@ public class LauncherIntentTest extends BaseLauncherActivityTest<Launcher> {
private void moveToSearchView() {
// All Apps view should be loaded
assertTrue("Launcher internal state is not All Apps",
isInState(() -> LauncherState.ALL_APPS));
getLauncherActivity().isInState(() -> LauncherState.ALL_APPS));
getLauncherActivity().executeOnLauncher(
launcher -> launcher.getAppsView().getSearchView().requestFocus()
);
@@ -71,20 +71,20 @@ public class LauncherIntentTest extends BaseLauncherActivityTest<Launcher> {
waitForLauncherCondition("Search view is not in focus.",
launcher -> launcher.getAppsView().getSearchView().hasFocus());
injectKeyEvent(KeyEvent.KEYCODE_C, true);
getLauncherActivity().injectKeyEvent(KeyEvent.KEYCODE_C, true);
// Upon key press, search recycler view should be loaded
waitForLauncherCondition("Search view not active.",
launcher -> launcher.getAppsView().getActiveRecyclerView()
instanceof SearchRecyclerView);
injectKeyEvent(KeyEvent.KEYCODE_C, false);
getLauncherActivity().injectKeyEvent(KeyEvent.KEYCODE_C, false);
}
// Checks if main adapter view is selected, search bar is out of focus and scroller is at start.
private void assertOnMainAdapterAToZView() {
// All Apps State should be loaded
assertTrue("Launcher internal state is not All Apps",
isInState(() -> LauncherState.ALL_APPS));
getLauncherActivity().isInState(() -> LauncherState.ALL_APPS));
// A-Z recycler view should be active.
waitForLauncherCondition("A-Z view not active.",