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(IT Wallet): [SIW-1800,SIW-1801,SIW-1808] Alert for disabled authentication methods, IPZS and Wallet Provider down #6441

Merged
merged 26 commits into from
Nov 26, 2024

Conversation

RiccardoMolinari95
Copy link
Collaborator

@RiccardoMolinari95 RiccardoMolinari95 commented Nov 21, 2024

Short description

SIW-1800
This PR adds functionality to handle disabled authentication methods in the ItwIdentificationModeSelectionScreen

SIW-1801 and SIW-1808
This PR adds functionality to display alerts in the ItwDiscoveryInfoScreen and disables the continue button.

List of changes proposed in this pull request

SIW-1800

  • Add a new selector itwDisabledIdentificationMethodsSelector to fetch disabled authentication methods from the remote config
  • Updated the ItwIdentificationModeSelectionScreen to conditionally render authentication methods based on the disabledIdentificationMethods selector

SIW-1801 and SIW-1808

  • Updated the ItwDiscoveryInfoScreen to conditionally render the alert and status bar based on the visibility and content of the itw_discovery_tos section
  • Disabled the continue button if the itw_discovery_tos section is visible

How to test

Mock the response of /status/backend.json with the following configuration:

SIW-1801 and SIW-1808

{
  "statusMessages": {
    "items": [
      {
        "routes": [
          "ITW_DISCOVERY_INFO"
        ],
        "level": "warning",
        "message": {
          "it-IT": "Non puoi attivare documenti su IO a causa di un problema temporaneo sui sistemi dell'ente che emette la versione digitale dei documenti. Riprova più tardi",
          "en-EN": "You cannot activate documents on IO due to a temporary issue with the systems of the entity issuing the digital version of the documents. Please try again later."
        }
      }
    ]
  },
  "config": {
    "itw": {
      "wallet_activation_disabled": true
    }
  }
}

SIW-1800

{
  "statusMessages": {
    "items": [
      {
        "routes": [
          "ITW_IDENTIFICATION_MODE_SELECTION"
        ],
        "level": "warning",
        "message": {
          "it-IT": "L'accesso con CieID non e' al momento disponibile. Usa un altro metodo o riprova piu' tardi.",
          "en-EN": "English."
        }
      }
    ]
  },
  "config": {
    "itw": {
      "disabled_identification_methods": [
        "CieID"
      ]
    }
  }
}

Screenshot 2024-11-26 at 15 04 39
Screenshot 2024-11-26 at 14 46 28
Screenshot 2024-11-26 at 14 50 14

@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Nov 21, 2024

Warnings
⚠️

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

  • 🌟 SIW-1800: Come utente voglio essere informato qualora ci sia un down di un IDP così da autenticarmi con un altro metodo
    subtask of
  • 🌟 SIW-1801: Come utente voglio essere informato qualora ci sia un'indisponibilità temporanea dei sistemi del wallet provider, così da riprovare in seguito
    subtask of
  • 🌟 SIW-1808: Come utente voglio essere informato qualora ci sia un'indisponibilità temporanea dei sistemi di IPZS per attivare il wallet, così da riprovare in seguito
    subtask of

Generated by 🚫 dangerJS against 2b60b47

@RiccardoMolinari95 RiccardoMolinari95 changed the title [SIW-1800, SIW-1808] Alert for disabled authentication methods and down IPZS [SIW-1800,SIW-1808] Alert for disabled authentication methods and down IPZS Nov 21, 2024
@gispada gispada changed the title [SIW-1800,SIW-1808] Alert for disabled authentication methods and down IPZS feat(IT Wallet): [SIW-1800,SIW-1808] Alert for disabled authentication methods and down IPZS Nov 21, 2024
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

Project coverage is 48.12%. Comparing base (4f204b4) to head (2b60b47).
Report is 792 commits behind head on master.

Files with missing lines Patch % Lines
ts/store/reducers/backendStatus/remoteConfig.ts 88.88% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6441      +/-   ##
==========================================
- Coverage   48.42%   48.12%   -0.31%     
==========================================
  Files        1488     1628     +140     
  Lines       31617    32678    +1061     
  Branches     7669     7445     -224     
==========================================
+ Hits        15311    15725     +414     
- Misses      16238    16908     +670     
+ Partials       68       45      -23     
Files with missing lines Coverage Δ
...allet/discovery/screens/ItwDiscoveryInfoScreen.tsx 84.61% <100.00%> (ø)
...n/screens/ItwIdentificationModeSelectionScreen.tsx 79.31% <100.00%> (ø)
ts/store/reducers/__mock__/backendStatus.ts 100.00% <ø> (+33.33%) ⬆️
ts/store/reducers/backendStatus/remoteConfig.ts 59.55% <88.88%> (ø)

... and 1687 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 aa744cd...2b60b47. Read the comment docs.

@RiccardoMolinari95 RiccardoMolinari95 changed the base branch from master to SIW-1830-wallet-errors-refactor November 26, 2024 13:20
@RiccardoMolinari95 RiccardoMolinari95 changed the base branch from SIW-1830-wallet-errors-refactor to master November 26, 2024 13:21
Copy link
Contributor

@mastro993 mastro993 left a comment

Choose a reason for hiding this comment

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

LGTM, everything works as expected

@gispada gispada merged commit 4e12b91 into master Nov 26, 2024
12 checks passed
@gispada gispada deleted the SIW-1800-banner-down-authentication-method branch November 26, 2024 14:55
mastro993 added a commit that referenced this pull request Nov 26, 2024
…alert (#6442)

> [!WARNING]
> Depends on #6441 

## Short description
This PR handles the remote configuration for the credential selection
screen, in order to
- Display an alert to inform the user of any problems with credentials;
- Disable specific credentials so the user cannot start the issuance
flow.

## List of changes proposed in this pull request
- Modified `WalletCardOnboardingScreen`
- Created `ItwOnboardingModuleCredential` to keep the parent component
cleaner

## How to test
Mock the response of `/status/backend.json` with the following
configuration:
```json
{
  "statusMessages": {
    "items": [
      {
        "routes": ["ITW_CARD_ONBOARDING"],
        "level": "warning",
        "message": {
          "it-IT": "C'è un problema temporaneo sul servizio di emissione della versione digitale della Patente. Riprova più tardi.",
          "en-EN": "C'è un problema temporaneo sul servizio di emissione della versione digitale della Patente. Riprova più tardi."
        }
      }
    ]
  },
  "config": {
    "itw": {
      "disabled_credentials": ["MDL"]
    }
  }
}
```
<img
src="https://github.com/user-attachments/assets/f8d0c87a-2331-4ef5-8101-7cfe723a1e3d"
width="340" />

---------

Co-authored-by: Riccardo.Molinari <[email protected]>
Co-authored-by: RiccardoMolinari95 <[email protected]>
Co-authored-by: RiccardoMolinari95 <[email protected]>
Co-authored-by: Federico Mastrini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants