Loading packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/BouncerPredictiveBackTest.kt +12 −16 Original line number Diff line number Diff line Loading @@ -115,11 +115,7 @@ class BouncerPredictiveBackTest : SysuiTestCase() { private val Kosmos.sceneKeys by Fixture { listOf(Scenes.Lockscreen, Scenes.Bouncer) } private val Kosmos.initialSceneKey by Fixture { Scenes.Bouncer } private val Kosmos.sceneContainerConfig by Fixture { val navigationDistances = mapOf( Scenes.Lockscreen to 1, Scenes.Bouncer to 0, ) val navigationDistances = mapOf(Scenes.Lockscreen to 1, Scenes.Bouncer to 0) SceneContainerConfig(sceneKeys, initialSceneKey, emptyList(), navigationDistances) } Loading Loading @@ -160,7 +156,7 @@ class BouncerPredictiveBackTest : SysuiTestCase() { BouncerScene( bouncerSceneActionsViewModelFactory, bouncerSceneContentViewModelFactory, bouncerDialogFactory bouncerDialogFactory, ) @Before Loading Loading @@ -189,11 +185,11 @@ class BouncerPredictiveBackTest : SysuiTestCase() { sceneByKey = mapOf( Scenes.Lockscreen to FakeLockscreen(), Scenes.Bouncer to bouncerScene Scenes.Bouncer to bouncerScene, ), initialSceneKey = Scenes.Bouncer, overlayByKey = emptyMap(), dataSourceDelegator = kosmos.sceneDataSourceDelegator dataSourceDelegator = kosmos.sceneDataSourceDelegator, ) } }, Loading @@ -215,14 +211,14 @@ class BouncerPredictiveBackTest : SysuiTestCase() { feature( isElement(Bouncer.Elements.Content), positionInRoot, "content_offset" "content_offset", ) feature( isElement(Bouncer.Elements.Background), elementAlpha, "background_alpha" "background_alpha", ) } }, ) assertThat(motion).timeSeriesMatchesGolden() Loading @@ -240,7 +236,7 @@ class BouncerPredictiveBackTest : SysuiTestCase() { } backProgress.animateTo( targetValue = 1f, animationSpec = tween(durationMillis = 500) animationSpec = tween(durationMillis = 500), ) { androidComposeTestRule.runOnUiThread { dispatcher.dispatchOnBackProgressed( Loading Loading @@ -309,10 +305,10 @@ class BouncerPredictiveBackTest : SysuiTestCase() { is JSONObject -> Offset( pivot.getDouble("x").toFloat(), pivot.getDouble("y").toFloat() pivot.getDouble("y").toFloat(), ) else -> throw UnknownTypeException() } }, ) } else -> throw UnknownTypeException() Loading @@ -337,12 +333,12 @@ class BouncerPredictiveBackTest : SysuiTestCase() { put("x", it.pivot.x) put("y", it.pivot.y) } } }, ) } } } } }, ) } } Loading
packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/composable/BouncerPredictiveBackTest.kt +12 −16 Original line number Diff line number Diff line Loading @@ -115,11 +115,7 @@ class BouncerPredictiveBackTest : SysuiTestCase() { private val Kosmos.sceneKeys by Fixture { listOf(Scenes.Lockscreen, Scenes.Bouncer) } private val Kosmos.initialSceneKey by Fixture { Scenes.Bouncer } private val Kosmos.sceneContainerConfig by Fixture { val navigationDistances = mapOf( Scenes.Lockscreen to 1, Scenes.Bouncer to 0, ) val navigationDistances = mapOf(Scenes.Lockscreen to 1, Scenes.Bouncer to 0) SceneContainerConfig(sceneKeys, initialSceneKey, emptyList(), navigationDistances) } Loading Loading @@ -160,7 +156,7 @@ class BouncerPredictiveBackTest : SysuiTestCase() { BouncerScene( bouncerSceneActionsViewModelFactory, bouncerSceneContentViewModelFactory, bouncerDialogFactory bouncerDialogFactory, ) @Before Loading Loading @@ -189,11 +185,11 @@ class BouncerPredictiveBackTest : SysuiTestCase() { sceneByKey = mapOf( Scenes.Lockscreen to FakeLockscreen(), Scenes.Bouncer to bouncerScene Scenes.Bouncer to bouncerScene, ), initialSceneKey = Scenes.Bouncer, overlayByKey = emptyMap(), dataSourceDelegator = kosmos.sceneDataSourceDelegator dataSourceDelegator = kosmos.sceneDataSourceDelegator, ) } }, Loading @@ -215,14 +211,14 @@ class BouncerPredictiveBackTest : SysuiTestCase() { feature( isElement(Bouncer.Elements.Content), positionInRoot, "content_offset" "content_offset", ) feature( isElement(Bouncer.Elements.Background), elementAlpha, "background_alpha" "background_alpha", ) } }, ) assertThat(motion).timeSeriesMatchesGolden() Loading @@ -240,7 +236,7 @@ class BouncerPredictiveBackTest : SysuiTestCase() { } backProgress.animateTo( targetValue = 1f, animationSpec = tween(durationMillis = 500) animationSpec = tween(durationMillis = 500), ) { androidComposeTestRule.runOnUiThread { dispatcher.dispatchOnBackProgressed( Loading Loading @@ -309,10 +305,10 @@ class BouncerPredictiveBackTest : SysuiTestCase() { is JSONObject -> Offset( pivot.getDouble("x").toFloat(), pivot.getDouble("y").toFloat() pivot.getDouble("y").toFloat(), ) else -> throw UnknownTypeException() } }, ) } else -> throw UnknownTypeException() Loading @@ -337,12 +333,12 @@ class BouncerPredictiveBackTest : SysuiTestCase() { put("x", it.pivot.x) put("y", it.pivot.y) } } }, ) } } } } }, ) } }