mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 09:26:51 +00:00
Merge "Add screenshot test for edit state drop targets." into tm-qpr-dev am: 956631ec3a am: 423ad32120
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19852201 Change-Id: Ic7287a3a8e99e3b82c0fd28e3e4d0c14044c299f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -18,8 +18,6 @@ package com.android.launcher3.ui;
|
||||
|
||||
import static androidx.test.InstrumentationRegistry.getInstrumentation;
|
||||
|
||||
import android.platform.test.annotations.IwTest;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
@@ -31,6 +29,7 @@ import static org.junit.Assume.assumeTrue;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Point;
|
||||
import android.platform.test.annotations.IwTest;
|
||||
|
||||
import androidx.test.filters.LargeTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
@@ -435,6 +434,23 @@ public class TaplTestsLauncher3 extends AbstractLauncherUiTest {
|
||||
waitForState("Launcher internal state didn't switch to Home", () -> LauncherState.NORMAL);
|
||||
}
|
||||
|
||||
@Test
|
||||
@PortraitLandscape
|
||||
public void testDragAndCancelAppIcon() {
|
||||
final HomeAppIcon homeAppIcon = createShortcutInCenterIfNotExist(GMAIL_APP_NAME);
|
||||
Point positionBeforeDrag =
|
||||
mLauncher.getWorkspace().getWorkspaceIconsPositions().get(GMAIL_APP_NAME);
|
||||
assertNotNull("App not found in Workspace before dragging.", positionBeforeDrag);
|
||||
|
||||
mLauncher.getWorkspace().dragAndCancelAppIcon(homeAppIcon);
|
||||
|
||||
Point positionAfterDrag =
|
||||
mLauncher.getWorkspace().getWorkspaceIconsPositions().get(GMAIL_APP_NAME);
|
||||
assertNotNull("App not found in Workspace after dragging.", positionAfterDrag);
|
||||
assertEquals("App not returned to same position in Workspace after drag & cancel",
|
||||
positionBeforeDrag, positionAfterDrag);
|
||||
}
|
||||
|
||||
@Test
|
||||
@PortraitLandscape
|
||||
public void testDeleteFromWorkspace() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user