pagopa / io-app

IO, l'app dei servizi pubblici
https://io.italia.it
European Union Public License 1.2
617 stars 105 forks source link

chore: [IOPID-2137,IOPID-2479] CieID events integration #6428

Closed ChrisMattew closed 1 week ago

ChrisMattew commented 1 week ago

Short description

This PR adds event tracking to the CieID login flow and edit copy on CieIdWizard screen

List of changes proposed in this pull request

Demo

Test wizards
Test operation cancel and login success

Screen

How to test

Run the app and navigate through the CieID login/wizards flows and check if all the events are properly dispatched.

Events table

| TAG | EVENT NAME | EVENT CATEGORY | EVENT TYPE | TRIGGER | PROPERTY 1 | PROPERTY 2 | |:----------|:---------------------------------------|:-------------------|:-------------|:------------------------------------------------------------------|:-------------------------|:-------------------------| |New | LOGIN_CIE_IDENTIFICATION_MODE | UX | screen view | screen view > bottom sheet “How do you want to login?” | | | |New | LOGIN_CIE_WIZARD_SELECTED | UX | action | tap > "We give you a hand” | | | |New | LOGIN_CIE_WIZARD_CIEID | UX | screen view | screen view > “Do you have the CieID app?” | | | |New | LOGIN_CIE_WIZARD_CIEID_SELECTED | UX | action | tap > "Yes, log in with CieID" | | | |New | LOGIN_CIE_WIZARD_PIN | UX | screen view | screen view > “Do you have your Electronic Identity Card and PIN?”| | | |New | LOGIN_CIE_WIZARD_PIN_INFO | UX | action | tap > "Where can I find the CIE PIN?" | | | |New | LOGIN_CIE_WIZARD_PIN_SELECTED | UX | action | tap > "Yes, enter with CIE + PIN" | | | |New | LOGIN_CIE_WIZARD_SPID | UX | screen view | screen view > “Do you have SPID?” | | | |New | LOGIN_CIE_WIZARD_SPID_SELECTED | UX | action | tap > "Yes, login with SPID" | | | |New | LOGIN_CIE_WIZARD_IDP_ACTIVATION | UX | screen view | screen view > "Activate your digital identity!" | | | |New | LOGIN_CIE_PIN_SELECTED | UX | action | tap > "Login with CIE + PIN" | | | |New | LOGIN_CIEID_SELECTED | UX | action | tap > "Login with CieID" | security_level = L2 / L3 | | |New | LOGIN_CIEID_APP_NOT_FOUND | KO | error | screen > "We can't find the CieID app" | | | |New | LOGIN_CIEID_APP_NOT_FOUND_DOWNLOAD | UX | action | tap > "scarica CieID" | | | |New | LOGIN_CIEID_UX_SUCCESS | UX | confirm | Login with CieID success | login_session= 365 / 30 | | |New | LOGIN_ERROR_MESSAGE | KO | error | screen view > "It was not possible to access" | idp |error message | |New | LOGIN_CIEID_FALLBACK_CIE_PIN | KO | | screen > "Can't log in with CieID?" | | | |New | LOGIN_CIEID_FALLBACK_CIE_PIN_SELECTED | UX | action | tap > "Login with CIE + PIN" | | | |New | LOGIN_CIEID_FALLBACK_SPID | KO | | screen > "Can't log in with CieID?" | | | |New | LOGIN_CIEID_FALLBACK_CIE_SPID_SELECTED | UX | action | tap > "Login with SPID" | | | |Updated | LOGIN_SPID_GENERIC_ERROR | KO | | event > "Generic error" | idp | error message | |Updated | LOGIN_SPID_ATTEMPTS_ERROR | KO | | event > "Max login attempts reached" | idp | | |Updated | LOGIN_SPID_SECURITY_LEVEL | KO | | event > "Security level" | idp | | |Updated | LOGIN_SPID_TIMEOUT_ERROR | KO | | event > "Timeout error" | idp | | |Updated | LOGIN_SPID_DATA_SHARING_ERROR | KO | | event > "Data sharing consent denied" | idp | | |Updated | LOGIN_SPID_IDENTITY_ERROR | KO | | event > "Identity suspended or revoked" | idp | | |Updated | LOGIN_SPID_CANCEL_ERROR | KO | | event > "login cancelled by the user" | idp | |
pagopa-github-bot commented 1 week ago
Warnings
:warning: Multiple stories with different types are associated with this Pull request. Only one tag will be added, following the order: `feature > bug > chore`

Affected stories

Generated by :no_entry_sign: dangerJS against 8a2c975ec4fc595b8c1f5b38b009198b12ad2211

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 60.52632% with 60 lines in your changes missing coverage. Please review.

Project coverage is 47.88%. Comparing base (4f204b4) to head (8a2c975). Report is 758 commits behind head on master.

