[MS-862] Skipping Preparation for face Capture after 1st time + Instructions button.#1177
Conversation
| } | ||
|
|
||
| @Test | ||
| fun `preparation instructions screen should be set to not showing according to its use case`() { |
There was a problem hiding this comment.
Considering that the method just does the deligation to the use case, I could argue that this test case is redundant.
| ) { | ||
| operator fun invoke(): Boolean { | ||
| val sharedPrefs = securityManager.buildEncryptedSharedPreferences(FILENAME_FOR_INSTRUCTIONS_SHOWING_SHARED_PREFS) | ||
| val areInstructionsShowing = sharedPrefs.getBoolean(INSTRUCTIONS_SHOWING_PREFERENCE_KEY, true) |
There was a problem hiding this comment.
It might be a bit of a personal preference, but I would reverse this flag into "instructionsShown" and set it to "true" on first call which is a bit simpler behaviour/logic.
There was a problem hiding this comment.
instructionsShown can be ambiguous - whether they are still shown, or were only shown in the past. Let's leave true as the initial state as that's the behavior before this change.
| import androidx.core.content.edit | ||
|
|
||
| @Singleton | ||
| class GetAndTurnOffPreparationInstructionsShowingUseCase @Inject constructor( |
There was a problem hiding this comment.
I would call it just ShouldShowInstructionsScreenUseCase to describe the purpose and leave the implementation details out of the name of the class.
6a4d0a4 to
38a0c31
Compare
|



JIRA ticket
Will be released in: 2025.2.0
Notable changes
Testing guidance
Additional work checklist