From f80688a2019755c1cb6907e7b933aebf088afe64 Mon Sep 17 00:00:00 2001 From: Mike Schneider Date: Mon, 3 Jun 2024 11:49:51 +0200 Subject: Annotate existing motion tests with @MotionTest This ensures they are picked up in the presubmit to changes to the motion test library Bug: 343327092 Flag: TEST_ONLY Test: presubmit Test: Ran the tests of ComposeSceneTransitionLayoutLib in Studio Change-Id: I3386da29bce294d5322c12b0cee55aa61fcd8ed1 --- packages/SystemUI/compose/scene/tests/Android.bp | 1 + .../android/compose/animation/scene/transformation/AnchoredSizeTest.kt | 2 ++ .../tests/src/com/android/systemui/animation/TransitionAnimatorTest.kt | 2 ++ .../com/android/systemui/bouncer/ui/composable/BouncerContentTest.kt | 2 ++ .../com/android/systemui/bouncer/ui/composable/PatternBouncerTest.kt | 2 ++ 5 files changed, 9 insertions(+) diff --git a/packages/SystemUI/compose/scene/tests/Android.bp b/packages/SystemUI/compose/scene/tests/Android.bp index 3509504b6357..2ab27af37700 100644 --- a/packages/SystemUI/compose/scene/tests/Android.bp +++ b/packages/SystemUI/compose/scene/tests/Android.bp @@ -37,6 +37,7 @@ android_test { ], static_libs: [ + "platform-test-annotations", "PlatformComposeSceneTransitionLayoutTestsUtils", "PlatformMotionTestingCompose", "androidx.test.runner", diff --git a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/transformation/AnchoredSizeTest.kt b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/transformation/AnchoredSizeTest.kt index 7b992124d836..6233608dfad0 100644 --- a/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/transformation/AnchoredSizeTest.kt +++ b/packages/SystemUI/compose/scene/tests/src/com/android/compose/animation/scene/transformation/AnchoredSizeTest.kt @@ -16,6 +16,7 @@ package com.android.compose.animation.scene.transformation +import android.platform.test.annotations.MotionTest import androidx.compose.animation.core.LinearEasing import androidx.compose.animation.core.tween import androidx.compose.foundation.layout.Box @@ -38,6 +39,7 @@ import platform.test.motion.compose.createComposeMotionTestRule import platform.test.motion.testing.createGoldenPathManager @RunWith(AndroidJUnit4::class) +@MotionTest class AnchoredSizeTest { private val goldenPaths = createGoldenPathManager("frameworks/base/packages/SystemUI/compose/scene/tests/goldens") diff --git a/packages/SystemUI/tests/src/com/android/systemui/animation/TransitionAnimatorTest.kt b/packages/SystemUI/tests/src/com/android/systemui/animation/TransitionAnimatorTest.kt index 259ece9fdf3f..6c42662f2cdd 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/animation/TransitionAnimatorTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/animation/TransitionAnimatorTest.kt @@ -18,6 +18,7 @@ package com.android.systemui.animation import android.animation.AnimatorSet import android.graphics.drawable.GradientDrawable +import android.platform.test.annotations.MotionTest import android.view.ViewGroup import android.widget.FrameLayout import androidx.test.ext.junit.rules.ActivityScenarioRule @@ -44,6 +45,7 @@ import platform.test.screenshot.GoldenPathManager import platform.test.screenshot.PathConfig @SmallTest +@MotionTest @RunWith(AndroidJUnit4::class) class TransitionAnimatorTest : SysuiTestCase() { companion object { diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/BouncerContentTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/BouncerContentTest.kt index 9a3667819ec7..d32d12c83a8d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/BouncerContentTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/BouncerContentTest.kt @@ -17,6 +17,7 @@ package com.android.systemui.bouncer.ui.composable import android.app.AlertDialog +import android.platform.test.annotations.MotionTest import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -55,6 +56,7 @@ import platform.test.screenshot.Displays.FoldableInner @RunWith(AndroidJUnit4::class) @LargeTest +@MotionTest class BouncerContentTest : SysuiTestCase() { private val deviceSpec = DeviceEmulationSpec(FoldableInner) private val kosmos = testKosmos() diff --git a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/PatternBouncerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/PatternBouncerTest.kt index 4f6f98e8fdb0..2948c0274525 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/PatternBouncerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/PatternBouncerTest.kt @@ -16,6 +16,7 @@ package com.android.systemui.bouncer.ui.composable +import android.platform.test.annotations.MotionTest import androidx.compose.foundation.layout.size import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier @@ -44,6 +45,7 @@ import platform.test.motion.golden.DataPointTypes @RunWith(AndroidJUnit4::class) @LargeTest +@MotionTest class PatternBouncerTest : SysuiTestCase() { private val kosmos = testKosmos() -- cgit v1.2.3-59-g8ed1b