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
2021-10-14 14:43:55 +01:00
parent 4d6f3d67d2
commit 22be1a47f4
6 changed files with 43 additions and 9 deletions

View File

@@ -85,7 +85,7 @@ public class AddConfigWidgetTest extends AbstractLauncherUiTest {
* @param acceptConfig accept the config activity
*/
private void runTest(boolean acceptConfig) throws Throwable {
clearHomescreen();
clearWorkspace();
mDevice.pressHome();
final Widgets widgets = mLauncher.getWorkspace().openAllWidgets();