Files with missing lines Patch % Lines
.../screens/authentication/analytics/spidAnalytics.ts 10.71% 25 Missing :warning:
ts/screens/authentication/analytics/index.ts 7.14% 13 Missing :warning:
ts/features/cie/analytics/index.ts 65.62% 11 Missing :warning:
ts/sagas/startup/authenticationSaga.ts 0.00% 10 Missing :warning:
ts/screens/authentication/LandingScreen.tsx 94.44% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pagopa/io-app/pull/6428/graphs/tree.svg?width=650&height=150&src=pr&token=zsurlZdPFW&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa)](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) ```diff @@ Coverage Diff @@ ## master #6428 +/- ## ========================================== - Coverage 48.42% 47.88% -0.55% ========================================== Files 1488 1612 +124 Lines 31617 32417 +800 Branches 7669 7466 -203 ========================================== + Hits 15311 15522 +211 - Misses 16238 16842 +604 + Partials 68 53 -15 ``` | [Files with missing lines](https://app.codecov.io/gh/pagopa/io-app/pull/6428?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) | Coverage Δ | | |---|---|---| | [ts/features/cie/components/CieIdNotInstalled.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Ffeatures%2Fcie%2Fcomponents%2FCieIdNotInstalled.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvY2llL2NvbXBvbmVudHMvQ2llSWROb3RJbnN0YWxsZWQudHN4) | `100.00% <100.00%> (ø)` | | | [...s/features/cie/screens/CieIdNotInstalledScreen.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Ffeatures%2Fcie%2Fscreens%2FCieIdNotInstalledScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvY2llL3NjcmVlbnMvQ2llSWROb3RJbnN0YWxsZWRTY3JlZW4udHN4) | `100.00% <100.00%> (ø)` | | | [...s/features/cie/screens/errors/CieIdErrorScreen.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Ffeatures%2Fcie%2Fscreens%2Ferrors%2FCieIdErrorScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvY2llL3NjcmVlbnMvZXJyb3JzL0NpZUlkRXJyb3JTY3JlZW4udHN4) | `100.00% <100.00%> (ø)` | | | [ts/features/cie/screens/wizards/CieIdWizard.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Ffeatures%2Fcie%2Fscreens%2Fwizards%2FCieIdWizard.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvY2llL3NjcmVlbnMvd2l6YXJkcy9DaWVJZFdpemFyZC50c3g=) | `94.73% <100.00%> (ø)` | | | [ts/features/cie/screens/wizards/CiePinWizard.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Ffeatures%2Fcie%2Fscreens%2Fwizards%2FCiePinWizard.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvY2llL3NjcmVlbnMvd2l6YXJkcy9DaWVQaW5XaXphcmQudHN4) | `82.75% <100.00%> (ø)` | | | [...eatures/cie/screens/wizards/IDActivationWizard.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Ffeatures%2Fcie%2Fscreens%2Fwizards%2FIDActivationWizard.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvY2llL3NjcmVlbnMvd2l6YXJkcy9JREFjdGl2YXRpb25XaXphcmQudHN4) | `92.30% <100.00%> (ø)` | | | [ts/features/cie/screens/wizards/SpidWizard.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Ffeatures%2Fcie%2Fscreens%2Fwizards%2FSpidWizard.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvY2llL3NjcmVlbnMvd2l6YXJkcy9TcGlkV2l6YXJkLnRzeA==) | `100.00% <100.00%> (ø)` | | | [...features/cieLogin/components/CieIdLoginWebView.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Ffeatures%2FcieLogin%2Fcomponents%2FCieIdLoginWebView.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvY2llTG9naW4vY29tcG9uZW50cy9DaWVJZExvZ2luV2ViVmlldy50c3g=) | `64.22% <100.00%> (ø)` | | | [ts/hooks/useNavigateToLoginMethod.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Fhooks%2FuseNavigateToLoginMethod.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvaG9va3MvdXNlTmF2aWdhdGVUb0xvZ2luTWV0aG9kLnRzeA==) | `100.00% <100.00%> (ø)` | | | [ts/screens/authentication/IdpLoginScreen.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree&filepath=ts%2Fscreens%2Fauthentication%2FIdpLoginScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvc2NyZWVucy9hdXRoZW50aWNhdGlvbi9JZHBMb2dpblNjcmVlbi50c3g=) | `1.86% <ø> (-2.14%)` | :arrow_down: | | ... and [8 more](https://app.codecov.io/gh/pagopa/io-app/pull/6428?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) | | ... and [1649 files with indirect coverage changes](https://app.codecov.io/gh/pagopa/io-app/pull/6428/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/pagopa/io-app/pull/6428?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/pagopa/io-app/pull/6428?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa). Last update [33a36c5...8a2c975](https://app.codecov.io/gh/pagopa/io-app/pull/6428?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa).

🚨 Try these New Features:

ChrisMattew commented 1 week ago

@mariateresaventura copy review needed 🙏🏻

mariateresaventura commented 1 week ago

@mariateresaventura copy review needed 🙏🏻

Done!