Enabling screen record for some flaky tests

Bug: 187080582
Bug: 192005114
Bug: 192018189
Bug: 192010616
Test: Manual
Change-Id: I32fc0e4c9848c4def1aa6254139579bc631862cc
This commit is contained in:
Sunny Goyal
2021-06-25 12:36:22 -07:00
parent 6604eb54bf
commit 85a84e52cc
4 changed files with 91 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ import com.android.launcher3.testcomponent.RequestPinItemActivity;
import com.android.launcher3.ui.AbstractLauncherUiTest;
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/192010616
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/192005114
public void testPinWidgetNoConfig_customPreview() throws Throwable {
// Command to set custom preview
Intent command = RequestPinItemActivity.getCommandIntent(