-
Notifications
You must be signed in to change notification settings - Fork 683
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Make order confirmation its own page * Add refresh support for order confirmation page for logged in users * Update unit tests for useOrderConfirmationPage module * Update tests for useItemsReview module * Update OrderConfirmationPage tests * Run prettier * Fix linting issues * Fix broken checkout flow for guest and logged in users --------- Co-authored-by: James Calcaben <[email protected]>
- Loading branch information
Showing
17 changed files
with
836 additions
and
390 deletions.
There are no files selected for viewing
215 changes: 121 additions & 94 deletions
215
packages/peregrine/lib/talons/CheckoutPage/ItemsReview/__fixtures__/cartItems.js
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 |
---|---|---|
@@ -1,102 +1,129 @@ | ||
export default { | ||
cart: { | ||
id: 'GXtkt675mPd3gYuvhWLd5iw5ekVoDj1b', | ||
total_quantity: 7, | ||
items: [ | ||
export default [ | ||
{ | ||
id: '29568', | ||
product: { | ||
id: 1093, | ||
name: 'Jillian Top', | ||
thumbnail: { | ||
url: | ||
'https://master-7rqtwti-c5v7sxvquxwl4.us-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/t/vt12-kh_main_2.jpg', | ||
__typename: 'ProductImage' | ||
}, | ||
__typename: 'ConfigurableProduct' | ||
}, | ||
quantity: 3, | ||
configurable_options: [ | ||
{ | ||
configurable_product_option_uid: 179, | ||
option_label: 'Fashion Color', | ||
configurable_product_option_value_uid: 18, | ||
value_label: 'Peach', | ||
__typename: 'SelectedConfigurableOption' | ||
}, | ||
{ | ||
configurable_product_option_uid: 182, | ||
option_label: 'Fashion Size', | ||
configurable_product_option_value_uid: 27, | ||
value_label: 'M', | ||
__typename: 'SelectedConfigurableOption' | ||
} | ||
], | ||
__typename: 'ConfigurableCartItem' | ||
}, | ||
{ | ||
id: '29570', | ||
product: { | ||
id: 1115, | ||
name: 'Juno Sweater', | ||
thumbnail: { | ||
url: | ||
'https://master-7rqtwti-c5v7sxvquxwl4.us-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg', | ||
__typename: 'ProductImage' | ||
}, | ||
__typename: 'ConfigurableProduct' | ||
}, | ||
quantity: 1, | ||
configurable_options: [ | ||
{ | ||
configurable_product_option_uid: 179, | ||
option_label: 'Fashion Color', | ||
configurable_product_option_value_uid: 21, | ||
value_label: 'Rain', | ||
__typename: 'SelectedConfigurableOption' | ||
}, | ||
{ | ||
id: '29568', | ||
product: { | ||
id: 1093, | ||
name: 'Jillian Top', | ||
thumbnail: { | ||
url: | ||
'https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/t/vt12-kh_main_2.jpg', | ||
__typename: 'ProductImage' | ||
}, | ||
__typename: 'ConfigurableProduct' | ||
}, | ||
quantity: 3, | ||
configurable_options: [ | ||
{ | ||
configurable_product_option_uid: 179, | ||
option_label: 'Fashion Color', | ||
configurable_product_option_value_uid: 18, | ||
value_label: 'Peach', | ||
__typename: 'SelectedConfigurableOption' | ||
}, | ||
{ | ||
configurable_product_option_uid: 182, | ||
option_label: 'Fashion Size', | ||
configurable_product_option_value_uid: 27, | ||
value_label: 'M', | ||
__typename: 'SelectedConfigurableOption' | ||
} | ||
], | ||
__typename: 'ConfigurableCartItem' | ||
configurable_product_option_uid: 182, | ||
option_label: 'Fashion Size', | ||
configurable_product_option_value_uid: 29, | ||
value_label: 'XS', | ||
__typename: 'SelectedConfigurableOption' | ||
} | ||
], | ||
__typename: 'ConfigurableCartItem' | ||
}, | ||
{ | ||
id: '29572', | ||
product: { | ||
id: 1152, | ||
name: 'Angelina Tank Dress', | ||
thumbnail: { | ||
url: | ||
'https://master-7rqtwti-c5v7sxvquxwl4.us-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/d/vd01-ll_main_2.jpg', | ||
__typename: 'ProductImage' | ||
}, | ||
__typename: 'ConfigurableProduct' | ||
}, | ||
quantity: 3, | ||
configurable_options: [ | ||
{ | ||
configurable_product_option_uid: 179, | ||
option_label: 'Fashion Color', | ||
configurable_product_option_value_uid: 20, | ||
value_label: 'Lilac', | ||
__typename: 'SelectedConfigurableOption' | ||
}, | ||
{ | ||
configurable_product_option_uid: 182, | ||
option_label: 'Fashion Size', | ||
configurable_product_option_value_uid: 26, | ||
value_label: 'L', | ||
__typename: 'SelectedConfigurableOption' | ||
} | ||
], | ||
__typename: 'ConfigurableCartItem' | ||
} | ||
]; | ||
|
||
export const singleItem = [ | ||
{ | ||
id: '29568', | ||
product: { | ||
id: 1093, | ||
name: 'Jillian Top', | ||
thumbnail: { | ||
url: | ||
'https://master-7rqtwti-c5v7sxvquxwl4.us-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/t/vt12-kh_main_2.jpg', | ||
__typename: 'ProductImage' | ||
}, | ||
__typename: 'ConfigurableProduct' | ||
}, | ||
quantity: 3, | ||
configurable_options: [ | ||
{ | ||
id: '29570', | ||
product: { | ||
id: 1115, | ||
name: 'Juno Sweater', | ||
thumbnail: { | ||
url: | ||
'https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/s/vsw02-pe_main_2.jpg', | ||
__typename: 'ProductImage' | ||
}, | ||
__typename: 'ConfigurableProduct' | ||
}, | ||
quantity: 1, | ||
configurable_options: [ | ||
{ | ||
configurable_product_option_uid: 179, | ||
option_label: 'Fashion Color', | ||
configurable_product_option_value_uid: 21, | ||
value_label: 'Rain', | ||
__typename: 'SelectedConfigurableOption' | ||
}, | ||
{ | ||
configurable_product_option_uid: 182, | ||
option_label: 'Fashion Size', | ||
configurable_product_option_value_uid: 29, | ||
value_label: 'XS', | ||
__typename: 'SelectedConfigurableOption' | ||
} | ||
], | ||
__typename: 'ConfigurableCartItem' | ||
configurable_product_option_uid: 179, | ||
option_label: 'Fashion Color', | ||
configurable_product_option_value_uid: 18, | ||
value_label: 'Peach', | ||
__typename: 'SelectedConfigurableOption' | ||
}, | ||
{ | ||
id: '29572', | ||
product: { | ||
id: 1152, | ||
name: 'Angelina Tank Dress', | ||
thumbnail: { | ||
url: | ||
'https://master-7rqtwti-c5v7sxvquxwl4.eu-4.magentosite.cloud/media/catalog/product/cache/d3ba9f7bcd3b0724e976dc5144b29c7d/v/d/vd01-ll_main_2.jpg', | ||
__typename: 'ProductImage' | ||
}, | ||
__typename: 'ConfigurableProduct' | ||
}, | ||
quantity: 3, | ||
configurable_options: [ | ||
{ | ||
configurable_product_option_uid: 179, | ||
option_label: 'Fashion Color', | ||
configurable_product_option_value_uid: 20, | ||
value_label: 'Lilac', | ||
__typename: 'SelectedConfigurableOption' | ||
}, | ||
{ | ||
configurable_product_option_uid: 182, | ||
option_label: 'Fashion Size', | ||
configurable_product_option_value_uid: 26, | ||
value_label: 'L', | ||
__typename: 'SelectedConfigurableOption' | ||
} | ||
], | ||
__typename: 'ConfigurableCartItem' | ||
configurable_product_option_uid: 182, | ||
option_label: 'Fashion Size', | ||
configurable_product_option_value_uid: 27, | ||
value_label: 'M', | ||
__typename: 'SelectedConfigurableOption' | ||
} | ||
], | ||
__typename: 'Cart' | ||
__typename: 'ConfigurableCartItem' | ||
} | ||
}; | ||
]; |
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
Oops, something went wrong.