Skip to content

[MS-862] Skipping Preparation for face Capture after 1st time + Instructions button.#1177

Merged
alex-vt merged 5 commits into
mainfrom
feature/skip-instructions
May 8, 2025
Merged

[MS-862] Skipping Preparation for face Capture after 1st time + Instructions button.#1177
alex-vt merged 5 commits into
mainfrom
feature/skip-instructions

Conversation

@alex-vt
Copy link
Copy Markdown
Contributor

@alex-vt alex-vt commented Apr 22, 2025

JIRA ticket
Will be released in: 2025.2.0

Notable changes

  • The face Capture screen: contains an Instructions button at the bottom, that on click navigates to the Instructions screen

image

  • The Instructions screen: is shown the first time, and skipped every time afterwards - to the Capture screen

image

Testing guidance

  • Since the app is newly installed or its data is cleared, for the first time when the face capture feature is used, observe the Instructions screen preceding the Capture screen
  • After the first time when the face capture feature is used - for the 2nd or later time - observe navigation directly to the Capture screen, without the Instructions screen
  • On the Capture screen, press the Instructions button and observe navigation to the Instructions screen

Additional work checklist

  • Effect on other features and security has been considered
  • Design document marked as "In development" (if applicable)
  • External (Gitbook) and internal (Confluence) Documentation is up to date (or ticket created)
  • Test cases in Testiny are up to date: added TC-241, TC-242, TC-243, TC-244
  • Other teams notified about the changes (if applicable)

}

@Test
fun `preparation instructions screen should be set to not showing according to its use case`() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would call it just ShouldShowInstructionsScreenUseCase to describe the purpose and leave the implementation details out of the name of the class.

@alex-vt alex-vt requested a review from luhmirin-s May 6, 2025 15:24
@alex-vt alex-vt force-pushed the feature/skip-instructions branch from 6a4d0a4 to 38a0c31 Compare May 8, 2025 11:23
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2025

@alex-vt alex-vt merged commit 5cb2318 into main May 8, 2025
20 of 21 checks passed
@alex-vt alex-vt deleted the feature/skip-instructions branch May 8, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants