Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [IOPID-1507] Integrate new DS in Pin Screen flow #5737

Open
wants to merge 45 commits into
base: master
Choose a base branch
from

Conversation

ChrisMattew
Copy link
Collaborator

@ChrisMattew ChrisMattew commented May 2, 2024

Short description

Split Pin Screen in two dedicated components

List of changes proposed in this pull request

  • Integration of new DS in Pin Screen section
  • Split the old Pin Screen in PinCreation and PinConfirmation components which respectively handle the pin creation and confirmation workflows
  • Replaced the Alert message which forced the user to restart the application after pin change operation in Profile section with a non-blocking toast message**
  • Extended CodeInput component with a custom wrapper delegated to trigger keyboard opening on element focus

Note

** The need to restart the application after the pin was changed comes from this PR to make it immediately available in app. Today this behavior is not necessary anymore because the pin is now retrieved directly from react-native-keychain when needed.

Test

E2E

Tip

Run e2e tests

Screens

iOS

Onboarding pin creation Profile pin change
iOS-onboarding-pin-creation.mp4
iOS-change-pin-success.mp4
Pin error validation Pin error match
iOS-pin-validation-error.mp4
iOS-pin-confirmation-error.mp4

Android

Onboarding pin creation Profile pin change
Android-onboarding-pin-creation.mp4
Android-change-ping-success.mp4
Pin error validation Pin error match
Android-pin-validation-error.mp4
Android-pin-confirmation-error.mp4

Accessibility iOS & Android

iOS Android
a11y-.MP4
a11y-.mp4

How to test

Since this component is used in two sections of the app - Onboarding and Profile flows - there are two different ways in which it can be tested.

Profile section

This is the easiest way in which it can be tested:

  • In a logged-in context navigate to Profile > Security > Change the unlock code
  • Insert the old pin, when requested, to enable the pin change flow

Onboarding section

Testing in local environment - clone io-dev-api-server repo if you haven't did it yet and follow the instructions - go in config/config.json and in profile.attrs add a fiscal code under fiscal_code key (must be 16 characters long), restart you backend and then restart the application to login again and display the onboarding flow with the new Pin Screen.

 {
   "profile": {
     "attrs": {
       "name": "Gian Maria",
       "fiscal_code": "AAAAAA00A00A000B"
     }
   }
}

Tip

To try multiple times repeat the process changing at least one fiscal_code character

@ChrisMattew ChrisMattew added dont-merge ✋ IO-A&I IO - Autenticazione e Identità labels May 2, 2024
@ChrisMattew ChrisMattew self-assigned this May 2, 2024
@pagopa-github-bot pagopa-github-bot changed the title [IOPID-1507] Integrate new DS in Pin Screen flow feat: [IOPID-1507] Integrate new DS in Pin Screen flow May 2, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented May 2, 2024

Affected stories

  • 🌟 IOPID-1507: [DS-Onboarding][APP] Pin Screen
    subtask of
    • IOPID-1498: DS - Schermate Onboarding/First Onboarding (16)

Generated by 🚫 dangerJS against 53c38c9

Copy link

codecov bot commented May 2, 2024

Codecov Report

Attention: Patch coverage is 83.48624% with 18 lines in your changes are missing coverage. Please review.

Project coverage is 49.80%. Comparing base (4f204b4) to head (fafbbb7).
Report is 101 commits behind head on master.

Current head fafbbb7 differs from pull request most recent head 53c38c9

Please upload reports for the commit 53c38c9 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5737      +/-   ##
==========================================
+ Coverage   48.42%   49.80%   +1.38%     
==========================================
  Files        1488     1629     +141     
  Lines       31617    32268     +651     
  Branches     7669     7728      +59     
==========================================
+ Hits        15311    16072     +761     
+ Misses      16238    16142      -96     
+ Partials       68       54      -14     
Files Coverage Δ
ts/navigation/OnboardingNavigator.tsx 66.66% <ø> (ø)
ts/navigation/ProfileNavigator.tsx 66.66% <ø> (+26.66%) ⬆️
ts/navigation/routes.ts 100.00% <ø> (ø)
ts/sagas/startup/checkConfiguredPinSaga.ts 0.00% <ø> (ø)
...ens/onboarding/OnboardingPinConfirmationScreen.tsx 100.00% <100.00%> (ø)
ts/screens/onboarding/OnboardingPinScreen.tsx 100.00% <100.00%> (+50.00%) ⬆️
ts/screens/profile/PinConfirmationScreen.tsx 100.00% <100.00%> (ø)
ts/screens/profile/PinScreen.tsx 100.00% <100.00%> (+50.00%) ⬆️
ts/components/CodeInput.tsx 94.11% <94.11%> (ø)
ts/components/PinConfirmation.tsx 95.23% <95.23%> (ø)
... and 3 more

... and 550 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8b56cc...53c38c9. Read the comment docs.

@ChrisMattew
Copy link
Collaborator Author

@mariateresaventura copy review needed 🙏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dont-merge ✋ IO-A&I IO - Autenticazione e Identità
Development

Successfully merging this pull request may close these issues.

None yet

5 participants