@lookiero/checkout 8.14.0-beta.102 → 8.14.0-beta.2
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.
- package/dist/pact.config.d.ts +4 -12
- package/dist/pact.config.js +4 -11
- package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +0 -1
- package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +24 -24
- package/dist/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.js +33 -40
- package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +6 -6
- package/dist/src/infrastructure/projection/checkout/checkout.mock.js +12 -15
- package/dist/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.js +82 -89
- package/dist/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.js +33 -40
- package/dist/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.js +31 -38
- package/dist/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.js +31 -38
- package/dist/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.js +31 -38
- package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +3 -3
- package/dist/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.js +33 -40
- package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +6 -10
- package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +38 -39
- package/dist/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.js +33 -40
- package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +0 -1
- package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +96 -97
- package/dist/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.js +33 -40
- package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js +83 -94
- package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +1 -7
- package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +173 -178
- package/dist/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.js +1 -1
- package/dist/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.js +33 -40
- package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +2 -3
- package/dist/src/infrastructure/projection/pricing/pricing.mock.js +34 -35
- package/dist/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.js +33 -40
- package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +0 -1
- package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +377 -378
- package/dist/src/infrastructure/ui/Root.d.ts +2 -0
- package/dist/src/infrastructure/ui/Root.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.d.ts +5 -0
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.js +3 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.d.ts +5 -0
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.d.ts +5 -0
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.js +1 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.js +2 -2
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.d.ts +3 -1
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.js +3 -3
- package/dist/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.js +4 -4
- package/dist/src/infrastructure/ui/routing/Routing.d.ts +7 -0
- package/dist/src/infrastructure/ui/routing/Routing.js +5 -5
- package/dist/src/infrastructure/ui/views/App.d.ts +8 -0
- package/dist/src/infrastructure/ui/views/App.js +4 -4
- package/dist/src/infrastructure/ui/views/App.style.d.ts +3 -3
- package/dist/src/infrastructure/ui/views/App.style.js +3 -4
- package/dist/src/infrastructure/ui/views/item/Item.d.ts +5 -0
- package/dist/src/infrastructure/ui/views/item/Item.js +3 -3
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.d.ts +2 -0
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.d.ts +5 -1
- package/dist/src/infrastructure/ui/views/item/components/itemActions/ItemActions.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.d.ts +5 -0
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.d.ts +3 -3
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.js +2 -2
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.js +1 -1
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.d.ts +2 -0
- package/dist/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.js +2 -2
- package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.d.ts +5 -0
- package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.js +2 -2
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.d.ts +5 -0
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +2 -2
- package/dist/src/infrastructure/ui/views/return/Return.d.ts +5 -0
- package/dist/src/infrastructure/ui/views/return/Return.js +2 -2
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +5 -0
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +12 -14
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +2 -6
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.js +2 -6
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/jest.setup.js +20 -0
- package/package.json +5 -4
- package/pact.config.ts +31 -0
- package/pact.publish.js +32 -0
- package/src/infrastructure/projection/bookedProductsVariants/httpBookedProductsVariantsForCheckoutItemView.pact.ts +62 -0
- package/src/infrastructure/projection/checkout/httpCheckoutByIdView.pact.ts +128 -0
- package/src/infrastructure/projection/checkout/httpFirstAvailableCheckoutByCustomerIdView.pact.ts +63 -0
- package/src/infrastructure/projection/checkout/httpFiveItemsDiscountByCustomerIdView.pact.ts +57 -0
- package/src/infrastructure/projection/checkout/httpIsCheckoutEnabledByCustomerIdView.pact.ts +57 -0
- package/src/infrastructure/projection/checkout/httpIsSizeChangeEnabledByCheckoutIdView.pact.ts +57 -0
- package/src/infrastructure/projection/checkoutBooking/httpCheckoutBookingByIdView.pact.ts +63 -0
- package/src/infrastructure/projection/checkoutItem/httpCheckoutItemByIdView.pact.ts +64 -0
- package/src/infrastructure/projection/checkoutQuestion/httpCheckoutQuestionsByCheckoutIdView.pact.ts +62 -0
- package/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.ts +136 -0
- package/src/infrastructure/projection/payment/react/useViewPaymentFlowPayloadByCheckoutId.ts +1 -1
- package/src/infrastructure/projection/pricing/httpPricingByCheckoutIdView.pact.ts +62 -0
- package/src/infrastructure/projection/returnQuestion/httpReturnQuestionsByCheckoutItemIdView.pact.ts +62 -0
- package/src/infrastructure/ui/Root.tsx +4 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.tsx +14 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.tsx +8 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/ReturnQuestionItem.ts +6 -0
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.style.ts +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.tsx +2 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/form/HostStackReturnQuestionItem.tsx +2 -0
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostStackReturnQuestionItem/modal/HostStackReturnQuestionItem.tsx +2 -0
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/modalOptionReturnQuestionItems/ModalOptionReturnQuestionItems.tsx +5 -2
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/radioReturnQuestionItem/RadioReturnQuestionItem.tsx +3 -2
- package/src/infrastructure/ui/routing/Routing.tsx +13 -5
- package/{dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.js → src/infrastructure/ui/views/App.style.ts} +2 -7
- package/src/infrastructure/ui/views/App.tsx +14 -7
- package/src/infrastructure/ui/views/item/Item.tsx +8 -2
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.style.ts +1 -1
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/GetOutOfCheckoutModal.tsx +9 -3
- package/src/infrastructure/ui/views/item/components/itemActions/ItemActions.tsx +8 -1
- package/src/infrastructure/ui/views/item/components/returnQuestionsFeedback/ReturnQuestionsFeedback.tsx +12 -3
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.style.ts +1 -1
- package/src/infrastructure/ui/views/item/components/selectModal/SelectModal.tsx +6 -6
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/SizeWithoutStockModal.tsx +4 -3
- package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.tsx +12 -2
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +14 -4
- package/src/infrastructure/ui/views/return/Return.tsx +8 -1
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.style.ts +2 -6
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +33 -38
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.d.ts +0 -13
- package/dist/src/infrastructure/projection/checkout/react/useViewIsCheckoutAccessibleByCustomerId.js +0 -19
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.d.ts +0 -22
- package/dist/src/infrastructure/ui/components/layouts/layout/Layout.js +0 -1
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.d.ts +0 -7
- package/dist/src/infrastructure/ui/components/layouts/layout/components/footer/Footer.js +0 -5
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.d.ts +0 -7
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.js +0 -6
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.d.ts +0 -4
- package/dist/src/infrastructure/ui/components/layouts/layout/components/header/Header.style.js +0 -20
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.d.ts +0 -4
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.js +0 -43
- package/dist/src/infrastructure/ui/components/layouts/layout/dummyLayout/DummyLayout.style.d.ts +0 -12
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.d.ts +0 -7
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.js +0 -21
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.d.ts +0 -8
- package/dist/src/infrastructure/ui/components/templates/header/defaultHeader/DefaultHeader.style.js +0 -12
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.d.ts +0 -12
- package/dist/src/infrastructure/ui/hooks/useNewFeedbackExperiment.js +0 -64
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.d.ts +0 -10
- package/dist/src/infrastructure/ui/i18n/fetchTranslations.js +0 -17
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.d.ts +0 -20
- package/dist/src/infrastructure/ui/i18n/translationEndpoint.js +0 -27
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.d.ts +0 -10
- package/dist/src/infrastructure/ui/routing/CheckoutAccessibilityMiddleware.js +0 -27
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.d.ts +0 -7
- package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.style.js +0 -11
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.d.ts +0 -12
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +0 -64
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.d.ts +0 -12
- package/dist/src/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.style.js +0 -16
- package/dist/src/infrastructure/ui/views/return/Return.style.d.ts +0 -40
- package/dist/src/infrastructure/ui/views/return/Return.style.js +0 -44
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.d.ts +0 -14
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.js +0 -28
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.d.ts +0 -7
- package/dist/src/infrastructure/ui/views/summary/components/stickyPricing/StickyPricing.style.js +0 -11
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.d.ts +0 -26
- package/dist/src/projection/checkout/viewIsCheckoutAccessibleByCustomerId.js +0 -21
- package/dist/src/projection/shared/country.d.ts +0 -14
- package/dist/src/projection/shared/country.js +0 -15
- package/dist/src/projection/shared/customer.d.ts +0 -9
- package/dist/src/projection/shared/customer.js +0 -1
- package/dist/src/projection/shared/locale.d.ts +0 -12
- package/dist/src/projection/shared/locale.js +0 -13
- package/dist/src/projection/shared/order.d.ts +0 -6
- package/dist/src/projection/shared/order.js +0 -1
- package/dist/src/projection/shared/price.d.ts +0 -11
- package/dist/src/projection/shared/price.js +0 -1
- package/dist/src/projection/shared/size.d.ts +0 -21
- package/dist/src/projection/shared/size.js +0 -4
- package/dist/src/projection/shared/subscription.d.ts +0 -2
- package/dist/src/projection/shared/subscription.js +0 -1
- package/dist/src/shared/ui/components/atoms/error/Error.d.ts +0 -11
- package/dist/src/shared/ui/components/atoms/error/Error.js +0 -6
|
@@ -1,104 +1,103 @@
|
|
|
1
|
-
import { CheckoutQuestionType } from "../../../projection/checkoutQuestion/checkoutQuestion";
|
|
2
|
-
|
|
1
|
+
import { CheckoutQuestionType, } from "../../../projection/checkoutQuestion/checkoutQuestion";
|
|
3
2
|
const checkoutQuestions = [
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
showCondition: [],
|
|
10
|
-
children: [
|
|
11
|
-
{
|
|
12
|
-
id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
|
|
13
|
-
name: "checkout_question.icon.bad",
|
|
14
|
-
placeholder: "",
|
|
15
|
-
type: CheckoutQuestionType.ICON,
|
|
16
|
-
showCondition: [],
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
id: "85e84a77-461c-41e6-8544-95b5294d0b80",
|
|
20
|
-
name: "checkout_question.icon.regular",
|
|
21
|
-
placeholder: "",
|
|
22
|
-
type: CheckoutQuestionType.ICON,
|
|
23
|
-
showCondition: [],
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
id: "29441d25-8d9f-471e-a13e-a03f61c88091",
|
|
27
|
-
name: "checkout_question.icon.good",
|
|
28
|
-
placeholder: "",
|
|
29
|
-
type: CheckoutQuestionType.ICON,
|
|
30
|
-
showCondition: [],
|
|
31
|
-
},
|
|
32
|
-
],
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
id: "6a6d3878-5561-412c-96f3-7ed79ee587bb",
|
|
36
|
-
name: "checkout_question.experience.question",
|
|
37
|
-
placeholder: "checkout_question.experience.placeholder",
|
|
38
|
-
type: CheckoutQuestionType.HOST_SELECT,
|
|
39
|
-
showCondition: [],
|
|
40
|
-
children: [
|
|
41
|
-
{
|
|
42
|
-
id: "a3d937b6-7499-4a3c-86bf-5c0af9ab2e23",
|
|
43
|
-
name: "checkout_question.icon.bad",
|
|
44
|
-
placeholder: "",
|
|
45
|
-
type: CheckoutQuestionType.ICON,
|
|
3
|
+
{
|
|
4
|
+
id: "efe07b97-f6fb-4b6a-ba92-b68519320b2c",
|
|
5
|
+
name: "checkout_question.selection.question",
|
|
6
|
+
placeholder: "checkout_question.selection.placeholder",
|
|
7
|
+
type: CheckoutQuestionType.HOST_SELECT,
|
|
46
8
|
showCondition: [],
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
9
|
+
children: [
|
|
10
|
+
{
|
|
11
|
+
id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
|
|
12
|
+
name: "checkout_question.icon.bad",
|
|
13
|
+
placeholder: "",
|
|
14
|
+
type: CheckoutQuestionType.ICON,
|
|
15
|
+
showCondition: [],
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
id: "85e84a77-461c-41e6-8544-95b5294d0b80",
|
|
19
|
+
name: "checkout_question.icon.regular",
|
|
20
|
+
placeholder: "",
|
|
21
|
+
type: CheckoutQuestionType.ICON,
|
|
22
|
+
showCondition: [],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "29441d25-8d9f-471e-a13e-a03f61c88091",
|
|
26
|
+
name: "checkout_question.icon.good",
|
|
27
|
+
placeholder: "",
|
|
28
|
+
type: CheckoutQuestionType.ICON,
|
|
29
|
+
showCondition: [],
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "6a6d3878-5561-412c-96f3-7ed79ee587bb",
|
|
35
|
+
name: "checkout_question.experience.question",
|
|
36
|
+
placeholder: "checkout_question.experience.placeholder",
|
|
37
|
+
type: CheckoutQuestionType.HOST_SELECT,
|
|
53
38
|
showCondition: [],
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
id: "
|
|
80
|
-
name: "checkout_question.personalshopper.
|
|
81
|
-
placeholder: "",
|
|
82
|
-
type: CheckoutQuestionType.
|
|
83
|
-
showCondition: [],
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
39
|
+
children: [
|
|
40
|
+
{
|
|
41
|
+
id: "a3d937b6-7499-4a3c-86bf-5c0af9ab2e23",
|
|
42
|
+
name: "checkout_question.icon.bad",
|
|
43
|
+
placeholder: "",
|
|
44
|
+
type: CheckoutQuestionType.ICON,
|
|
45
|
+
showCondition: [],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "7970edd3-fb5c-42d3-afe3-ce31bcbb856c",
|
|
49
|
+
name: "checkout_question.icon.regular",
|
|
50
|
+
placeholder: "",
|
|
51
|
+
type: CheckoutQuestionType.ICON,
|
|
52
|
+
showCondition: [],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "bab3d4f9-0227-4550-a53f-3c125d68429c",
|
|
56
|
+
name: "checkout_question.icon.good",
|
|
57
|
+
placeholder: "",
|
|
58
|
+
type: CheckoutQuestionType.ICON,
|
|
59
|
+
showCondition: [],
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: "a1acdb2d-62c8-467f-b7cc-dc24d967290c",
|
|
65
|
+
name: "checkout_question.personalshopper.question",
|
|
66
|
+
placeholder: "checkout_question.personalshopper.placeholder",
|
|
67
|
+
type: CheckoutQuestionType.HOST_SELECT,
|
|
68
|
+
showCondition: ["68c0bb98-b00a-4b86-af43-528fe903cb69"],
|
|
69
|
+
children: [
|
|
70
|
+
{
|
|
71
|
+
id: "cce7851c-92c7-461b-8dcb-903c5de59ed1",
|
|
72
|
+
name: "checkout_question.personalshopper.yes",
|
|
73
|
+
placeholder: "",
|
|
74
|
+
type: CheckoutQuestionType.BUTTON,
|
|
75
|
+
showCondition: [],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
id: "4bf8f27d-669b-4d36-8d39-b5599c671816",
|
|
79
|
+
name: "checkout_question.personalshopper.no",
|
|
80
|
+
placeholder: "",
|
|
81
|
+
type: CheckoutQuestionType.BUTTON,
|
|
82
|
+
showCondition: [],
|
|
83
|
+
},
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: "ce3e8d57-5eea-4dd3-bef4-2e811a143612",
|
|
96
88
|
name: "checkout_question.comment.question",
|
|
97
|
-
placeholder: "
|
|
98
|
-
type: CheckoutQuestionType.
|
|
89
|
+
placeholder: "",
|
|
90
|
+
type: CheckoutQuestionType.HOST_TEXTAREA,
|
|
99
91
|
showCondition: [],
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
92
|
+
children: [
|
|
93
|
+
{
|
|
94
|
+
id: "1123a37d-bc00-43a4-9d28-cee1dfaf356c",
|
|
95
|
+
name: "checkout_question.comment.question",
|
|
96
|
+
placeholder: "checkout_question.comment.placeholder",
|
|
97
|
+
type: CheckoutQuestionType.TEXTAREA,
|
|
98
|
+
showCondition: [],
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
},
|
|
103
102
|
];
|
|
104
103
|
export { checkoutQuestions };
|
|
@@ -1,55 +1,48 @@
|
|
|
1
1
|
import { MatchersV3, PactV3 } from "@pact-foundation/pact";
|
|
2
2
|
import { fetchHttpPost } from "@lookiero/sty-psp-http";
|
|
3
|
-
import {
|
|
4
|
-
AUTH_TOKEN,
|
|
5
|
-
DEFAULT_PACT_OPTIONS,
|
|
6
|
-
DEFAULT_REQUEST_HEADERS,
|
|
7
|
-
DEFAULT_RESPONSE_HEADERS,
|
|
8
|
-
fromMockServerUrlToApiUrl,
|
|
9
|
-
} from "../../../../pact.config";
|
|
3
|
+
import { AUTH_TOKEN, DEFAULT_PACT_OPTIONS, DEFAULT_REQUEST_HEADERS, DEFAULT_RESPONSE_HEADERS, fromMockServerUrlToApiUrl, } from "../../../../pact.config";
|
|
10
4
|
import { checkoutQuestions } from "./checkoutQuestions.mock";
|
|
11
5
|
import { httpCheckoutQuestionsByCheckoutIdView } from "./httpCheckoutQuestionsByCheckoutIdView";
|
|
12
|
-
|
|
13
6
|
const provider = new PactV3({
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
...DEFAULT_PACT_OPTIONS,
|
|
8
|
+
consumer: "STY-BOX_CHECKOUT-FRONT",
|
|
9
|
+
provider: "STY-BOX_CHECKOUT-BACK_ListCheckoutQuestionsByCheckoutId",
|
|
17
10
|
});
|
|
18
11
|
const checkoutId = "52440ae5-7a4c-498b-8b35-08ecfde15776";
|
|
19
12
|
const checkoutQuestionsResponse = {
|
|
20
|
-
|
|
13
|
+
result: checkoutQuestions,
|
|
21
14
|
};
|
|
22
15
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
23
16
|
// @ts-ignore
|
|
24
17
|
const EXPECTED_BODY = MatchersV3.like(checkoutQuestionsResponse);
|
|
25
18
|
describe("STY-BOX_CHECKOUT-BACK_ListCheckoutQuestionsByCheckoutId API", () => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
19
|
+
it("returns a valid checkout questions for the given checkout id", () => {
|
|
20
|
+
provider
|
|
21
|
+
.given("a valid checkout questions for the given checkout id")
|
|
22
|
+
.uponReceiving("checkout questions projection")
|
|
23
|
+
.withRequest({
|
|
24
|
+
method: "POST",
|
|
25
|
+
path: "/api/list-checkout-questions-by-checkout-id",
|
|
26
|
+
headers: DEFAULT_REQUEST_HEADERS,
|
|
27
|
+
body: { checkoutId },
|
|
28
|
+
})
|
|
29
|
+
.willRespondWith({
|
|
30
|
+
status: 200,
|
|
31
|
+
headers: DEFAULT_RESPONSE_HEADERS,
|
|
32
|
+
body: EXPECTED_BODY,
|
|
33
|
+
});
|
|
34
|
+
return provider.executeTest(async (mockserver) => {
|
|
35
|
+
const httpPost = fetchHttpPost({
|
|
36
|
+
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
37
|
+
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
38
|
+
device: "web",
|
|
39
|
+
version: "1.0.0",
|
|
40
|
+
});
|
|
41
|
+
const response = await httpCheckoutQuestionsByCheckoutIdView({ httpPost })({
|
|
42
|
+
checkoutId,
|
|
43
|
+
signal: undefined,
|
|
44
|
+
});
|
|
45
|
+
expect(response).toStrictEqual(checkoutQuestionsResponse.result);
|
|
46
|
+
});
|
|
53
47
|
});
|
|
54
|
-
});
|
|
55
48
|
});
|
package/dist/src/infrastructure/projection/payment/httpPaymentFlowPayloadByCheckoutIdView.pact.js
CHANGED
|
@@ -1,33 +1,22 @@
|
|
|
1
1
|
import { MatchersV3, PactV3 } from "@pact-foundation/pact";
|
|
2
2
|
import { fetchHttpPost } from "@lookiero/sty-psp-http";
|
|
3
|
-
import {
|
|
4
|
-
AUTH_TOKEN,
|
|
5
|
-
DEFAULT_PACT_OPTIONS,
|
|
6
|
-
DEFAULT_REQUEST_HEADERS,
|
|
7
|
-
DEFAULT_RESPONSE_HEADERS,
|
|
8
|
-
fromMockServerUrlToApiUrl,
|
|
9
|
-
} from "../../../../pact.config";
|
|
3
|
+
import { AUTH_TOKEN, DEFAULT_PACT_OPTIONS, DEFAULT_REQUEST_HEADERS, DEFAULT_RESPONSE_HEADERS, fromMockServerUrlToApiUrl, } from "../../../../pact.config";
|
|
10
4
|
import { httpPaymentFlowPayloadByCheckoutIdView } from "./httpPaymentFlowPayloadByCheckoutIdView";
|
|
11
|
-
import {
|
|
12
|
-
paymentFlowPayloadForKeptItems,
|
|
13
|
-
paymentFlowPayloadForReturnedItems,
|
|
14
|
-
paymentFlowPayloadForReplacedItems,
|
|
15
|
-
} from "./paymentFlowPayload.mock";
|
|
16
|
-
|
|
5
|
+
import { paymentFlowPayloadForKeptItems, paymentFlowPayloadForReturnedItems, paymentFlowPayloadForReplacedItems, } from "./paymentFlowPayload.mock";
|
|
17
6
|
const provider = new PactV3({
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
...DEFAULT_PACT_OPTIONS,
|
|
8
|
+
consumer: "STY-BOX_CHECKOUT-FRONT",
|
|
9
|
+
provider: "STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId",
|
|
21
10
|
});
|
|
22
11
|
const checkoutId = "e2490de5-5bd3-43d5-b7c4-526e33f71304";
|
|
23
12
|
const paymentFlowPayloadForKeptItemsResponse = {
|
|
24
|
-
|
|
13
|
+
result: paymentFlowPayloadForKeptItems,
|
|
25
14
|
};
|
|
26
15
|
const paymentFlowPayloadForReturnedItemsResponse = {
|
|
27
|
-
|
|
16
|
+
result: paymentFlowPayloadForReturnedItems,
|
|
28
17
|
};
|
|
29
18
|
const paymentFlowPayloadForReplacedItemsResponse = {
|
|
30
|
-
|
|
19
|
+
result: paymentFlowPayloadForReplacedItems,
|
|
31
20
|
};
|
|
32
21
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
33
22
|
// @ts-ignore
|
|
@@ -39,82 +28,82 @@ const EXPECTED_BODY_FOR_RETURNED_ITEMS = MatchersV3.like(paymentFlowPayloadForRe
|
|
|
39
28
|
// @ts-ignore
|
|
40
29
|
const EXPECTED_BODY_FOR_REPLACED_ITEMS = MatchersV3.like(paymentFlowPayloadForReplacedItemsResponse);
|
|
41
30
|
describe("STY-BOX_CHECKOUT-BACK_ViewPaymentFlowPayloadByCheckoutId API", () => {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
31
|
+
it("returns a valid payment-flow payload for the given checkout id [KEPT items] ", () => {
|
|
32
|
+
provider
|
|
33
|
+
.given("a valid payment-flow payload for the given checkout id [KEPT items] ")
|
|
34
|
+
.uponReceiving("payment-flow payload projection")
|
|
35
|
+
.withRequest({
|
|
36
|
+
method: "POST",
|
|
37
|
+
path: "/api/view-payment-flow-payload-by-checkout-id",
|
|
38
|
+
headers: DEFAULT_REQUEST_HEADERS,
|
|
39
|
+
body: { checkoutId },
|
|
40
|
+
})
|
|
41
|
+
.willRespondWith({
|
|
42
|
+
status: 200,
|
|
43
|
+
headers: DEFAULT_RESPONSE_HEADERS,
|
|
44
|
+
body: EXPECTED_BODY_FOR_KEPT_ITEMS,
|
|
45
|
+
});
|
|
46
|
+
return provider.executeTest(async (mockserver) => {
|
|
47
|
+
const httpPost = fetchHttpPost({
|
|
48
|
+
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
49
|
+
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
50
|
+
device: "web",
|
|
51
|
+
version: "1.0.0",
|
|
52
|
+
});
|
|
53
|
+
const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
|
|
54
|
+
expect(response).toStrictEqual(paymentFlowPayloadForKeptItemsResponse.result);
|
|
55
|
+
});
|
|
66
56
|
});
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
57
|
+
it("returns a valid payment-flow payload for the given checkout id [RETURNED items] ", () => {
|
|
58
|
+
provider
|
|
59
|
+
.given("a valid payment-flow payload for the given checkout id [RETURNED items] ")
|
|
60
|
+
.uponReceiving("payment-flow payload projection")
|
|
61
|
+
.withRequest({
|
|
62
|
+
method: "POST",
|
|
63
|
+
path: "/api/view-payment-flow-payload-by-checkout-id",
|
|
64
|
+
headers: DEFAULT_REQUEST_HEADERS,
|
|
65
|
+
body: { checkoutId },
|
|
66
|
+
})
|
|
67
|
+
.willRespondWith({
|
|
68
|
+
status: 200,
|
|
69
|
+
headers: DEFAULT_RESPONSE_HEADERS,
|
|
70
|
+
body: EXPECTED_BODY_FOR_RETURNED_ITEMS,
|
|
71
|
+
});
|
|
72
|
+
return provider.executeTest(async (mockserver) => {
|
|
73
|
+
const httpPost = fetchHttpPost({
|
|
74
|
+
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
75
|
+
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
76
|
+
device: "web",
|
|
77
|
+
version: "1.0.0",
|
|
78
|
+
});
|
|
79
|
+
const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
|
|
80
|
+
expect(response).toStrictEqual(paymentFlowPayloadForReturnedItemsResponse.result);
|
|
81
|
+
});
|
|
92
82
|
});
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
83
|
+
it("returns a valid payment-flow payload for the given checkout id [REPLACED items] ", () => {
|
|
84
|
+
provider
|
|
85
|
+
.given("a valid payment-flow payload for the given checkout id [REPLACED items] ")
|
|
86
|
+
.uponReceiving("payment-flow payload projection")
|
|
87
|
+
.withRequest({
|
|
88
|
+
method: "POST",
|
|
89
|
+
path: "/api/view-payment-flow-payload-by-checkout-id",
|
|
90
|
+
headers: DEFAULT_REQUEST_HEADERS,
|
|
91
|
+
body: { checkoutId },
|
|
92
|
+
})
|
|
93
|
+
.willRespondWith({
|
|
94
|
+
status: 200,
|
|
95
|
+
headers: DEFAULT_RESPONSE_HEADERS,
|
|
96
|
+
body: EXPECTED_BODY_FOR_REPLACED_ITEMS,
|
|
97
|
+
});
|
|
98
|
+
return provider.executeTest(async (mockserver) => {
|
|
99
|
+
const httpPost = fetchHttpPost({
|
|
100
|
+
apiUrl: () => fromMockServerUrlToApiUrl(mockserver),
|
|
101
|
+
getAuthToken: () => Promise.resolve(AUTH_TOKEN),
|
|
102
|
+
device: "web",
|
|
103
|
+
version: "1.0.0",
|
|
104
|
+
});
|
|
105
|
+
const response = await httpPaymentFlowPayloadByCheckoutIdView({ httpPost })({ checkoutId, signal: undefined });
|
|
106
|
+
expect(response).toStrictEqual(paymentFlowPayloadForReplacedItemsResponse.result);
|
|
107
|
+
});
|
|
118
108
|
});
|
|
119
|
-
});
|
|
120
109
|
});
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { PaymentFlowPayloadProjection } from "../../../projection/payment/paymentFlowPayload";
|
|
2
|
-
|
|
3
2
|
declare const paymentFlowPayloadForKeptItems: PaymentFlowPayloadProjection;
|
|
4
3
|
declare const paymentFlowPayloadForReturnedItems: PaymentFlowPayloadProjection;
|
|
5
4
|
declare const paymentFlowPayloadForReplacedItems: PaymentFlowPayloadProjection;
|
|
6
5
|
declare const paymentFlowPayload: PaymentFlowPayloadProjection;
|
|
7
|
-
export {
|
|
8
|
-
paymentFlowPayload,
|
|
9
|
-
paymentFlowPayloadForKeptItems,
|
|
10
|
-
paymentFlowPayloadForReturnedItems,
|
|
11
|
-
paymentFlowPayloadForReplacedItems,
|
|
12
|
-
};
|
|
6
|
+
export { paymentFlowPayload, paymentFlowPayloadForKeptItems, paymentFlowPayloadForReturnedItems, paymentFlowPayloadForReplacedItems, };
|