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

[FEATURE] #3102 Create a new Target for EditModal and Summary #3103

Merged
merged 28 commits into from Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4d32fa9
#3102 Create a new Target for Edit Modal
Apr 6, 2021
fafe780
Merge branch 'develop' into 3102newTargetEditPayment
Apr 17, 2021
909aea8
Merge remote-tracking branch 'upstream/develop' into 3102newTargetEdi…
May 13, 2021
e79832d
Impelement Summery target
May 13, 2021
5c9b3ee
Add missing dep
May 13, 2021
d96251f
Fix typos
May 13, 2021
df412a1
Add coverage and fix review comments
May 15, 2021
f600470
Fix format and props
May 15, 2021
9667eef
Merge branch 'develop' into 3102newTargetEditPayment
May 15, 2021
3e472d5
Update packages/venia-ui/lib/components/CheckoutPage/PaymentInformati…
May 17, 2021
c6dace0
Update packages/venia-ui/lib/components/CheckoutPage/PaymentInformati…
May 17, 2021
e24ea1b
handleDropinReady > handlePaymentReady
sirugh May 18, 2021
4af14bc
Have the payment summary query for its own data
sirugh May 18, 2021
06ffc3d
Merge branch 'develop' into 3102newTargetEditPayment
sirugh May 20, 2021
599d40e
Update tests
sirugh May 20, 2021
ec2262c
fix test props
sirugh May 20, 2021
a00727e
Merge branch 'develop' of github.com:magento/pwa-studio into 3102newT…
anthoula Jun 2, 2021
0d33bd0
Merge branch 'develop' of github.com:magento/pwa-studio into 3102newT…
anthoula Jun 3, 2021
2d33b2f
Merge branch 'develop' of github.com:magento/pwa-studio into 3102newT…
anthoula Jun 7, 2021
087069a
Merge branch 'develop' of github.com:magento/pwa-studio into 3102newT…
anthoula Jun 8, 2021
9e6f49c
Merge develop
Jun 9, 2021
ef3e7a0
Solve merge issue
Jun 9, 2021
5c13f87
Change to lazy to getter perfomance remove nessary code
Jun 9, 2021
220722e
Update tests to suport lazy import
Jun 9, 2021
6192fc3
Merge branch 'develop' of github.com:magento/pwa-studio into 3102newT…
anthoula Jun 9, 2021
d8733ef
Update packages/venia-ui/lib/components/CheckoutPage/PaymentInformati…
Jun 9, 2021
c32cbd2
Merge branch 'develop' of github.com:magento/pwa-studio into 3102newT…
anthoula Jun 10, 2021
0899e5e
Merge branch '3102newTargetEditPayment' of github.com:larsroettig/pwa…
anthoula Jun 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,357 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Should not render billing address if it is same as shipping address 1`] = `
<div
className="root"
>
<div
className="heading_container"
>
<h5
className="heading"
>
<mock-FormattedMessage
defaultMessage="Payment Information"
id="checkoutPage.paymentInformation"
/>
</h5>
<button
className="edit_button"
disabled={false}
type="button"
>
<span
className="content"
>
<span
className="root"
>
<svg
className="icon"
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"
>
<path
d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
/>
</svg>
</span>
<span
className="edit_text"
>
<mock-FormattedMessage
defaultMessage="Edit"
id="global.editButton"
/>
</span>
</span>
</button>
</div>
<div
className="card_details_container"
>
<span
className="payment_type"
>
<mock-FormattedMessage
defaultMessage="Credit Card"
id="global.creditCard"
/>
</span>
<span
className="payment_details"
>
visa ending in 1234
</span>
</div>
<div
className="address_summary_container"
>
<div>
<span
className="first_name"
/>
<span
className="last_name"
/>
</div>
<div>
<span
className="street1"
/>
<span
className="street2"
/>
<span
className="city"
/>
<span
className="state"
/>
</div>
<div>
<span
className="postalCode"
/>
<span
className="country"
/>
</div>
</div>
</div>
`;

exports[`Should render billing address if it is not same as shipping address 1`] = `
<div
className="root"
>
<div
className="heading_container"
>
<h5
className="heading"
>
<mock-FormattedMessage
defaultMessage="Payment Information"
id="checkoutPage.paymentInformation"
/>
</h5>
<button
className="edit_button"
disabled={false}
type="button"
>
<span
className="content"
>
<span
className="root"
>
<svg
className="icon"
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"
>
<path
d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
/>
</svg>
</span>
<span
className="edit_text"
>
<mock-FormattedMessage
defaultMessage="Edit"
id="global.editButton"
/>
</span>
</span>
</button>
</div>
<div
className="card_details_container"
>
<span
className="payment_type"
>
<mock-FormattedMessage
defaultMessage="Credit Card"
id="global.creditCard"
/>
</span>
<span
className="payment_details"
>
visa ending in 1234
</span>
</div>
<div
className="address_summary_container"
>
<div>
<span
className="first_name"
>
Goosey
</span>
<span
className="last_name"
>
Goose
</span>
</div>
<div>
<span
className="street1"
>
12345 Goosey Blvd
</span>
<span
className="street2"
>
Apt 123
</span>
<span
className="city"
>
Austin
</span>
<span
className="state"
>
Texas
</span>
</div>
<div>
<span
className="postalCode"
>
12345
</span>
<span
className="country"
>
Goose Land
</span>
</div>
</div>
</div>
`;

exports[`should render 1`] = `
<div
className="root"
>
<div
className="heading_container"
>
<h5
className="heading"
>
<mock-FormattedMessage
defaultMessage="Payment Information"
id="checkoutPage.paymentInformation"
/>
</h5>
<button
className="edit_button"
disabled={false}
type="button"
>
<span
className="content"
>
<span
className="root"
>
<svg
className="icon"
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"
>
<path
d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"
/>
</svg>
</span>
<span
className="edit_text"
>
<mock-FormattedMessage
defaultMessage="Edit"
id="global.editButton"
/>
</span>
</span>
</button>
</div>
<div
className="card_details_container"
>
<span
className="payment_type"
>
<mock-FormattedMessage
defaultMessage="Credit Card"
id="global.creditCard"
/>
</span>
<span
className="payment_details"
>
visa ending in 1234
</span>
</div>
<div
className="address_summary_container"
>
<div>
<span
className="first_name"
>
Goosey
</span>
<span
className="last_name"
>
Goose
</span>
</div>
<div>
<span
className="street1"
>
12345 Goosey Blvd
</span>
<span
className="street2"
>
Apt 123
</span>
<span
className="city"
>
Austin
</span>
<span
className="state"
>
Texas
</span>
</div>
<div>
<span
className="postalCode"
>
12345
</span>
<span
className="country"
>
Goose Land
</span>
</div>
</div>
</div>
`;
Expand Up @@ -10,14 +10,11 @@ exports[`Should return correct shape 1`] = `
shouldDisableConfirmButton={false}
title="Edit Payment Information"
>
<div
className="body"
>
<mock-CreditCard
onDropinReady={[Function]}
onPaymentSuccess={[Function]}
shouldSubmit={false}
/>
</div>
<mock-Braintree
id="BraintreeMockId"
onDropinReady={[Function]}
onPaymentSuccess={[Function]}
shouldSubmit={false}
/>
</mock-Dialog>
`;