Clear only workspace shortcut / widget related tests

- This ensure hotseat to be populated with default items, so it won't result in an empty taskbar which get stashed in apps
- Workspace needs to be cleared because shortcut / widget dragging won't always work if there are items in workspace. It only happens in test due to the way we drag items.

Fix: 202546679
Test: NexusLauncherTests:com.android.launcher3.ui.widget.RequestPinItemTest
Change-Id: Ib3ded6a685eaa1b169b75fd179c9e29ca4be1e72
This commit is contained in:
Alex Chau committed 2021-10-15 16:01:44 +01:00
1 parent 4d6f3d67d2
commit 22be1a47f4
6 files changed
+43 -9

No files matched your search

@@ -47,7 +47,7 @@ public class AddWidgetTest extends AbstractLauncherUiTest {
@Test
@PortraitLandscape
public void testDragIcon() throws Throwable {
clearHomescreen();
clearWorkspace();
mDevice.pressHome();
final LauncherAppWidgetProviderInfo widgetInfo =
@@ -81,7 +81,7 @@ public class AddWidgetTest extends AbstractLauncherUiTest {
@Test
@PortraitLandscape
public void testDragCustomShortcut() throws Throwable {
clearHomescreen();
clearWorkspace();
mDevice.pressHome();
mLauncher.getWorkspace().openAllWidgets()
.getWidget("com.android.launcher3.testcomponent.CustomShortcutConfigActivity")