@@ -59,6 +59,7 @@ import org.junit.Test
59
59
import org.junit.runner.RunWith
60
60
import org.mockito.Mock
61
61
import org.mockito.MockitoAnnotations
62
+ import org.mockito.kotlin.verify
62
63
import org.mockito.kotlin.whenever
63
64
64
65
@SuppressLint(" DenyListedApi" )
@@ -701,6 +702,34 @@ class SecureStoreBackedAutofillStoreTest {
701
702
assertEquals(DEFAULT_INITIAL_LAST_UPDATED , updated.lastUpdatedMillis)
702
703
}
703
704
705
+ @Test
706
+ fun whenUserHasNeverImportedPasswordThenCallsThroughToStoreCorrectly () = runTest {
707
+ setupTesteeWithAutofillAvailable()
708
+ testee.hasEverImportedPasswords
709
+ verify(autofillPrefsStore).hasEverImportedPasswords
710
+ }
711
+
712
+ @Test
713
+ fun whenUserHasImportedPasswordThenCallsThroughToStoreCorrectly () = runTest {
714
+ setupTesteeWithAutofillAvailable()
715
+ testee.hasEverImportedPasswords = true
716
+ verify(autofillPrefsStore).hasEverImportedPasswords = true
717
+ }
718
+
719
+ @Test
720
+ fun whenUserHasNeverDismissedImportPasswordPromoThenCallsThroughToStoreCorrectly () = runTest {
721
+ setupTesteeWithAutofillAvailable()
722
+ testee.hasDismissedImportedPasswordsPromo
723
+ verify(autofillPrefsStore).hasDismissedImportedPasswordsPromo
724
+ }
725
+
726
+ @Test
727
+ fun whenUserHasDismissedImportPasswordPromoThenCallsThroughToStoreCorrectly () = runTest {
728
+ setupTesteeWithAutofillAvailable()
729
+ testee.hasDismissedImportedPasswordsPromo = true
730
+ verify(autofillPrefsStore).hasDismissedImportedPasswordsPromo = true
731
+ }
732
+
704
733
private fun enableDeepDomainCheckFeatureFlag () {
705
734
autofillFeature.deepDomainComparisonsOnExistingCredentialsChecks().setRawStoredState(State (true ))
706
735
}
0 commit comments