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

Commit e989ddd9 authored by Vadim Tryshev's avatar Vadim Tryshev
Browse files

Copy testAddAndDeletePageAndFling to Launcher tests.

The next steps will be changing config files to point at this test, and removing it in integration tests.

Bug: 187761685
Test: presubmit
Flag: N/A
Change-Id: Ib2a590b7d6aa99a89973a77ca43b1ab762c79fdb
parent 068d1ea8
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());
    }
}