@lookiero/checkout 10.0.0-beta.2 → 10.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/dist/index.js +2 -1
  2. package/dist/src/Expo.js +2 -0
  3. package/dist/src/ExpoRoot.js +3 -2
  4. package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.js +2 -1
  5. package/dist/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.js +3 -2
  6. package/dist/src/infrastructure/ui/components/atoms/price/Price.js +3 -0
  7. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.js +7 -3
  8. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.d.ts +18 -2
  9. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.js +14 -2
  10. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.js +2 -1
  11. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.js +2 -1
  12. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.js +4 -3
  13. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.d.ts +0 -1
  14. package/dist/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.js +0 -1
  15. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.js +3 -3
  16. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.js +3 -2
  17. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +4 -4
  18. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +3 -2
  19. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +3 -2
  20. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +2 -1
  21. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +5 -4
  22. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.js +6 -6
  23. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +4 -3
  24. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.d.ts +0 -1
  25. package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.js +0 -1
  26. package/dist/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.js +2 -2
  27. package/dist/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.js +2 -2
  28. package/dist/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.js +2 -2
  29. package/dist/src/infrastructure/ui/hooks/useCheckoutFlow.js +9 -9
  30. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.d.ts +1 -1
  31. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +55 -22
  32. package/dist/src/infrastructure/ui/i18n/i18n.d.ts +2 -1
  33. package/dist/src/infrastructure/ui/i18n/i18n.js +2 -1
  34. package/dist/src/infrastructure/ui/test/render.js +4 -2
  35. package/dist/src/infrastructure/ui/views/App.js +2 -1
  36. package/dist/src/infrastructure/ui/views/checkout/Checkout.js +3 -3
  37. package/dist/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.js +16 -16
  38. package/dist/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.js +2 -2
  39. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +2 -2
  40. package/dist/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.js +3 -3
  41. package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +11 -5
  42. package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +4 -4
  43. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.js +3 -3
  44. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.d.ts +1 -0
  45. package/dist/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.js +2 -1
  46. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -2
  47. package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +4 -4
  48. package/dist/src/infrastructure/ui/views/return/components/price/Price.js +3 -0
  49. package/dist/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.js +3 -3
  50. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +4 -4
  51. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +1 -0
  52. package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +2 -1
  53. package/dist/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.js +4 -4
  54. package/dist/src/infrastructure/ui/views/summary/Summary.js +4 -4
  55. package/dist/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.js +3 -2
  56. package/dist/src/infrastructure/ui/views/summary/components/pricing/Pricing.js +8 -6
  57. package/dist/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.js +5 -5
  58. package/dist/src/version.d.ts +1 -1
  59. package/dist/src/version.js +1 -1
  60. package/index.ts +2 -1
  61. package/jest.config.js +2 -2
  62. package/package.json +9 -9
  63. package/src/Expo.tsx +3 -0
  64. package/src/ExpoRoot.tsx +3 -2
  65. package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.style.ts +3 -2
  66. package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/FiveItemsDiscountBanner.tsx +3 -2
  67. package/src/infrastructure/ui/components/atoms/fiveItemsDiscountBanner/__snapshots__/FiveItemsDiscountBanner.test.tsx.snap +1 -1
  68. package/src/infrastructure/ui/components/atoms/price/Price.tsx +3 -0
  69. package/src/infrastructure/ui/components/atoms/price/__snapshots__/Price.test.tsx.snap +3 -3
  70. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.style.ts +25 -4
  71. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/buttonCheckoutQuestionItem/ButtonCheckoutQuestionItem.tsx +13 -7
  72. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostDefaultCheckoutQuestionItem/HostDefaultCheckoutQuestionItem.tsx +2 -1
  73. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.tsx +2 -1
  74. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.style.ts +0 -1
  75. package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/textareaCheckoutQuestionItem/TextareaCheckoutQuestionItem.tsx +4 -2
  76. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.tsx +3 -3
  77. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostRadioGroupReturnQuestionItem/HostRadioGroupReturnQuestionItem.tsx +3 -2
  78. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +5 -5
  79. package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +3 -2
  80. package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +3 -2
  81. package/src/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.tsx +2 -1
  82. package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +6 -5
  83. package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.tsx +7 -7
  84. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.style.ts +0 -1
  85. package/src/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.tsx +4 -2
  86. package/src/infrastructure/ui/components/templates/header/checkoutHeader/CheckoutHeader.tsx +2 -2
  87. package/src/infrastructure/ui/components/templates/header/checkoutHeader/__snapshots__/CheckoutHeader.test.tsx.snap +1 -1
  88. package/src/infrastructure/ui/components/templates/header/itemDetailHeader/ItemDetailHeader.tsx +2 -2
  89. package/src/infrastructure/ui/components/templates/header/itemDetailHeader/__snapshots__/ItemDetailHeader.test.tsx.snap +1 -1
  90. package/src/infrastructure/ui/components/templates/header/itemHeader/ItemHeader.tsx +2 -2
  91. package/src/infrastructure/ui/components/templates/header/itemHeader/__snapshots__/ItemHeader.test.tsx.snap +1 -1
  92. package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +302 -0
  93. package/src/infrastructure/ui/hooks/useCheckoutFlow.tsx +9 -9
  94. package/src/infrastructure/ui/i18n/i18n.ts +3 -1
  95. package/src/infrastructure/ui/test/render.tsx +6 -3
  96. package/src/infrastructure/ui/views/App.tsx +2 -1
  97. package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +51 -40
  98. package/src/infrastructure/ui/views/checkout/Checkout.tsx +3 -3
  99. package/src/infrastructure/ui/views/checkout/components/deliveryBanner/DeliveryBanner.tsx +2 -2
  100. package/src/infrastructure/ui/views/checkout/components/deliveryBanner/__snapshots__/DeliveryBanner.test.tsx.snap +1 -1
  101. package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.tsx +2 -2
  102. package/src/infrastructure/ui/views/item/components/banner/CustomerDecissionBanner.tsx +3 -3
  103. package/src/infrastructure/ui/views/item/components/banner/__snapshots__/CustomerDecissionBanner.test.tsx.snap +3 -3
  104. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +11 -5
  105. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +160 -88
  106. package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +4 -4
  107. package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +244 -128
  108. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.style.ts +2 -1
  109. package/src/infrastructure/ui/views/item/components/productVariantDescription/ProductVariantDescription.tsx +3 -3
  110. package/src/infrastructure/ui/views/item/components/productVariantDescription/__snapshots__/ProductVariantDescription.test.tsx.snap +10 -8
  111. package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +30 -30
  112. package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +2 -2
  113. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +1 -1
  114. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +4 -4
  115. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +75 -41
  116. package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +105 -102
  117. package/src/infrastructure/ui/views/return/components/price/Price.tsx +3 -0
  118. package/src/infrastructure/ui/views/return/components/price/__snapshots__/Price.test.tsx.snap +3 -3
  119. package/src/infrastructure/ui/views/return/components/productVariantPreview/ProductVariantPreview.tsx +3 -3
  120. package/src/infrastructure/ui/views/return/components/productVariantPreview/__snapshots__/ProductVariantPreview.test.tsx.snap +1 -1
  121. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +2 -1
  122. package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +4 -4
  123. package/src/infrastructure/ui/views/shared/components/productVariant/ProductVariant.tsx +4 -4
  124. package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +30 -30
  125. package/src/infrastructure/ui/views/summary/Summary.tsx +4 -4
  126. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/CollapsiblePricing.tsx +3 -2
  127. package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +154 -82
  128. package/src/infrastructure/ui/views/summary/components/pricing/Pricing.tsx +8 -6
  129. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.tsx +5 -5
  130. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +62 -62
  131. package/dist/pact.config.d.ts +0 -21
  132. package/dist/pact.config.js +0 -16
  133. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.d.ts +0 -1
  134. package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +0 -55
  135. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.d.ts +0 -1
  136. package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +0 -116
  137. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.d.ts +0 -1
  138. package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +0 -56
  139. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.d.ts +0 -1
  140. package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +0 -51
  141. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.d.ts +0 -1
  142. package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +0 -51
  143. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.d.ts +0 -1
  144. package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +0 -51
  145. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -13
  146. package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -19
  147. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.d.ts +0 -1
  148. package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +0 -56
  149. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.d.ts +0 -1
  150. package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +0 -57
  151. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.d.ts +0 -1
  152. package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +0 -55
  153. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.d.ts +0 -1
  154. package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +0 -120
  155. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.d.ts +0 -1
  156. package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +0 -55
  157. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.d.ts +0 -1
  158. package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +0 -55
  159. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -22
  160. package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
  161. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -7
  162. package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -5
  163. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -7
  164. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -6
  165. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
  166. package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -20
  167. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -4
  168. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -43
  169. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
  170. package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js +0 -14
  171. package/dist/src/infrastructure/ui/components/templates/footer/Footer.d.ts +0 -3
  172. package/dist/src/infrastructure/ui/components/templates/footer/Footer.js +0 -13
  173. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -7
  174. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -21
  175. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
  176. package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -12
  177. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -12
  178. package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -64
  179. package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -10
  180. package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -17
  181. package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -20
  182. package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -27
  183. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -10
  184. package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -27
  185. package/dist/src/infrastructure/ui/views/App.style.d.ts +0 -6
  186. package/dist/src/infrastructure/ui/views/App.style.js +0 -8
  187. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
  188. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -11
  189. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -12
  190. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -64
  191. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
  192. package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -16
  193. package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
  194. package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -44
  195. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -14
  196. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -28
  197. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
  198. package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -11
  199. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -26
  200. package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -21
  201. package/dist/src/projection/shared/country.d.ts +0 -14
  202. package/dist/src/projection/shared/country.js +0 -15
  203. package/dist/src/projection/shared/customer.d.ts +0 -9
  204. package/dist/src/projection/shared/customer.js +0 -1
  205. package/dist/src/projection/shared/locale.d.ts +0 -12
  206. package/dist/src/projection/shared/locale.js +0 -13
  207. package/dist/src/projection/shared/order.d.ts +0 -6
  208. package/dist/src/projection/shared/order.js +0 -1
  209. package/dist/src/projection/shared/price.d.ts +0 -11
  210. package/dist/src/projection/shared/price.js +0 -1
  211. package/dist/src/projection/shared/size.d.ts +0 -21
  212. package/dist/src/projection/shared/size.js +0 -4
  213. package/dist/src/projection/shared/subscription.d.ts +0 -2
  214. package/dist/src/projection/shared/subscription.js +0 -1
  215. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.d.ts +0 -15
  216. package/dist/src/shared/ui/components/atoms/aspectRatioView/AspectRatioView.js +0 -16
  217. package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -11
  218. package/dist/src/shared/ui/components/atoms/error/Error.js +0 -6
  219. package/dist/src/shared/ui/components/atoms/field/Field.d.ts +0 -14
  220. package/dist/src/shared/ui/components/atoms/field/Field.js +0 -29
  221. package/dist/src/shared/ui/components/atoms/field/Field.style.d.ts +0 -16
  222. package/dist/src/shared/ui/components/atoms/field/Field.style.js +0 -19
  223. package/dist/src/shared/ui/components/molecules/inputField/InputField.d.ts +0 -24
  224. package/dist/src/shared/ui/components/molecules/inputField/InputField.js +0 -28
  225. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.d.ts +0 -29
  226. package/dist/src/shared/ui/components/molecules/inputField/InputField.style.js +0 -37
  227. package/src/infrastructure/ui/components/templates/footer/Footer.test.tsx +0 -15
  228. package/src/infrastructure/ui/components/templates/footer/Footer.tsx +0 -19
  229. package/src/infrastructure/ui/components/templates/footer/__snapshots__/Footer.test.tsx.snap +0 -1127
  230. package/src/infrastructure/ui/hooks/useCheckoutFlow.test.ts +0 -297
  231. package/src/infrastructure/ui/views/checkout/components/checkoutPaymentModal/CheckoutPaymentModal.test.tsx +0 -126
