Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e73140e6 authored by Johannes Gallmann's avatar Johannes Gallmann
Browse files

[Flexiglass] BouncerPredictiveBackTest ktfmt-cleanup

Bug: 365514957
Flag: com.android.systemui.scene_container
Test: BouncerPredictiveBackTest
Change-Id: I12923fba2f9a03eba6b4c84d1ec6e2edf7b560bf
parent d2ed3a9c
Loading
Loading
Loading
Loading
+12 −16
Original line number Diff line number Diff line
@@ -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)
    }

@@ -160,7 +156,7 @@ class BouncerPredictiveBackTest : SysuiTestCase() {
        BouncerScene(
            bouncerSceneActionsViewModelFactory,
            bouncerSceneContentViewModelFactory,
            bouncerDialogFactory
            bouncerDialogFactory,
        )

    @Before
@@ -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,
                            )
                        }
                    },
@@ -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()
@@ -240,7 +236,7 @@ class BouncerPredictiveBackTest : SysuiTestCase() {
                }
                backProgress.animateTo(
                    targetValue = 1f,
                    animationSpec = tween(durationMillis = 500)
                    animationSpec = tween(durationMillis = 500),
                ) {
                    androidComposeTestRule.runOnUiThread {
                        dispatcher.dispatchOnBackProgressed(
@@ -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()
@@ -337,12 +333,12 @@ class BouncerPredictiveBackTest : SysuiTestCase() {
                                                put("x", it.pivot.x)
                                                put("y", it.pivot.y)
                                            }
                                    }
                                    },
                                )
                            }
                        }
                    }
                }
                },
            )
    }
}