Add tests to Launcher P0 CUJ Homescreen navigation via TAPL. am: 30c3552e7e

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19773679

Change-Id: Ic6c93ba67f635f6523487848665569e67d83c990
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Qing Wang
2022-09-10 20:08:27 +00:00
committed by Automerger Merge Worker
2 changed files with 9 additions and 3 deletions

View File

@@ -214,9 +214,9 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
// Test that ensureWorkspaceIsScrollable adds a page by dragging an icon there.
executeOnLauncher(launcher -> assertFalse("Initial workspace state is scrollable",
isWorkspaceScrollable(launcher)));
workspace.verifyWorkspaceAppIconIsGone(
"Chrome app was found on empty workspace", "Chrome");
assertEquals("Initial workspace doesn't have the correct page", workspace.pagesPerScreen(),
workspace.getPageCount());
workspace.verifyWorkspaceAppIconIsGone("Chrome app was found on empty workspace", "Chrome");
workspace.ensureWorkspaceIsScrollable();
executeOnLauncher(

View File

@@ -192,6 +192,12 @@ public final class Workspace extends Home {
}
}
/** Returns the number of pages. */
public int getPageCount() {
final UiObject2 workspace = verifyActiveContainer();
return workspace.getChildCount();
}
/**
* Returns the number of pages that are visible on the screen simultaneously.
*/