Loading packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModelTest.kt +4 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectValues import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository import com.android.systemui.keyguard.shared.model.KeyguardState Loading Loading @@ -49,6 +50,7 @@ class DozingToGoneTransitionViewModelTest : SysuiTestCase() { } @Test @DisableSceneContainer fun lockscreenAlpha() = testScope.runTest { val viewState = ViewStateAccessor() Loading @@ -57,7 +59,7 @@ class DozingToGoneTransitionViewModelTest : SysuiTestCase() { keyguardTransitionRepository.sendTransitionSteps( from = KeyguardState.DOZING, to = KeyguardState.GONE, testScope testScope, ) // Remain at zero throughout Loading Loading @@ -91,7 +93,7 @@ class DozingToGoneTransitionViewModelTest : SysuiTestCase() { to = KeyguardState.GONE, value = value, transitionState = state, ownerName = "DozingToGoneTransitionViewModelTest" ownerName = "DozingToGoneTransitionViewModelTest", ) } } packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/GoneToAodTransitionViewModelTest.kt +11 −9 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.biometrics.data.repository.fingerprintPropertyRepository import com.android.systemui.coroutines.collectLastValue import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.biometricSettingsRepository import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository import com.android.systemui.keyguard.shared.model.KeyguardState Loading @@ -41,6 +42,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) @DisableSceneContainer class GoneToAodTransitionViewModelTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope Loading @@ -57,7 +59,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { rawState = WakefulnessState.STARTING_TO_SLEEP, lastWakeReason = WakeSleepReason.POWER_BUTTON, lastSleepReason = WakeSleepReason.POWER_BUTTON, powerButtonLaunchGestureTriggered = false powerButtonLaunchGestureTriggered = false, ) val pixels = -100f Loading @@ -73,7 +75,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { from = KeyguardState.GONE, to = KeyguardState.AOD, transitionState = TransitionState.STARTED, value = pixels value = pixels, ) ) Loading @@ -91,7 +93,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { from = KeyguardState.GONE, to = KeyguardState.AOD, transitionState = TransitionState.RUNNING, value = 0f value = 0f, ) ) } Loading @@ -103,7 +105,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { rawState = WakefulnessState.STARTING_TO_SLEEP, lastWakeReason = WakeSleepReason.POWER_BUTTON, lastSleepReason = WakeSleepReason.FOLD, powerButtonLaunchGestureTriggered = false powerButtonLaunchGestureTriggered = false, ) val pixels = -100f Loading Loading @@ -131,7 +133,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { rawState = WakefulnessState.STARTING_TO_SLEEP, lastWakeReason = WakeSleepReason.POWER_BUTTON, lastSleepReason = WakeSleepReason.FOLD, powerButtonLaunchGestureTriggered = false powerButtonLaunchGestureTriggered = false, ) val pixels = -100f Loading @@ -147,7 +149,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { from = KeyguardState.GONE, to = KeyguardState.AOD, transitionState = TransitionState.STARTED, value = pixels value = pixels, ) ) Loading @@ -165,7 +167,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { from = KeyguardState.GONE, to = KeyguardState.AOD, transitionState = TransitionState.RUNNING, value = 0f value = 0f, ) ) } Loading Loading @@ -288,14 +290,14 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { private fun step( value: Float, state: TransitionState = TransitionState.RUNNING state: TransitionState = TransitionState.RUNNING, ): TransitionStep { return TransitionStep( from = KeyguardState.GONE, to = KeyguardState.AOD, value = value, transitionState = state, ownerName = "GoneToAodTransitionViewModelTest" ownerName = "GoneToAodTransitionViewModelTest", ) } } packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/GoneToDozingTransitionViewModelTest.kt +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRe import com.android.systemui.biometrics.data.repository.fakeFingerprintPropertyRepository import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.FakeBiometricSettingsRepository import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository import com.android.systemui.keyguard.data.repository.fakeBiometricSettingsRepository Loading @@ -42,6 +43,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) @DisableSceneContainer class GoneToDozingTransitionViewModelTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope Loading Loading @@ -128,7 +130,7 @@ class GoneToDozingTransitionViewModelTest : SysuiTestCase() { to = KeyguardState.DOZING, value = value, transitionState = state, ownerName = "GoneToDozingTransitionViewModelTest" ownerName = "GoneToDozingTransitionViewModelTest", ) } } packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToGoneTransitionViewModelTest.kt +4 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.shared.model.TransitionState Loading @@ -35,6 +36,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) @DisableSceneContainer class LockscreenToGoneTransitionViewModelTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope Loading Loading @@ -106,14 +108,14 @@ class LockscreenToGoneTransitionViewModelTest : SysuiTestCase() { private fun step( value: Float, state: TransitionState = TransitionState.RUNNING state: TransitionState = TransitionState.RUNNING, ): TransitionStep { return TransitionStep( from = KeyguardState.LOCKSCREEN, to = KeyguardState.GONE, value = value, transitionState = state, ownerName = "LockscreenToGoneTransitionViewModelTest" ownerName = "LockscreenToGoneTransitionViewModelTest", ) } } packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/OccludedToLockscreenTransitionViewModelTest.kt +6 −4 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import com.android.systemui.SysuiTestCase import com.android.systemui.biometrics.data.repository.fingerprintPropertyRepository import com.android.systemui.common.ui.data.repository.fakeConfigurationRepository import com.android.systemui.coroutines.collectValues import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.biometricSettingsRepository import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository import com.android.systemui.keyguard.shared.model.KeyguardState Loading Loading @@ -80,7 +81,7 @@ class OccludedToLockscreenTransitionViewModelTest : SysuiTestCase() { testScope.runTest { configurationRepository.setDimensionPixelSize( R.dimen.occluded_to_lockscreen_transition_lockscreen_translation_y, 100 100, ) val values by collectValues(underTest.lockscreenTranslationY) runCurrent() Loading @@ -101,11 +102,12 @@ class OccludedToLockscreenTransitionViewModelTest : SysuiTestCase() { } @Test @DisableSceneContainer // onCancel values are not emitted when the scene container is enabled. fun lockscreenTranslationYResettedAfterJobCancelled() = testScope.runTest { configurationRepository.setDimensionPixelSize( R.dimen.occluded_to_lockscreen_transition_lockscreen_translation_y, 100 100, ) val values by collectValues(underTest.lockscreenTranslationY) runCurrent() Loading Loading @@ -162,14 +164,14 @@ class OccludedToLockscreenTransitionViewModelTest : SysuiTestCase() { private fun step( value: Float, state: TransitionState = TransitionState.RUNNING state: TransitionState = TransitionState.RUNNING, ): TransitionStep { return TransitionStep( from = KeyguardState.OCCLUDED, to = KeyguardState.LOCKSCREEN, value = value, transitionState = state, ownerName = "OccludedToLockscreenTransitionViewModelTest" ownerName = "OccludedToLockscreenTransitionViewModelTest", ) } } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/DozingToGoneTransitionViewModelTest.kt +4 −2 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectValues import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository import com.android.systemui.keyguard.shared.model.KeyguardState Loading Loading @@ -49,6 +50,7 @@ class DozingToGoneTransitionViewModelTest : SysuiTestCase() { } @Test @DisableSceneContainer fun lockscreenAlpha() = testScope.runTest { val viewState = ViewStateAccessor() Loading @@ -57,7 +59,7 @@ class DozingToGoneTransitionViewModelTest : SysuiTestCase() { keyguardTransitionRepository.sendTransitionSteps( from = KeyguardState.DOZING, to = KeyguardState.GONE, testScope testScope, ) // Remain at zero throughout Loading Loading @@ -91,7 +93,7 @@ class DozingToGoneTransitionViewModelTest : SysuiTestCase() { to = KeyguardState.GONE, value = value, transitionState = state, ownerName = "DozingToGoneTransitionViewModelTest" ownerName = "DozingToGoneTransitionViewModelTest", ) } }
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/GoneToAodTransitionViewModelTest.kt +11 −9 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.biometrics.data.repository.fingerprintPropertyRepository import com.android.systemui.coroutines.collectLastValue import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.biometricSettingsRepository import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository import com.android.systemui.keyguard.shared.model.KeyguardState Loading @@ -41,6 +42,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) @DisableSceneContainer class GoneToAodTransitionViewModelTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope Loading @@ -57,7 +59,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { rawState = WakefulnessState.STARTING_TO_SLEEP, lastWakeReason = WakeSleepReason.POWER_BUTTON, lastSleepReason = WakeSleepReason.POWER_BUTTON, powerButtonLaunchGestureTriggered = false powerButtonLaunchGestureTriggered = false, ) val pixels = -100f Loading @@ -73,7 +75,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { from = KeyguardState.GONE, to = KeyguardState.AOD, transitionState = TransitionState.STARTED, value = pixels value = pixels, ) ) Loading @@ -91,7 +93,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { from = KeyguardState.GONE, to = KeyguardState.AOD, transitionState = TransitionState.RUNNING, value = 0f value = 0f, ) ) } Loading @@ -103,7 +105,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { rawState = WakefulnessState.STARTING_TO_SLEEP, lastWakeReason = WakeSleepReason.POWER_BUTTON, lastSleepReason = WakeSleepReason.FOLD, powerButtonLaunchGestureTriggered = false powerButtonLaunchGestureTriggered = false, ) val pixels = -100f Loading Loading @@ -131,7 +133,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { rawState = WakefulnessState.STARTING_TO_SLEEP, lastWakeReason = WakeSleepReason.POWER_BUTTON, lastSleepReason = WakeSleepReason.FOLD, powerButtonLaunchGestureTriggered = false powerButtonLaunchGestureTriggered = false, ) val pixels = -100f Loading @@ -147,7 +149,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { from = KeyguardState.GONE, to = KeyguardState.AOD, transitionState = TransitionState.STARTED, value = pixels value = pixels, ) ) Loading @@ -165,7 +167,7 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { from = KeyguardState.GONE, to = KeyguardState.AOD, transitionState = TransitionState.RUNNING, value = 0f value = 0f, ) ) } Loading Loading @@ -288,14 +290,14 @@ class GoneToAodTransitionViewModelTest : SysuiTestCase() { private fun step( value: Float, state: TransitionState = TransitionState.RUNNING state: TransitionState = TransitionState.RUNNING, ): TransitionStep { return TransitionStep( from = KeyguardState.GONE, to = KeyguardState.AOD, value = value, transitionState = state, ownerName = "GoneToAodTransitionViewModelTest" ownerName = "GoneToAodTransitionViewModelTest", ) } }
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/GoneToDozingTransitionViewModelTest.kt +3 −1 Original line number Diff line number Diff line Loading @@ -23,6 +23,7 @@ import com.android.systemui.biometrics.data.repository.FakeFingerprintPropertyRe import com.android.systemui.biometrics.data.repository.fakeFingerprintPropertyRepository import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.FakeBiometricSettingsRepository import com.android.systemui.keyguard.data.repository.FakeKeyguardTransitionRepository import com.android.systemui.keyguard.data.repository.fakeBiometricSettingsRepository Loading @@ -42,6 +43,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) @DisableSceneContainer class GoneToDozingTransitionViewModelTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope Loading Loading @@ -128,7 +130,7 @@ class GoneToDozingTransitionViewModelTest : SysuiTestCase() { to = KeyguardState.DOZING, value = value, transitionState = state, ownerName = "GoneToDozingTransitionViewModelTest" ownerName = "GoneToDozingTransitionViewModelTest", ) } }
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenToGoneTransitionViewModelTest.kt +4 −2 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import androidx.test.filters.SmallTest import com.android.systemui.SysuiTestCase import com.android.systemui.coroutines.collectLastValue import com.android.systemui.coroutines.collectValues import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository import com.android.systemui.keyguard.shared.model.KeyguardState import com.android.systemui.keyguard.shared.model.TransitionState Loading @@ -35,6 +36,7 @@ import org.junit.runner.RunWith @SmallTest @RunWith(AndroidJUnit4::class) @DisableSceneContainer class LockscreenToGoneTransitionViewModelTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope Loading Loading @@ -106,14 +108,14 @@ class LockscreenToGoneTransitionViewModelTest : SysuiTestCase() { private fun step( value: Float, state: TransitionState = TransitionState.RUNNING state: TransitionState = TransitionState.RUNNING, ): TransitionStep { return TransitionStep( from = KeyguardState.LOCKSCREEN, to = KeyguardState.GONE, value = value, transitionState = state, ownerName = "LockscreenToGoneTransitionViewModelTest" ownerName = "LockscreenToGoneTransitionViewModelTest", ) } }
packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/ui/viewmodel/OccludedToLockscreenTransitionViewModelTest.kt +6 −4 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import com.android.systemui.SysuiTestCase import com.android.systemui.biometrics.data.repository.fingerprintPropertyRepository import com.android.systemui.common.ui.data.repository.fakeConfigurationRepository import com.android.systemui.coroutines.collectValues import com.android.systemui.flags.DisableSceneContainer import com.android.systemui.keyguard.data.repository.biometricSettingsRepository import com.android.systemui.keyguard.data.repository.fakeKeyguardTransitionRepository import com.android.systemui.keyguard.shared.model.KeyguardState Loading Loading @@ -80,7 +81,7 @@ class OccludedToLockscreenTransitionViewModelTest : SysuiTestCase() { testScope.runTest { configurationRepository.setDimensionPixelSize( R.dimen.occluded_to_lockscreen_transition_lockscreen_translation_y, 100 100, ) val values by collectValues(underTest.lockscreenTranslationY) runCurrent() Loading @@ -101,11 +102,12 @@ class OccludedToLockscreenTransitionViewModelTest : SysuiTestCase() { } @Test @DisableSceneContainer // onCancel values are not emitted when the scene container is enabled. fun lockscreenTranslationYResettedAfterJobCancelled() = testScope.runTest { configurationRepository.setDimensionPixelSize( R.dimen.occluded_to_lockscreen_transition_lockscreen_translation_y, 100 100, ) val values by collectValues(underTest.lockscreenTranslationY) runCurrent() Loading Loading @@ -162,14 +164,14 @@ class OccludedToLockscreenTransitionViewModelTest : SysuiTestCase() { private fun step( value: Float, state: TransitionState = TransitionState.RUNNING state: TransitionState = TransitionState.RUNNING, ): TransitionStep { return TransitionStep( from = KeyguardState.OCCLUDED, to = KeyguardState.LOCKSCREEN, value = value, transitionState = state, ownerName = "OccludedToLockscreenTransitionViewModelTest" ownerName = "OccludedToLockscreenTransitionViewModelTest", ) } }