472: Adding autofill route if fingerprint onboarding is skipped#474
472: Adding autofill route if fingerprint onboarding is skipped#474eliserichards merged 6 commits intomasterfrom
Conversation
cff4ab3 to
db81562
Compare
jhugman
left a comment
There was a problem hiding this comment.
I think the logic here needs some small amount of rework, but I may be misunderstanding.
| } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { | ||
| if (SettingStore.shared.autofillAvailable) { | ||
| dispatcher.dispatch(RouteAction.Onboarding.Autofill) | ||
| } |
There was a problem hiding this comment.
What happens in Android versions at or above O, but where autofillAvailable is false?
Should it just return without dispatching the confirm route?
There was a problem hiding this comment.
I believe that's what it should do. If autofill isn't available then we shouldn't tell them to use autofill
I see what you're saying now :)
db81562 to
042180c
Compare
sashei
left a comment
There was a problem hiding this comment.
would like to see complete tests!
jhugman
left a comment
There was a problem hiding this comment.
🚜 🚜 🚜
This is looking pretty good. The tests need a bit of attention, but the main code is 👍 .
| private lateinit var preferences: SharedPreferences | ||
| @RequiresApi(Build.VERSION_CODES.O) | ||
| private lateinit var autofillManager: AutofillManager | ||
| open lateinit var autofillManager: AutofillManager |
There was a problem hiding this comment.
👾
This is making AutofillManager part of the public interface for this store. If I understand correctly, this is to make it easier to test.
I think probably the best way of solving this problem is to mock out the autofill manager and context, then inject it using injectContext. The SettingStoreTest shows this quite nicely.
There was a problem hiding this comment.
Ahh I think I tried every way of mocking the AutofillManager and SettingStore except whenCalled(context.getSystemService(AutofillManager::class.java)).thenReturn(autofillManager). Thanks!
…or testing. Adding settings store to the login presenter.
sashei
left a comment
There was a problem hiding this comment.
nice work @eliserichards !! thanks for putting those tests together :))
8e96c87 to
1d8e193
Compare
Addressed comments and made the autofillManager private to the SettingStore again :)
1d8e193 to
8c6a35c
Compare
Fixes #472
Testing and Review Notes
Screenshots or Videos
To Do