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

[SIW-1455] Reissuing expired or expiring eID #6580

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

Conversation

RiccardoMolinari95
Copy link
Collaborator

@RiccardoMolinari95 RiccardoMolinari95 commented Dec 24, 2024

Short description

This PR handle the reissuing of eID when it is expired or expiring and manages credential requests when the eID is expired, and the Wallet Instance is invalid

List of changes proposed in this pull request

  • Add a cta in ItwEidLifecycleAlertto start eID reissuing, navigating to ItwIdentificationModeSelectionScreen with param eidReissuing set to true
  • Add an optional parameter eidReissuing to ItwIdentificationModeSelectionScreen, if present send the start-reissuing event to itwEidIssuanceMachine
  • Created a new screen ItwPresentationEidVerificationExpiredScreen, displayed when requesting a credential with the expired eID and a not valid Wallet Instance
  • Navigate to ItwPresentationEidVerificationExpiredScreen in WalletCardOnboardingScreen requesting a credential but the Wallet Instance is not valid
  • In itwEidIssuanceMachinecreated a new action setIsReissuing to set the isReissuing context state to true, and added a new guard isReissuing to check if we are in the reissuing scenario.
    Added the start-reissuing event to the Idle state, allowing a direct transition to the UserIdentification state. Enhanced the UserIdentification state to handle the back button differently based on whether the flow is in the reissuing scenario or not. Updated the DisplayingPreview state to handle reissuing. If isReissuing is true, it navigates directly to the wallet; otherwise, it transitions to the Success state

How to test

To test the changes, simulate different scenarios by mocking the jwt.expiration of the stored eID credential: request the eID when it is expiring or expired, and attempt to request a credential with an expired eID and an invalid Wallet Instance, ensuring the correct screens and flows are triggered

Requesting credential with WI invalid and eID expired

Screen.Recording.2024-12-24.at.10.50.05.mov

Reissuing expiring eID (same flow for expired eID)

Screen.Recording.2024-12-24.at.10.38.58.mov

@RiccardoMolinari95 RiccardoMolinari95 self-assigned this Dec 24, 2024
@RiccardoMolinari95 RiccardoMolinari95 marked this pull request as draft December 24, 2024 09:54
@RiccardoMolinari95 RiccardoMolinari95 changed the title [SIW-1455] eID re-issuing when jwt is expiring or expired [SIW-1455] Reissuing Expired or Expiring eID Dec 24, 2024
Copy link
Contributor

github-actions bot commented Dec 24, 2024

Jira Pull Request Link

This Pull Request refers to the following Jira issue SIW-1455

Copy link

codecov bot commented Dec 24, 2024

Codecov Report

Attention: Patch coverage is 42.42424% with 19 lines in your changes missing coverage. Please review.

Project coverage is 49.31%. Comparing base (3467298) to head (c2d1773).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...ns/ItwPresentationEidVerificationExpiredScreen.tsx 11.11% 8 Missing ⚠️
.../onboarding/screens/WalletCardOnboardingScreen.tsx 33.33% 4 Missing ⚠️
ts/features/itwallet/machine/eid/guards.ts 25.00% 3 Missing ⚠️
ts/features/itwallet/machine/eid/machine.ts 60.00% 2 Missing ⚠️
...twallet/common/components/ItwEidLifecycleAlert.tsx 66.66% 1 Missing ⚠️
...n/screens/ItwIdentificationModeSelectionScreen.tsx 83.33% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6580      +/-   ##
==========================================
+ Coverage   46.95%   49.31%   +2.35%     
==========================================
  Files        1555     1558       +3     
  Lines       32086    32153      +67     
  Branches     7265     7272       +7     
==========================================
+ Hits        15066    15855     +789     
+ Misses      16985    16260     -725     
- Partials       35       38       +3     
Files with missing lines Coverage Δ
...common/components/ItwEidInfoBottomSheetContent.tsx 70.83% <ø> (ø)
ts/features/itwallet/machine/eid/actions.ts 1.49% <ø> (ø)
ts/features/itwallet/machine/eid/context.ts 100.00% <ø> (ø)
...features/itwallet/navigation/ItwStackNavigator.tsx 36.36% <ø> (ø)
ts/features/itwallet/navigation/routes.ts 100.00% <ø> (ø)
...eatures/wallet/components/WalletCardsContainer.tsx 100.00% <ø> (ø)
...twallet/common/components/ItwEidLifecycleAlert.tsx 84.21% <66.66%> (-4.03%) ⬇️
...n/screens/ItwIdentificationModeSelectionScreen.tsx 79.41% <83.33%> (+0.10%) ⬆️
ts/features/itwallet/machine/eid/machine.ts 91.89% <60.00%> (+83.06%) ⬆️
ts/features/itwallet/machine/eid/guards.ts 14.28% <25.00%> (+5.19%) ⬆️
... and 2 more

... and 73 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 b2d7fd2...c2d1773. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants