Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba00ce82 authored by Vadim Tryshev's avatar Vadim Tryshev Committed by Android (Google) Code Review
Browse files

Merge "Copy testAddAndDeletePageAndFling to Launcher tests. The next steps...

Merge "Copy testAddAndDeletePageAndFling to Launcher tests. The next steps will be changing config files to point at this test, and removing it in integration tests." into main
parents 4e520286 e989ddd9
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -627,4 +627,28 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
            allApps.unfreeze();
        }
    }

    @PlatinumTest(focusArea = "launcher")
    @Test
    public void testAddAndDeletePageAndFling() {
        Workspace workspace = mLauncher.getWorkspace();
        // Get the first app from the hotseat
        HomeAppIcon hotSeatIcon = workspace.getHotseatAppIcon(0);
        String appName = hotSeatIcon.getIconName();

        // Add one page by dragging app to page 1.
        workspace.dragIcon(hotSeatIcon, workspace.pagesPerScreen());
        assertEquals("Incorrect Page count Number",
                workspace.pagesPerScreen() * 2,
                workspace.getPageCount());

        // Delete one page by dragging app to hot seat.
        workspace.getWorkspaceAppIcon(appName).dragToHotseat(0);

        // Refresh workspace to avoid using stale container error.
        workspace = mLauncher.getWorkspace();
        assertEquals("Incorrect Page count Number",
                workspace.pagesPerScreen(),
                workspace.getPageCount());
    }
}