-
Notifications
You must be signed in to change notification settings - Fork 106
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): [#177145461] Show privative cards in wallet home #2878
Conversation
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #2878 +/- ##
==========================================
+ Coverage 57.94% 58.00% +0.05%
==========================================
Files 877 880 +3
Lines 24065 24141 +76
Branches 4439 4453 +14
==========================================
+ Hits 13944 14002 +58
- Misses 10032 10049 +17
- Partials 89 90 +1
Continue to review full report at Codecov.
|
</Body> | ||
} | ||
right={renderRight(props, imgDimensions)} | ||
onPress={() => props.navigateToCobadgeDetails(props.privative)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onPress={() => props.navigateToCobadgeDetails(props.privative)} | |
onPress={() => props.navigateToPrivativeDetails(props.privative)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7402c36
const mapDispatchToProps = (dispatch: Dispatch) => ({ | ||
navigateToCobadgeDetails: (privative: PrivativePaymentMethod) => | ||
dispatch(navigateToPrivativeDetailScreen(privative)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const mapDispatchToProps = (dispatch: Dispatch) => ({ | |
navigateToCobadgeDetails: (privative: PrivativePaymentMethod) => | |
dispatch(navigateToPrivativeDetailScreen(privative)) | |
const mapDispatchToProps = (dispatch: Dispatch) => ({ | |
navigateToPrivativeDetails: (privative: PrivativePaymentMethod) => | |
dispatch(navigateToPrivativeDetailScreen(privative)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7402c36
ts/types/pagopa.ts
Outdated
@@ -223,6 +225,10 @@ export type CreditCardPaymentMethod = RawCreditCardPaymentMethod & | |||
PaymentMethodRepresentation & | |||
WithAbi; | |||
|
|||
export type PrivativePaymentMethod = CreditCardPaymentMethod & { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about this and maybe the cleanest solution is to declare:
export type RawPrivativePaymentMethod = WalletV2WithoutInfo & {
kind: "Privative";
info: CardInfo;
};
export type PrivativePaymentMethod = RawPrivativePaymentMethod & { ... };
In order to have a a specific type inside the domain model. What you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, added in a62709b
ts/features/wallet/privative/component/PrivativeWalletPreview.tsx
Outdated
Show resolved
Hide resolved
ts/features/wallet/component/__test__/CardLayoutPreview.test.tsx
Outdated
Show resolved
Hide resolved
ts/features/wallet/privative/component/PrivativeWalletPreview.tsx
Outdated
Show resolved
Hide resolved
expect(caption).not.toBeNull(); | ||
expect(caption).toHaveTextContent(aPrivativeCard.caption); | ||
}); | ||
it("should show the fallback gdo logo if useImageResize return a size but there isn't the cardLogo", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it("should show the fallback gdo logo if useImageResize return a size but there isn't the cardLogo", () => { | |
it("should show the fallback gdo logo if useImageResize returns a size but there isn't the cardLogo", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modified in 7822b59
ts/features/wallet/privative/component/__tests__/PrivativeWalletPreview.test.tsx
Outdated
Show resolved
Hide resolved
…461-preview-privative-card
Short description
This PR show the preview of the privative cards in the wallet home.
List of changes proposed in this pull request
PrivativeWalletPreview
componentPrivativePaymentMethod
typeCardPreview
component to favor composition