@@ -1,297 +0,0 @@
1
- import { act, renderHook, waitFor } from "@testing-library/react-native";
2
- import { mock } from "jest-mock-extended";
3
- import { RefObject } from "react";
4
- import { CommandStatus } from "@lookiero/messaging-react";
5
- import { PaymentFlowRef } from "@lookiero/payments-front";
6
- import { ChargeStatus } from "@lookiero/payments-front/build/infrastructure/CheckoutAPI";
7
- import { Logger } from "@lookiero/sty-psp-logging";
8
- import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
9
- import { CheckoutBookingProjection } from "../../../projection/checkoutBooking/checkoutBooking";
10
- import { useSubmitCheckout } from "../../domain/checkout/react/useSubmitCheckout";
11
- import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
12
- import { paymentFlowPayload as mockPaymentFlowPayload } from "../../projection/payment/paymentFlowPayload.mock";
13
- import { useQueryBus } from "./useQueryBus";
14
- import { useSubmitCheckout as sut } from "./useCheckoutFlow";
15
-
16
- const checkoutId = "9c450400-0cd7-44a4-b0e3-e0002a9bf8df";
17
- const checkoutBookingId = "07c996bb-a0b4-45f9-ae21-6bb9c784d12b";
18
- const errorChargeStatuses = Object.values(ChargeStatus).filter((status) => status !== ChargeStatus.EXECUTED);
19
-
20
- const logger = mock<Logger>();
21
-
22
- jest.mock("@lookiero/sty-psp-notifications");
23
- jest.mock("./useQueryBus");
24
- jest.mock("../../domain/checkout/react/useSubmitCheckout");
25
- jest.mock("../../domain/checkoutBooking/react/useBlockCheckoutBooking");
26
-
27
- describe("useSubmitCheckout custom hook", () => {
28
- test("returns success as the status right after calling 'submitCheckout'", async () => {
29
- const mockBlockCheckoutBooking = jest.fn();
30
- const mockSubmitCheckout = jest.fn();
31
- const mockCreateToastNotification = jest.fn();
32
- const mockOnError = jest.fn();
33
- const mockOnSuccess = jest.fn();
34
- const mockPaymentFlowRef: RefObject<PaymentFlowRef> = {
35
- current: {
36
- // eslint-disable-next-line @typescript-eslint/naming-convention
37
- startLegacyBoxCheckout: jest.fn().mockImplementation((_payload, callback) => {
38
- callback({ status: ChargeStatus.EXECUTED, final: true });
39
- }),
40
- startCheckout: jest.fn(),
41
- },
42
- };
43
-
44
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
45
- (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
46
- (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
47
- (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.SUCCESS]);
48
-
49
- const { result } = renderHook(() =>
50
- sut({
51
- checkoutId,
52
- checkoutBookingId,
53
- paymentFlowRef: mockPaymentFlowRef,
54
- onError: mockOnError,
55
- onSuccess: mockOnSuccess,
56
- logger,
57
- }),
58
- );
59
-
60
- await act(async () => {
61
- const [submitCheckout] = result.current;
62
- await submitCheckout({ paymentFlowPayload: mockPaymentFlowPayload, sizeChangeEnabled: true });
63
- });
64
-
65
- await waitFor(() => {
66
- const [, status] = result.current;
67
-
68
- expect(mockBlockCheckoutBooking).toHaveBeenCalled();
69
- expect(mockCreateToastNotification).not.toHaveBeenCalled();
70
- expect(mockSubmitCheckout).toHaveBeenCalled();
71
-
72
- expect(status).toBe("success");
73
- expect(mockOnSuccess).toHaveBeenCalled();
74
- expect(mockOnError).not.toHaveBeenCalled();
75
- });
76
- });
77
-
78
- test("does not call blockCheckoutBooking if sizeChange is not enabled after calling 'submitCheckout'", async () => {
79
- const mockBlockCheckoutBooking = jest.fn();
80
- const mockSubmitCheckout = jest.fn();
81
- const mockCreateToastNotification = jest.fn();
82
- const mockOnError = jest.fn();
83
- const mockPaymentFlowRef: RefObject<PaymentFlowRef> = {
84
- current: {
85
- // eslint-disable-next-line @typescript-eslint/naming-convention
86
- startLegacyBoxCheckout: jest.fn().mockImplementation((_payload, callback) => {
87
- callback({ status: ChargeStatus.EXECUTED, final: true });
88
- }),
89
- startCheckout: jest.fn(),
90
- },
91
- };
92
-
93
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
94
- (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
95
- (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
96
- (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.SUCCESS]);
97
-
98
- const { result } = renderHook(() =>
99
- sut({ checkoutId, checkoutBookingId, paymentFlowRef: mockPaymentFlowRef, onError: mockOnError, logger }),
100
- );
101
-
102
- await act(async () => {
103
- const [submitCheckout] = result.current;
104
- await submitCheckout({ paymentFlowPayload: mockPaymentFlowPayload, sizeChangeEnabled: false });
105
- });
106
-
107
- await waitFor(() => {
108
- const [, status] = result.current;
109
-
110
- expect(mockBlockCheckoutBooking).not.toHaveBeenCalled();
111
- expect(mockCreateToastNotification).not.toHaveBeenCalled();
112
- expect(mockSubmitCheckout).toHaveBeenCalled();
113
-
114
- expect(status).toBe("success");
115
- expect(mockOnError).not.toHaveBeenCalled();
116
- });
117
- });
118
-
119
- test("returns blockCheckoutBooking error as the status right after calling 'submitCheckout'", async () => {
120
- const mockBlockCheckoutBooking = jest.fn();
121
- const mockSubmitCheckout = jest.fn();
122
- const mockCreateToastNotification = jest.fn();
123
- const mockOnError = jest.fn();
124
- const mockPaymentFlowRef: RefObject<PaymentFlowRef> = {
125
- current: {
126
- // eslint-disable-next-line @typescript-eslint/naming-convention
127
- startLegacyBoxCheckout: jest.fn().mockImplementation((_payload, callback) => {
128
- callback({ status: ChargeStatus.EXECUTED, final: true });
129
- }),
130
- startCheckout: jest.fn(),
131
- },
132
- };
133
-
134
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
135
- (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.ERROR]);
136
- (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.IDLE]);
137
- (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.IDLE]);
138
-
139
- const { result } = renderHook(() =>
140
- sut({ checkoutId, checkoutBookingId, paymentFlowRef: mockPaymentFlowRef, onError: mockOnError, logger }),
141
- );
142
-
143
- await act(async () => {
144
- const [submitCheckout] = result.current;
145
- await submitCheckout({ paymentFlowPayload: mockPaymentFlowPayload, sizeChangeEnabled: true });
146
- });
147
-
148
- await waitFor(() => {
149
- const [, status] = result.current;
150
-
151
- expect(mockBlockCheckoutBooking).toHaveBeenCalled();
152
- expect(mockCreateToastNotification).not.toHaveBeenCalled();
153
- expect(status).toBe("error");
154
- expect(mockOnError).toHaveBeenCalled();
155
- });
156
- });
157
-
158
- test.each(errorChargeStatuses)(
159
- "shows an 'error' notification when the checkout-flow fails (status %s)",
160
- async (chargeStatus) => {
161
- const mockBlockCheckoutBooking = jest.fn();
162
- const mockSubmitCheckout = jest.fn();
163
- const mockCreateToastNotification = jest.fn();
164
- const mockOnError = jest.fn();
165
- const mockPaymentFlowRef: RefObject<PaymentFlowRef> = {
166
- current: {
167
- // eslint-disable-next-line @typescript-eslint/naming-convention
168
- startLegacyBoxCheckout: jest.fn().mockImplementation((_payload, callback) => {
169
- callback({ status: chargeStatus, toaster: { id: `${chargeStatus}_toaster_id` }, final: true });
170
- }),
171
- startCheckout: jest.fn(),
172
- },
173
- };
174
-
175
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
176
- (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
177
- (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
178
- (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.IDLE]);
179
-
180
- const { result } = renderHook(() =>
181
- sut({ checkoutId, checkoutBookingId, paymentFlowRef: mockPaymentFlowRef, onError: mockOnError, logger }),
182
- );
183
-
184
- await act(async () => {
185
- const [submitCheckout] = result.current;
186
- await submitCheckout({ paymentFlowPayload: mockPaymentFlowPayload, sizeChangeEnabled: true });
187
- });
188
-
189
- await waitFor(() => {
190
- const [, status] = result.current;
191
-
192
- expect(mockBlockCheckoutBooking).toHaveBeenCalled();
193
- expect(mockCreateToastNotification).toHaveBeenCalledWith(
194
- expect.objectContaining({
195
- level: NotificationLevel.ERROR,
196
- bodyI18nKey: `${chargeStatus}_toaster_id`,
197
- }),
198
- );
199
- expect(mockSubmitCheckout).not.toHaveBeenCalled();
200
-
201
- expect(status).toBe("error");
202
- expect(mockOnError).toHaveBeenCalled();
203
- });
204
- },
205
- );
206
-
207
- test("returns submitCheckout error as the status right after calling 'submitCheckout'", async () => {
208
- const mockBlockCheckoutBooking = jest.fn();
209
- const mockSubmitCheckout = jest.fn();
210
- const mockCreateToastNotification = jest.fn();
211
- const mockOnError = jest.fn();
212
- const mockPaymentFlowRef: RefObject<PaymentFlowRef> = {
213
- current: {
214
- // eslint-disable-next-line @typescript-eslint/naming-convention
215
- startLegacyBoxCheckout: jest.fn().mockImplementation((_payload, callback) => {
216
- callback({ status: ChargeStatus.EXECUTED, final: true });
217
- }),
218
- startCheckout: jest.fn(),
219
- },
220
- };
221
-
222
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: false }) as CheckoutBookingProjection);
223
- (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
224
- (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.ERROR]);
225
- (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
226
-
227
- const { result } = renderHook(() =>
228
- sut({ checkoutId, checkoutBookingId, paymentFlowRef: mockPaymentFlowRef, onError: mockOnError, logger }),
229
- );
230
-
231
- await act(async () => {
232
- const [submitCheckout] = result.current;
233
- submitCheckout({ paymentFlowPayload: mockPaymentFlowPayload, sizeChangeEnabled: true });
234
- });
235
-
236
- await waitFor(() => {
237
- const [, status] = result.current;
238
-
239
- expect(mockBlockCheckoutBooking).toHaveBeenCalled();
240
- expect(mockCreateToastNotification).not.toHaveBeenCalled();
241
- expect(mockSubmitCheckout).toHaveBeenCalled();
242
-
243
- expect(status).toBe("error");
244
- expect(mockOnError).toHaveBeenCalled();
245
- });
246
- });
247
-
248
- test("returns submitCheckout error as the status right after calling 'submitCheckout' if CheckoutBooking isExpired", async () => {
249
- const mockBlockCheckoutBooking = jest.fn();
250
- const mockSubmitCheckout = jest.fn();
251
- const mockCreateToastNotification = jest.fn();
252
- const mockOnError = jest.fn();
253
- const mockOnSuccess = jest.fn();
254
- const mockPaymentFlowRef: RefObject<PaymentFlowRef> = {
255
- current: {
256
- // eslint-disable-next-line @typescript-eslint/naming-convention
257
- startLegacyBoxCheckout: jest.fn().mockImplementation((_payload, callback) => {
258
- callback({ status: ChargeStatus.EXECUTED, final: true });
259
- }),
260
- startCheckout: jest.fn(),
261
- },
262
- };
263
-
264
- (useQueryBus as jest.Mock).mockReturnValue(() => ({ isExpired: true }) as CheckoutBookingProjection);
265
- (useBlockCheckoutBooking as jest.Mock).mockReturnValue([mockBlockCheckoutBooking, CommandStatus.SUCCESS]);
266
- (useCreateToastNotification as jest.Mock).mockReturnValue([mockCreateToastNotification, CommandStatus.SUCCESS]);
267
- (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, CommandStatus.SUCCESS]);
268
-
269
- const { result } = renderHook(() =>
270
- sut({
271
- checkoutId,
272
- checkoutBookingId,
273
- paymentFlowRef: mockPaymentFlowRef,
274
- onError: mockOnError,
275
- onSuccess: mockOnSuccess,
276
- logger,
277
- }),
278
- );
279
-
280
- await act(async () => {
281
- const [submitCheckout] = result.current;
282
- await submitCheckout({ paymentFlowPayload: mockPaymentFlowPayload, sizeChangeEnabled: true });
283
- });
284
-
285
- await waitFor(() => {
286
- const [, status] = result.current;
287
-
288
- expect(mockBlockCheckoutBooking).toHaveBeenCalled();
289
- expect(mockCreateToastNotification).not.toHaveBeenCalled();
290
- expect(mockSubmitCheckout).not.toHaveBeenCalled();
291
-
292
- expect(status).toBe("error");
293
- expect(mockOnSuccess).not.toHaveBeenCalled();
294
- expect(mockOnError).toHaveBeenCalled();
295
- });
296
- });
297
- });
@@ -1,126 +0,0 @@
1
- // import { waitFor } from "@testing-library/react-native";
2
- // import React from "react";
3
- // import { QueryStatus } from "@lookiero/messaging-react";
4
- // import { Country } from "@lookiero/sty-psp-locale";
5
- // import { Segment } from "@lookiero/sty-psp-segment";
6
- // import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
7
- // import { checkout } from "../../../../../projection/checkout/checkout.mock";
8
- // import { useViewFirstAvailableCheckoutByCustomerId } from "../../../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
9
- // import { useViewIsSizeChangeEnabledByCheckoutId } from "../../../../../projection/checkout/react/useViewIsSizeChangeEnabledByCheckoutId";
10
- // import { paymentFlowPayload as mockPaymentFlowPayload } from "../../../../../projection/payment/paymentFlowPayload.mock";
11
- // import { useViewPaymentFlowPayloadByCheckoutId } from "../../../../../projection/payment/react/useViewPaymentFlowPayloadByCheckoutId";
12
- // import { pricing } from "../../../../../projection/pricing/pricing.mock";
13
- // import { useViewPricingByCheckoutId } from "../../../../../projection/pricing/react/useViewPricingByCheckoutId";
14
- // import { useCheckoutFlow } from "../../../../hooks/useCheckoutFlow";
15
- // import { Routes } from "../../../../routing/routes";
16
- // import { render } from "../../../../test/render";
17
-
18
- // const customerId = "a8fff6d7-708c-41a7-b42a-58c5706d33df";
19
- // const country = Country.ES;
20
- // const segment = Segment.WOMEN;
21
- // const orderNumber = 3691625;
22
- // const isFirstOrder = false;
23
- // const getAuthToken = () => Promise.resolve("token");
24
- // const mockCheckout = checkout({
25
- // items: [
26
- // { status: CheckoutItemStatus.RETURNED },
27
- // { status: CheckoutItemStatus.KEPT },
28
- // { status: CheckoutItemStatus.KEPT },
29
- // { status: CheckoutItemStatus.KEPT },
30
- // { status: CheckoutItemStatus.REPLACED },
31
- // ],
32
- // });
33
- // const mockPricing = pricing();
34
-
35
- // jest.mock("../../../../hooks/useStaticInfo", () => ({
36
- // useStaticInfo: () => ({ customer: { customerId, country, segment } }),
37
- // }));
38
-
39
- // jest.mock("../../../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId");
40
- // jest.mock("../../../../../projection/payment/react/useViewPaymentFlowPayloadByCheckoutId");
41
- // jest.mock("../../../../../projection/checkout/react/useViewIsSizeChangeEnabledByCheckoutId");
42
- // jest.mock("../../../../../projection/pricing/react/useViewPricingByCheckoutId");
43
- // jest.mock("../../../../hooks/useSubmitCheckout");
44
- // jest.mock("../../../../../tracking/useTrackCheckout");
45
-
46
- // const mockStartLegacyBoxCheckout = jest.fn();
47
- // jest.mock("@lookiero/payments-front", () => {
48
- // // eslint-disable-next-line @typescript-eslint/no-var-requires
49
- // const { useImperativeHandle, forwardRef } = require("react");
50
-
51
- // return {
52
- // CheckoutStatus: {
53
- // REJECTED: "REJECTED",
54
- // ERROR: "ERROR",
55
- // FULFILLED: "FULFILLED",
56
- // },
57
- // // eslint-disable-next-line @typescript-eslint/ban-ts-comment
58
- // // @ts-ignore
59
- // // eslint-disable-next-line @typescript-eslint/naming-convention, react/display-name
60
- // PaymentFlow: forwardRef((params, ref) => {
61
- // useImperativeHandle(ref, () => ({
62
- // startLegacyBoxCheckout: mockStartLegacyBoxCheckout,
63
- // }));
64
-
65
- // return null;
66
- // }),
67
- // PaymentMethod: {
68
- // ["GOOGLE_PAY"]: "google_pay",
69
- // },
70
- // Section: {
71
- // ["BOX_CHECKOUT"]: "box-checkout",
72
- // },
73
- // PaymentInstrumentSelect: jest.fn(() => <></>),
74
- // };
75
- // });
76
-
77
- // const mockUseNavigate = jest.fn();
78
- // jest.mock("react-router-native", () => ({
79
- // ...jest.requireActual("react-router-native"),
80
- // useNavigate: () => mockUseNavigate,
81
- // }));
82
-
83
- describe("CheckoutPaymentModal component", () => {
84
- // it("renders correctly", async () => {
85
- // const mockSubmitCheckout = jest.fn();
86
- // (useViewFirstAvailableCheckoutByCustomerId as jest.Mock).mockReturnValue([mockCheckout, QueryStatus.SUCCESS]);
87
- // (useViewPaymentFlowPayloadByCheckoutId as jest.Mock).mockReturnValue([mockPaymentFlowPayload, QueryStatus.SUCCESS]);
88
- // (useViewIsSizeChangeEnabledByCheckoutId as jest.Mock).mockReturnValue([true, QueryStatus.SUCCESS]);
89
- // (useViewPricingByCheckoutId as jest.Mock).mockReturnValue([mockPricing, QueryStatus.SUCCESS]);
90
- // (useSubmitCheckout as jest.Mock).mockReturnValue([mockSubmitCheckout, "success"]);
91
- // await waitFor(() => {
92
- // render(
93
- // <CheckoutPaymentModal
94
- // coupon={null}
95
- // getAuthToken={getAuthToken}
96
- // isFirstOrder={isFirstOrder}
97
- // orderNumber={orderNumber}
98
- // subscription="b"
99
- // />,
100
- // );
101
- // expect(mockSubmitCheckout).toHaveBeenCalled();
102
- // });
103
- // });
104
- // it("navigates back to /checkout when checkout-flow fails", async () => {
105
- // (useViewFirstAvailableCheckoutByCustomerId as jest.Mock).mockReturnValue([mockCheckout, QueryStatus.SUCCESS]);
106
- // (useViewPaymentFlowPayloadByCheckoutId as jest.Mock).mockReturnValue([mockPaymentFlowPayload, QueryStatus.SUCCESS]);
107
- // (useViewIsSizeChangeEnabledByCheckoutId as jest.Mock).mockReturnValue([true, QueryStatus.SUCCESS]);
108
- // (useViewPricingByCheckoutId as jest.Mock).mockReturnValue([mockPricing, QueryStatus.SUCCESS]);
109
- // (useSubmitCheckout as jest.Mock).mockImplementation(({ onError }) => {
110
- // const submitCheckout = () => onError();
111
- // return [submitCheckout, "error"];
112
- // });
113
- // await waitFor(() => {
114
- // render(
115
- // <CheckoutPaymentModal
116
- // coupon={null}
117
- // getAuthToken={getAuthToken}
118
- // isFirstOrder={isFirstOrder}
119
- // orderNumber={orderNumber}
120
- // subscription="b"
121
- // />,
122
- // );
123
- // expect(mockUseNavigate).toHaveBeenCalledWith(`/${Routes.CHECKOUT}`, { replace: true });
124
- // });
125
- // });
126
- });