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

Commit 36ad1aee authored by Christian Göllner's avatar Christian Göllner Committed by Android (Google) Code Review
Browse files

Merge "LockscreenShadeTransitionController: add more tests for DepthController...

Merge "LockscreenShadeTransitionController: add more tests for DepthController interactions" into tm-dev
parents 1ccb6f2a 5ea4d354
Loading
Loading
Loading
Loading
+13 −2
Original line number Diff line number Diff line
@@ -255,14 +255,25 @@ class LockscreenShadeTransitionControllerTest : SysuiTestCase() {
    }

    @Test
    fun testDragDownAmount_depthDistanceIsZero_doesNotSetProgress() {
    fun testDragDownAmount_depthDistanceIsZero_setsProgressToZero() {
        context.getOrCreateTestableResources()
            .addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 0)
        configurationController.notifyConfigurationChanged()

        transitionController.dragDownAmount = 10f

        verify(depthController, never()).transitionToFullShadeProgress
        verify(depthController).transitionToFullShadeProgress = 0f
    }

    @Test
    fun testDragDownAmount_depthDistanceNonZero_setsProgressBasedOnDistance() {
        context.getOrCreateTestableResources()
            .addOverride(R.dimen.lockscreen_shade_depth_controller_transition_distance, 100)
        configurationController.notifyConfigurationChanged()

        transitionController.dragDownAmount = 10f

        verify(depthController).transitionToFullShadeProgress = 0.1f
    }

    @Test