Merge "Fix two panel tapl test dragging issue"
diff --git a/tests/src/com/android/launcher3/ui/workspace/TwoPanelWorkspaceTest.java b/tests/src/com/android/launcher3/ui/workspace/TwoPanelWorkspaceTest.java
index 122a130..d0daefc 100644
--- a/tests/src/com/android/launcher3/ui/workspace/TwoPanelWorkspaceTest.java
+++ b/tests/src/com/android/launcher3/ui/workspace/TwoPanelWorkspaceTest.java
@@ -64,8 +64,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testDragIconToRightPanel() {
Workspace workspace = mLauncher.getWorkspace();
@@ -79,8 +78,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testSinglePageDragIconWhenMultiplePageScrollingIsPossible() {
Workspace workspace = mLauncher.getWorkspace();
@@ -134,8 +132,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testDragIconToPage2() {
Workspace workspace = mLauncher.getWorkspace();
@@ -151,8 +148,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testDragIconToPage3() {
Workspace workspace = mLauncher.getWorkspace();
@@ -168,8 +164,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testMultiplePageDragIcon() {
Workspace workspace = mLauncher.getWorkspace();
@@ -215,8 +210,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testEmptyPageDoesNotGetRemovedIfPagePairIsNotEmpty() {
Workspace workspace = mLauncher.getWorkspace();
@@ -256,8 +250,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testEmptyPagesGetRemovedIfBothPagesAreEmpty() {
Workspace workspace = mLauncher.getWorkspace();
@@ -284,8 +277,7 @@
}
@Test
- // TODO(b/197631877) Enable in portrait.
- // @PortraitLandscape
+ @PortraitLandscape
public void testMiddleEmptyPagesGetRemoved() {
Workspace workspace = mLauncher.getWorkspace();
diff --git a/tests/tapl/com/android/launcher3/tapl/Workspace.java b/tests/tapl/com/android/launcher3/tapl/Workspace.java
index 6e10b28..4f4ce30 100644
--- a/tests/tapl/com/android/launcher3/tapl/Workspace.java
+++ b/tests/tapl/com/android/launcher3/tapl/Workspace.java
@@ -385,7 +385,8 @@
// Since the destination can be on another page, we need to drag to the edge first
// until we reach the target page
while (targetDest.x > displayX || targetDest.x < 0) {
- int edgeX = targetDest.x > 0 ? displayX : 0;
+ // TODO: b/219919285
+ int edgeX = targetDest.x > 0 ? displayX - 1 : 1;
Point screenEdge = new Point(edgeX, targetDest.y);
Point finalDragStart = dragStart;
executeAndWaitForPageScroll(launcher,