From f0575814e15f8d9f4998abb8b8895c85f26c2e1d Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Mon, 31 Mar 2025 21:32:45 +0100 Subject: [PATCH] Add ScreenRecord for DigitalWellBeingToastTest Bug: 407406547 Test: DigitalWellBeingToastTest Flag: EXEMPT test only Change-Id: I45caf7e9fc6e091180bfcbabab1d06c3a302eb96 --- .../com/android/quickstep/DigitalWellBeingToastTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java b/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java index c78fe1cf54..960e4fcd98 100644 --- a/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java +++ b/quickstep/tests/src/com/android/quickstep/DigitalWellBeingToastTest.java @@ -35,11 +35,13 @@ import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.BaseLauncherActivityTest; +import com.android.launcher3.util.rule.ScreenRecordRule; import com.android.quickstep.views.DigitalWellBeingToast; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskContainer; import com.android.quickstep.views.TaskView; +import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; @@ -49,9 +51,14 @@ import java.time.Duration; @RunWith(AndroidJUnit4.class) public class DigitalWellBeingToastTest extends BaseLauncherActivityTest { + @Rule + public ScreenRecordRule mScreenRecordRule = new ScreenRecordRule(); + + public final String calculatorPackage = resolveSystemAppInfo(Intent.CATEGORY_APP_CALCULATOR).packageName; + @ScreenRecordRule.ScreenRecord // b/407406547 @Test public void testToast() { startAppFast(calculatorPackage);