Loading packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryHapticsInteractorTest.kt +48 −46 Original line number Diff line number Diff line Loading @@ -45,7 +45,11 @@ import com.android.systemui.keyguard.shared.model.BiometricUnlockMode import com.android.systemui.keyguard.shared.model.BiometricUnlockSource import com.android.systemui.keyguard.shared.model.FailFingerprintAuthenticationStatus import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus import com.android.systemui.kosmos.testScope import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.advanceTimeBy import com.android.systemui.kosmos.collectLastValue import com.android.systemui.kosmos.runCurrent import com.android.systemui.kosmos.runTest import com.android.systemui.power.data.repository.powerRepository import com.android.systemui.power.shared.model.WakeSleepReason import com.android.systemui.power.shared.model.WakefulnessState Loading @@ -58,7 +62,6 @@ import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.advanceTimeBy import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest Loading @@ -72,9 +75,6 @@ import org.mockito.kotlin.whenever @RunWith(AndroidJUnit4::class) class DeviceEntryHapticsInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope private lateinit var underTest: DeviceEntryHapticsInteractor @Before fun setup() { Loading @@ -98,14 +98,14 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { kosmos.keyguardBouncerRepository.setAlternateVisible(false) kosmos.sceneInteractor.changeScene(Scenes.Lockscreen, "reason") } underTest = kosmos.deviceEntryHapticsInteractor } @DisableSceneContainer @Test fun nonPowerButtonFPS_vibrateSuccess() = testScope.runTest { val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) runCurrent() enterDeviceFromFingerprintUnlockLegacy() Loading @@ -115,8 +115,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @DisableSceneContainer @Test fun powerButtonFPS_vibrateSuccess() = testScope.runTest { val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(false) Loading @@ -132,8 +133,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @DisableSceneContainer @Test fun powerButtonFPS_powerDown_doNotVibrateSuccess() = testScope.runTest { val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(true) // power button is currently DOWN Loading @@ -149,8 +151,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @DisableSceneContainer @Test fun powerButtonFPS_powerButtonRecentlyPressed_doNotVibrateSuccess() = testScope.runTest { val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(false) Loading @@ -165,8 +168,8 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @Test fun nonPowerButtonFPS_vibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) kosmos.runTest { val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) runCurrent() fingerprintFailure() Loading @@ -175,8 +178,8 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @Test fun nonPowerButtonFPS_coExFaceFailure_doNotVibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) kosmos.runTest { val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) enrollFace() runCurrent() Loading @@ -186,8 +189,8 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @Test fun powerButtonFPS_vibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) kosmos.runTest { val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) runCurrent() fingerprintFailure() Loading @@ -196,8 +199,8 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @Test fun powerButtonFPS_powerDown_doNotVibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) kosmos.runTest { val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(true) runCurrent() Loading @@ -208,10 +211,10 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun playSuccessHaptic_onDeviceEntryFromUdfps() = testScope.runTest { kosmos.runTest { kosmos.configureKeyguardBypass(isBypassAvailable = false) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) runCurrent() configureDeviceEntryFromBiometricSource(isFpUnlock = true) Loading @@ -222,10 +225,10 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun playSuccessHaptic_onDeviceEntryFromSfps() = testScope.runTest { kosmos.runTest { kosmos.configureKeyguardBypass(isBypassAvailable = false) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(false) Loading @@ -242,11 +245,11 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun playSuccessHaptic_onDeviceEntryFromFaceAuth() = testScope.runTest { kosmos.runTest { enrollFace() kosmos.configureKeyguardBypass(isBypassAvailable = true) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) configureDeviceEntryFromBiometricSource(isFaceUnlock = true) verifyDeviceEntryFromFaceAuth() assertThat(playSuccessHaptic).isNotNull() Loading @@ -256,9 +259,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun skipSuccessHaptic_onFaceAuthSuccess_whenBypassDisabled() = testScope.runTest { underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFace() kosmos.configureKeyguardBypass(isBypassAvailable = false) Loading @@ -272,10 +275,10 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun skipSuccessHaptic_onDeviceEntryFromSfps_whenPowerDown() = testScope.runTest { kosmos.runTest { kosmos.configureKeyguardBypass(isBypassAvailable = false) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) // power button is currently DOWN kosmos.fakeKeyEventRepository.setPowerButtonDown(true) Loading @@ -293,10 +296,10 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun skipSuccessHaptic_onDeviceEntryFromSfps_whenPowerButtonRecentlyPressed() = testScope.runTest { kosmos.runTest { kosmos.configureKeyguardBypass(isBypassAvailable = false) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(false) Loading @@ -313,9 +316,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @OptIn(ExperimentalCoroutinesApi::class) @Test fun playSuccessHaptic_onDeviceEntry_fromDeviceEntryIcon() = testScope.runTest { underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) kosmos.fakeKeyguardRepository.setKeyguardDismissible(true) runCurrent() Loading Loading @@ -353,17 +356,16 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { ) } } underTest = kosmos.deviceEntryHapticsInteractor } private fun TestScope.verifyDeviceEntryFromFingerprintAuth() { private fun Kosmos.verifyDeviceEntryFromFingerprintAuth() { val deviceEntryFromBiometricSource by collectLastValue(kosmos.deviceEntrySourceInteractor.deviceEntryFromBiometricSource) assertThat(deviceEntryFromBiometricSource) .isEqualTo(BiometricUnlockSource.FINGERPRINT_SENSOR) } private fun TestScope.verifyDeviceEntryFromFaceAuth() { private fun Kosmos.verifyDeviceEntryFromFaceAuth() { val deviceEntryFromBiometricSource by collectLastValue(kosmos.deviceEntrySourceInteractor.deviceEntryFromBiometricSource) assertThat(deviceEntryFromBiometricSource).isEqualTo(BiometricUnlockSource.FACE_SENSOR) Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/deviceentry/domain/interactor/DeviceEntryHapticsInteractorTest.kt +48 −46 Original line number Diff line number Diff line Loading @@ -45,7 +45,11 @@ import com.android.systemui.keyguard.shared.model.BiometricUnlockMode import com.android.systemui.keyguard.shared.model.BiometricUnlockSource import com.android.systemui.keyguard.shared.model.FailFingerprintAuthenticationStatus import com.android.systemui.keyguard.shared.model.SuccessFingerprintAuthenticationStatus import com.android.systemui.kosmos.testScope import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.advanceTimeBy import com.android.systemui.kosmos.collectLastValue import com.android.systemui.kosmos.runCurrent import com.android.systemui.kosmos.runTest import com.android.systemui.power.data.repository.powerRepository import com.android.systemui.power.shared.model.WakeSleepReason import com.android.systemui.power.shared.model.WakefulnessState Loading @@ -58,7 +62,6 @@ import com.android.systemui.testKosmos import com.google.common.truth.Truth.assertThat import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.test.TestScope import kotlinx.coroutines.test.advanceTimeBy import kotlinx.coroutines.test.runCurrent import kotlinx.coroutines.test.runTest Loading @@ -72,9 +75,6 @@ import org.mockito.kotlin.whenever @RunWith(AndroidJUnit4::class) class DeviceEntryHapticsInteractorTest : SysuiTestCase() { private val kosmos = testKosmos() private val testScope = kosmos.testScope private lateinit var underTest: DeviceEntryHapticsInteractor @Before fun setup() { Loading @@ -98,14 +98,14 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { kosmos.keyguardBouncerRepository.setAlternateVisible(false) kosmos.sceneInteractor.changeScene(Scenes.Lockscreen, "reason") } underTest = kosmos.deviceEntryHapticsInteractor } @DisableSceneContainer @Test fun nonPowerButtonFPS_vibrateSuccess() = testScope.runTest { val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) runCurrent() enterDeviceFromFingerprintUnlockLegacy() Loading @@ -115,8 +115,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @DisableSceneContainer @Test fun powerButtonFPS_vibrateSuccess() = testScope.runTest { val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(false) Loading @@ -132,8 +133,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @DisableSceneContainer @Test fun powerButtonFPS_powerDown_doNotVibrateSuccess() = testScope.runTest { val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(true) // power button is currently DOWN Loading @@ -149,8 +151,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @DisableSceneContainer @Test fun powerButtonFPS_powerButtonRecentlyPressed_doNotVibrateSuccess() = testScope.runTest { val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(false) Loading @@ -165,8 +168,8 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @Test fun nonPowerButtonFPS_vibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) kosmos.runTest { val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) runCurrent() fingerprintFailure() Loading @@ -175,8 +178,8 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @Test fun nonPowerButtonFPS_coExFaceFailure_doNotVibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) kosmos.runTest { val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) enrollFace() runCurrent() Loading @@ -186,8 +189,8 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @Test fun powerButtonFPS_vibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) kosmos.runTest { val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) runCurrent() fingerprintFailure() Loading @@ -196,8 +199,8 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @Test fun powerButtonFPS_powerDown_doNotVibrateError() = testScope.runTest { val playErrorHaptic by collectLastValue(underTest.playErrorHaptic) kosmos.runTest { val playErrorHaptic by collectLastValue(deviceEntryHapticsInteractor.playErrorHaptic) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(true) runCurrent() Loading @@ -208,10 +211,10 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun playSuccessHaptic_onDeviceEntryFromUdfps() = testScope.runTest { kosmos.runTest { kosmos.configureKeyguardBypass(isBypassAvailable = false) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.UDFPS_ULTRASONIC) runCurrent() configureDeviceEntryFromBiometricSource(isFpUnlock = true) Loading @@ -222,10 +225,10 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun playSuccessHaptic_onDeviceEntryFromSfps() = testScope.runTest { kosmos.runTest { kosmos.configureKeyguardBypass(isBypassAvailable = false) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(false) Loading @@ -242,11 +245,11 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun playSuccessHaptic_onDeviceEntryFromFaceAuth() = testScope.runTest { kosmos.runTest { enrollFace() kosmos.configureKeyguardBypass(isBypassAvailable = true) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) configureDeviceEntryFromBiometricSource(isFaceUnlock = true) verifyDeviceEntryFromFaceAuth() assertThat(playSuccessHaptic).isNotNull() Loading @@ -256,9 +259,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun skipSuccessHaptic_onFaceAuthSuccess_whenBypassDisabled() = testScope.runTest { underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFace() kosmos.configureKeyguardBypass(isBypassAvailable = false) Loading @@ -272,10 +275,10 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun skipSuccessHaptic_onDeviceEntryFromSfps_whenPowerDown() = testScope.runTest { kosmos.runTest { kosmos.configureKeyguardBypass(isBypassAvailable = false) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) // power button is currently DOWN kosmos.fakeKeyEventRepository.setPowerButtonDown(true) Loading @@ -293,10 +296,10 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @EnableSceneContainer @Test fun skipSuccessHaptic_onDeviceEntryFromSfps_whenPowerButtonRecentlyPressed() = testScope.runTest { kosmos.runTest { kosmos.configureKeyguardBypass(isBypassAvailable = false) underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) enrollFingerprint(FingerprintSensorType.POWER_BUTTON) kosmos.fakeKeyEventRepository.setPowerButtonDown(false) Loading @@ -313,9 +316,9 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { @OptIn(ExperimentalCoroutinesApi::class) @Test fun playSuccessHaptic_onDeviceEntry_fromDeviceEntryIcon() = testScope.runTest { underTest = kosmos.deviceEntryHapticsInteractor val playSuccessHaptic by collectLastValue(underTest.playSuccessHapticOnDeviceEntry) kosmos.runTest { val playSuccessHaptic by collectLastValue(deviceEntryHapticsInteractor.playSuccessHapticOnDeviceEntry) kosmos.fakeKeyguardRepository.setKeyguardDismissible(true) runCurrent() Loading Loading @@ -353,17 +356,16 @@ class DeviceEntryHapticsInteractorTest : SysuiTestCase() { ) } } underTest = kosmos.deviceEntryHapticsInteractor } private fun TestScope.verifyDeviceEntryFromFingerprintAuth() { private fun Kosmos.verifyDeviceEntryFromFingerprintAuth() { val deviceEntryFromBiometricSource by collectLastValue(kosmos.deviceEntrySourceInteractor.deviceEntryFromBiometricSource) assertThat(deviceEntryFromBiometricSource) .isEqualTo(BiometricUnlockSource.FINGERPRINT_SENSOR) } private fun TestScope.verifyDeviceEntryFromFaceAuth() { private fun Kosmos.verifyDeviceEntryFromFaceAuth() { val deviceEntryFromBiometricSource by collectLastValue(kosmos.deviceEntrySourceInteractor.deviceEntryFromBiometricSource) assertThat(deviceEntryFromBiometricSource).isEqualTo(BiometricUnlockSource.FACE_SENSOR) Loading