-
Notifications
You must be signed in to change notification settings - Fork 685
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Saved payment methods main view. (#2882)
* Enabled saved payments link. * Added payment skeleton. * Moved stuff around. * Snapshot update. * Added other card types. * Cleaned up some css. * Using INTL. * Minor. * Minor css change. * Changed name of payments target to checkoutPagePaymentTypes. * Added savedPaymentTypes target. * Updated target docs. * Minor. * Hide delete text in mobile view. * Address PR feedback * Snapshot updates. * Updated snapshots. * Updated tests. * Added new tests. * Minor * Hiding delete button till PWA-638 comes in. * Added new tests. * Minor. * Rendering no payments message. * Clear CustomerPaymentTokens on signout. * Rendering fullpageindicator when data is loading. * Snapshot update. * Removing unnecessary piece of code. Co-authored-by: Tommy Wiebell <twiebell@adobe.com> Co-authored-by: Devagouda <40405790+dpatil-magento@users.noreply.github.com>
- Loading branch information
1 parent
ec4c86e
commit 5029c00
Showing
27 changed files
with
681 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...ne/lib/talons/SavedPaymentsPage/__tests__/__snapshots__/useSavedPaymentsPage.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`it returns the proper shape 1`] = ` | ||
Object { | ||
"isLoading": false, | ||
"savedPayments": Array [], | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
...venia-ui/lib/components/SavedPaymentsPage/__tests__/__snapshots__/creditCard.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Should render properly 1`] = ` | ||
<div> | ||
<div> | ||
<mock-FormattedMessage | ||
defaultMessage="Credit Card" | ||
id="storedPayments.creditCard" | ||
/> | ||
</div> | ||
<div> | ||
**** 1234 Visa | ||
</div> | ||
<div> | ||
Dec. 12 | ||
</div> | ||
<div> | ||
<button | ||
disabled={false} | ||
onClick={[Function]} | ||
type="button" | ||
> | ||
<span> | ||
<span> | ||
<svg | ||
fill="none" | ||
height={16} | ||
stroke="currentColor" | ||
strokeLinecap="round" | ||
strokeLinejoin="round" | ||
strokeWidth="2" | ||
viewBox="0 0 24 24" | ||
width={16} | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<polyline | ||
points="3 6 5 6 21 6" | ||
/> | ||
<path | ||
d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" | ||
/> | ||
<line | ||
x1="10" | ||
x2="10" | ||
y1="11" | ||
y2="17" | ||
/> | ||
<line | ||
x1="14" | ||
x2="14" | ||
y1="11" | ||
y2="17" | ||
/> | ||
</svg> | ||
</span> | ||
<span> | ||
<mock-FormattedMessage | ||
defaultMessage="Delete" | ||
id="storedPayments.delete" | ||
/> | ||
</span> | ||
</span> | ||
</button> | ||
</div> | ||
</div> | ||
`; |
14 changes: 14 additions & 0 deletions
14
...enia-ui/lib/components/SavedPaymentsPage/__tests__/__snapshots__/paymentCard.spec.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Should render properly 1`] = ` | ||
<mock-CreditCard | ||
details={ | ||
Object { | ||
"expirationDate": "12/12/2022", | ||
"maskedCC": "1234", | ||
"type": "VI", | ||
} | ||
} | ||
payment_method_code="braintree" | ||
/> | ||
`; |
Oops, something went wrong.