mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 00:36:49 +00:00
Add tests to Launcher P0 CUJ Homescreen navigation via TAPL.
1. Implement API to help to get page count. 2. Add test add and delete page. Bug: 241685418 Bug: 232584721 Test: android.platform.test.scenario.launcher.integration_tests.ScreenNavigationTests#testAddAndDeletePageAndFling Change-Id: I2e04b9ef1f2ca65ba14d6939b7b51fead6b6f6ca
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user