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(Bonus Pagamenti Digitali): [#176575256,#176578559,#176578568] Co-badge card onboarding workflow #2752

Merged
merged 63 commits into from
Jan 29, 2021

Conversation

fabriziofff
Copy link
Contributor

@fabriziofff fabriziofff commented Jan 26, 2021

This pr depends on #2750

Short description

This pr implements the "add co-badge to wallet" workflow, starting from a BANCOMAT.

Registrazione.schermo.2021-01-28.alle.21.59.51.mov

List of changes proposed in this pull request

  • Changed BancomatDetailScreen in order to handle the new workflow (instead of the static handling inside the BancomatInformation component)
  • Reset ts/features/wallet/onboarding/bancomat/store/reducers/addingPans.ts with the action walletAddBancomatStart
  • Reset ts/features/wallet/onboarding/bancomatPay/store/reducers/addingBPay.ts with the action walletAddBPayStart
  • Changed the start screen of the workflow with CoBadgeStartScreen
  • Added ts/features/wallet/onboarding/cobadge/saga/orchestration/addCoBadgeToWallet.ts to orchestrate the workflow
  • Changed ts/features/wallet/onboarding/cobadge/screens/search/SearchAvailableCoBadgeScreen.tsx in order to handling the results of the search available co-badge cards
  • Changed ts/features/wallet/onboarding/cobadge/screens/start/CoBadgeStartScreen.tsx in order to handling the abi configuration loading.
  • Added ts/features/wallet/onboarding/cobadge/store/reducers/abiConfiguration.ts store & reducer

How to test

Manual test from entry point:

  • An existing bancomat -> Add Credit Card
  • Onboard a new bancomat and at the end of the workflow choose Add credit card from the bottomsheet

@pagopa-github-bot pagopa-github-bot changed the title [#176575256] Co-badge card onboarding workflow feat(Bonus Pagamenti Digitali): [#176575256] Co-badge card onboarding workflow Jan 26, 2021
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Jan 26, 2021

Fails
🚫

Danger failed to run Dangerfile.ts.

Affected stories

  • 🌟 #176575256: Come CIT voglio ricercare le carte di circuito internazionale associate al mio BANCOMAT

Error TypeError

Cannot read property 'standard-version' of null
TypeError: Cannot read property 'standard-version' of null
    at Object.get (/home/circleci/italia-app/node_modules/jsonpointer/jsonpointer.js:69:14)
    at /home/circleci/italia-app/node_modules/danger/distribution/platforms/git/gitJSONToGitDSL.js:128:62
    at Array.reduce (<anonymous>)
    at Object.<anonymous> (/home/circleci/italia-app/node_modules/danger/distribution/platforms/git/gitJSONToGitDSL.js:121:48)
    at step (/home/circleci/italia-app/node_modules/danger/distribution/platforms/git/gitJSONToGitDSL.js:32:23)
    at Object.next (/home/circleci/italia-app/node_modules/danger/distribution/platforms/git/gitJSONToGitDSL.js:13:53)
    at fulfilled (/home/circleci/italia-app/node_modules/danger/distribution/platforms/git/gitJSONToGitDSL.js:4:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Dangerfile

60|   .then()
61|   .catch();
62| 
----------------^

Generated by 🚫 dangerJS against 52d9513

@codecov
Copy link

codecov bot commented Jan 26, 2021

Codecov Report

Merging #2752 (bfc659f) into master (178a8c7) will increase coverage by 0.06%.
The diff coverage is 54.74%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2752      +/-   ##
==========================================
+ Coverage   53.84%   53.91%   +0.06%     
==========================================
  Files         782      792      +10     
  Lines       21591    21873     +282     
  Branches     4092     3778     -314     
==========================================
+ Hits        11625    11792     +167     
- Misses       9910    10025     +115     
  Partials       56       56              
Impacted Files Coverage Δ
...g/cobadge/screens/add-account/AddCoBadgeScreen.tsx 37.50% <0.00%> (-0.80%) ⬇️
...ng/cobadge/screens/search/ko/CoBadgeKoNotFound.tsx 84.21% <ø> (ø)
...ing/cobadge/screens/search/ko/CoBadgeKoTimeout.tsx 77.27% <ø> (ø)
...t/onboarding/cobadge/store/reducers/abiSelected.ts 56.25% <0.00%> (-3.75%) ⬇️
.../screens/search/ko/CoBadgeKoSingleBankNotFound.tsx 75.00% <25.00%> (ø)
...es/wallet/bancomat/screen/BancomatDetailScreen.tsx 60.86% <30.00%> (-8.58%) ⬇️
...t/onboarding/bancomat/store/reducers/addingPans.ts 60.00% <33.33%> (-6.67%) ⬇️
...nboarding/bancomatPay/store/reducers/addingBPay.ts 60.00% <33.33%> (-6.67%) ⬇️
...ge/screens/search/SearchAvailableCoBadgeScreen.tsx 46.29% <35.00%> (-14.58%) ⬇️
...atures/wallet/component/NewMethodAddedNotifier.tsx 46.66% <37.50%> (-5.34%) ⬇️
... and 29 more

Continue to review full report at Codecov.

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

@fabriziofff fabriziofff marked this pull request as ready for review January 28, 2021 21:09
if (bancomat.abiInfo?.abi) {
props.addCoBadge(bancomat.abiInfo.abi);
} else {
showToast(I18n.t("global.genericError"), "danger");
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we return a more specific message in this case?

@@ -16,9 +16,10 @@ const abiSelectedReducer = (
switch (action.type) {
case getType(searchUserCoBadge.request):
return action.payload ?? null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return action.payload ?? null;
case getType(walletAddCoBadgeFromBancomatStart):
return action.payload ?? null;

@Undermaken Undermaken merged commit 390d2d4 into master Jan 29, 2021
@fabriziofff fabriziofff changed the title feat(Bonus Pagamenti Digitali): [#176575256] Co-badge card onboarding workflow feat(Bonus Pagamenti Digitali): [#176575256,#176578559,#176578568] Co-badge card onboarding workflow Feb 1, 2021
@fabriziofff fabriziofff deleted the 176575256-onboarding-cobadge branch January 21, 2022 11:48
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.

4 participants