From 0a1f7d5de5e8dae6eea2dac39404bd7ff46cf146 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Mon, 24 Jan 2022 18:55:55 +0000 Subject: [PATCH] Add ScreenRecord for a flaky test Bug: 215673732 Test: none Change-Id: I175031be50e37f7c14643475e3b44bfc514022e4 --- .../com/android/launcher3/ui/widget/RequestPinItemTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/src/com/android/launcher3/ui/widget/RequestPinItemTest.java b/tests/src/com/android/launcher3/ui/widget/RequestPinItemTest.java index ccbb662055..0c1f0cd255 100644 --- a/tests/src/com/android/launcher3/ui/widget/RequestPinItemTest.java +++ b/tests/src/com/android/launcher3/ui/widget/RequestPinItemTest.java @@ -42,6 +42,7 @@ import com.android.launcher3.ui.AbstractLauncherUiTest; import com.android.launcher3.util.LauncherBindableItemsContainer.ItemOperator; import com.android.launcher3.util.Wait; import com.android.launcher3.util.Wait.Condition; +import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord; import com.android.launcher3.util.rule.ShellCommandRule; import org.junit.Before; @@ -77,6 +78,7 @@ public class RequestPinItemTest extends AbstractLauncherUiTest { public void testEmpty() throws Throwable { /* needed while the broken tests are being fixed */ } @Test + @ScreenRecord // b/215673732 public void testPinWidgetNoConfig() throws Throwable { runTest("pinWidgetNoConfig", true, (info, view) -> info instanceof LauncherAppWidgetInfo && ((LauncherAppWidgetInfo) info).appWidgetId == mAppWidgetId && @@ -85,6 +87,7 @@ public class RequestPinItemTest extends AbstractLauncherUiTest { } @Test + @ScreenRecord // b/215673732 public void testPinWidgetNoConfig_customPreview() throws Throwable { // Command to set custom preview Intent command = RequestPinItemActivity.getCommandIntent( @@ -98,6 +101,7 @@ public class RequestPinItemTest extends AbstractLauncherUiTest { } @Test + @ScreenRecord // b/215673732 public void testPinWidgetWithConfig() throws Throwable { runTest("pinWidgetWithConfig", true, (info, view) -> info instanceof LauncherAppWidgetInfo &&