@lookiero/checkout 8.20.0 → 8.22.0

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 (62) hide show
  1. package/.detoxrc.js +55 -0
  2. package/app.json +15 -3
  3. package/babel.config.js +20 -0
  4. package/dist/fake-dependencies/@lookiero/payments-front/index.d.ts +21 -0
  5. package/dist/fake-dependencies/@lookiero/payments-front/index.js +20 -0
  6. package/dist/src/Expo.d.ts +1 -1
  7. package/dist/src/Expo.js +1 -0
  8. package/dist/src/ExpoRoot.js +13 -31
  9. package/dist/src/infrastructure/delivery/bootstrap.mock.d.ts +3 -0
  10. package/dist/src/infrastructure/delivery/bootstrap.mock.js +91 -0
  11. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.d.ts +3 -0
  12. package/dist/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.js +27 -0
  13. package/dist/src/infrastructure/projection/checkout/checkout.mock.d.ts +19 -0
  14. package/dist/src/infrastructure/projection/checkout/checkout.mock.js +21 -0
  15. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.d.ts +3 -0
  16. package/dist/src/infrastructure/projection/checkoutBooking/checkoutBooking.mock.js +6 -0
  17. package/dist/src/infrastructure/projection/checkoutFeedback/checkoutFeedback.mock.d.ts +3 -0
  18. package/dist/src/infrastructure/projection/checkoutFeedback/checkoutFeedback.mock.js +5 -0
  19. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.d.ts +15 -0
  20. package/dist/src/infrastructure/projection/checkoutItem/checkoutItem.mock.js +43 -0
  21. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.d.ts +3 -0
  22. package/dist/src/infrastructure/projection/checkoutQuestion/checkoutQuestions.mock.js +103 -0
  23. package/dist/src/infrastructure/projection/feedback/feedback.mock.d.ts +3 -0
  24. package/dist/src/infrastructure/projection/feedback/feedback.mock.js +6 -0
  25. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.d.ts +6 -0
  26. package/dist/src/infrastructure/projection/payment/paymentFlowPayload.mock.js +183 -0
  27. package/dist/src/infrastructure/projection/pricing/pricing.mock.d.ts +9 -0
  28. package/dist/src/infrastructure/projection/pricing/pricing.mock.js +42 -0
  29. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.d.ts +3 -0
  30. package/dist/src/infrastructure/projection/returnQuestion/returnQuestions.mock.js +354 -0
  31. package/dist/src/infrastructure/ui/hooks/useSubmitCheckout.js +11 -1
  32. package/dist/src/infrastructure/ui/views/checkout/Checkout.js +1 -1
  33. package/dist/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.js +2 -2
  34. package/dist/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +2 -1
  35. package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +1 -1
  36. package/dist/src/infrastructure/ui/views/summary/Summary.js +1 -1
  37. package/dist/src/version.d.ts +1 -1
  38. package/dist/src/version.js +1 -1
  39. package/e2e/checkout.test.ts +160 -0
  40. package/e2e/jest.config.js +13 -0
  41. package/e2e/tsconfig.json +4 -0
  42. package/eas-hooks/eas-build-on-success.sh +45 -0
  43. package/eas-hooks/eas-build-pre-install.sh +39 -0
  44. package/eas.json +23 -0
  45. package/fake-dependencies/@lookiero/payments-front/index.tsx +40 -0
  46. package/fake-dependencies/@lookiero/user-tracking-front/index.js +3 -0
  47. package/metro.config.js +22 -0
  48. package/package.json +13 -2
  49. package/src/Expo.tsx +1 -0
  50. package/src/ExpoRoot.tsx +14 -31
  51. package/src/infrastructure/projection/bookedProductsVariants/bookedProductsVariants.mock.ts +2 -2
  52. package/src/infrastructure/ui/hooks/useSubmitCheckout.ts +20 -2
  53. package/src/infrastructure/ui/views/checkout/Checkout.tsx +1 -1
  54. package/src/infrastructure/ui/views/checkout/components/paymentInstrument/PaymentInstrument.tsx +1 -2
  55. package/src/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.tsx +3 -2
  56. package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +1 -1
  57. package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +1 -1
  58. package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +1 -1
  59. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +1 -1
  60. package/src/infrastructure/ui/views/summary/Summary.tsx +1 -1
  61. package/tsconfig.json +8 -1
  62. package/webpack.config.js +8 -1
@@ -0,0 +1,183 @@
1
+ const paymentFlowPayloadForKeptItems = {
2
+ bookingId: "",
3
+ orderId: "3062898",
4
+ comment: "",
5
+ items: [
6
+ { reference: "9P1435C9L" },
7
+ { reference: "9C2017C22M" },
8
+ { reference: "9J1800C22M" },
9
+ { reference: "9M608C15L" },
10
+ { reference: "10S769C48S" },
11
+ ],
12
+ };
13
+ const paymentFlowPayloadForReturnedItems = {
14
+ bookingId: "",
15
+ orderId: "3071170",
16
+ comment: "",
17
+ items: [
18
+ {
19
+ reference: "9J1800C22M",
20
+ feedback: {
21
+ size: { name: "La talla es...", value: "3" },
22
+ price: { name: "El precio es...", value: "8" },
23
+ quality: { name: "La calidad es...", value: "15" },
24
+ style: { name: "El estilo es...", value: "5" },
25
+ shape: { name: "La forma es...", value: "12" },
26
+ comment: { name: "¿Algo más sobre esta prenda?", value: "Me queda pequeño" },
27
+ },
28
+ },
29
+ {
30
+ reference: "10S769C48S",
31
+ feedback: {
32
+ size: { name: "La talla es...", value: "1" },
33
+ price: { name: "El precio es...", value: "10" },
34
+ quality: { name: "La calidad es...", value: "15" },
35
+ style: { name: "El estilo es...", value: "5" },
36
+ shape: { name: "La forma es...", value: "14" },
37
+ comment: { name: "¿Algo más sobre esta prenda?", value: "Me queda grande y no me gusta demasiado" },
38
+ },
39
+ },
40
+ {
41
+ reference: "9C2017C22M",
42
+ feedback: {
43
+ size: { name: "La talla es...", value: "2" },
44
+ price: { name: "El precio es...", value: "10" },
45
+ quality: { name: "La calidad es...", value: "15" },
46
+ style: { name: "El estilo es...", value: "5" },
47
+ shape: { name: "La forma es...", value: "12" },
48
+ comment: { name: "¿Algo más sobre esta prenda?", value: "Demasiado caro para mi presupuesto" },
49
+ },
50
+ },
51
+ {
52
+ reference: "9M608C15L",
53
+ feedback: {
54
+ style: { name: "El estilo es...", value: "7" },
55
+ shape: { name: "La forma es...", value: "14" },
56
+ quality: { name: "La calidad es...", value: "15" },
57
+ price: { name: "El precio es...", value: "9" },
58
+ size: { name: "La talla es...", value: "2" },
59
+ comment: { name: "¿Algo más sobre esta prenda?", value: "No me gusta nada" },
60
+ },
61
+ },
62
+ {
63
+ reference: "9P1435C9L",
64
+ feedback: {
65
+ quality: { name: "La calidad es...", value: "17" },
66
+ size: { name: "La talla es...", value: "2" },
67
+ price: { name: "El precio es...", value: "10" },
68
+ style: { name: "El estilo es...", value: "5" },
69
+ shape: { name: "La forma es...", value: "12" },
70
+ comment: { name: "¿Algo más sobre esta prenda?", value: "Demasiado caro para la calidad que ofrece" },
71
+ },
72
+ },
73
+ ],
74
+ };
75
+ const paymentFlowPayloadForReplacedItems = {
76
+ bookingId: "ca2e03e6-1644-4406-a379-0e5c3c321f32",
77
+ orderId: "3071171",
78
+ comment: "",
79
+ items: [
80
+ {
81
+ reference: "9J1800C22M",
82
+ sizeChange: {
83
+ brand: "ONLY",
84
+ color: "blue_dark",
85
+ description: "Onlglamour Sweater knit T. XS C. blue_dark",
86
+ id: "5a95dffc-5031-4c2a-b8bc-f100c4710336",
87
+ reference: "9J1800C22XS",
88
+ size: "XS",
89
+ title: "Onlglamour Sweater knit ",
90
+ },
91
+ },
92
+ {
93
+ reference: "10S769C48S",
94
+ sizeChange: {
95
+ brand: "FRANSA",
96
+ color: "brick",
97
+ description: "Zawov Shirt fransa T. XS C. brick",
98
+ id: "b74df550-a4ab-4fb0-9a34-5767c700dcd0",
99
+ reference: "10S769C48XS",
100
+ size: "XS",
101
+ title: "Zawov Shirt fransa ",
102
+ },
103
+ },
104
+ {
105
+ reference: "9C2017C22M",
106
+ sizeChange: {
107
+ brand: "VERO MODA",
108
+ color: "blue_dark",
109
+ description: "Vmlina Tshirt vback T. XS C. blue_dark",
110
+ id: "349a4aeb-d8ca-4f3d-9efb-5b333da22290",
111
+ reference: "9C2017C22XS",
112
+ size: "XS",
113
+ title: "Vmlina Tshirt vback ",
114
+ },
115
+ },
116
+ {
117
+ reference: "9M608C15L",
118
+ sizeChange: {
119
+ brand: "ESPRIT CASUAL",
120
+ color: "beige",
121
+ description: "Hope Jeans skinny T. S C. beige",
122
+ id: "86aed12f-81e1-4a09-9c68-15dce7a844b7",
123
+ reference: "9M608C15S",
124
+ size: "S",
125
+ title: "Hope Jeans skinny ",
126
+ },
127
+ },
128
+ {
129
+ reference: "9P1435C9L",
130
+ sizeChange: {
131
+ brand: "ICHI",
132
+ color: "orange",
133
+ description: "Kate Pant mazarine T. S C. orange",
134
+ id: "34f311e2-ba8e-4261-bf70-6f25fc0e9ed9",
135
+ reference: "9P1435C9S",
136
+ size: "S",
137
+ title: "Kate Pant mazarine ",
138
+ },
139
+ },
140
+ ],
141
+ };
142
+ const paymentFlowPayload = {
143
+ bookingId: "7a3c298a-a3ee-45ac-a452-e276c1c98069",
144
+ orderId: "3062898",
145
+ comment: "",
146
+ items: [
147
+ {
148
+ reference: "9P1435C9L",
149
+ feedback: {
150
+ size: {
151
+ name: "La talla es...",
152
+ value: "1",
153
+ },
154
+ price: {
155
+ name: "El precio es...",
156
+ value: "10",
157
+ },
158
+ },
159
+ },
160
+ {
161
+ reference: "9C2017C22M",
162
+ },
163
+ {
164
+ reference: "9J1800C22M",
165
+ },
166
+ {
167
+ reference: "9M608C15L",
168
+ },
169
+ {
170
+ reference: "10S769C48S",
171
+ sizeChange: {
172
+ brand: "FRANSA",
173
+ color: "brick",
174
+ description: "Zawov Shirt fransa T. M C. brick",
175
+ id: "dbabf321-2ca8-4ac0-a727-05e39779e3b3",
176
+ reference: "10S769C48M",
177
+ size: "M",
178
+ title: "Zawov Shirt fransa ",
179
+ },
180
+ },
181
+ ],
182
+ };
183
+ export { paymentFlowPayload, paymentFlowPayloadForKeptItems, paymentFlowPayloadForReturnedItems, paymentFlowPayloadForReplacedItems, };
@@ -0,0 +1,9 @@
1
+ import { PricingProjection } from "../../../projection/pricing/pricing";
2
+ interface PricingFunctionArgs {
3
+ readonly paidWithPromocode: boolean;
4
+ }
5
+ interface PricingFunction {
6
+ (args?: PricingFunctionArgs): PricingProjection;
7
+ }
8
+ declare const pricing: PricingFunction;
9
+ export { pricing };
@@ -0,0 +1,42 @@
1
+ import { Currency } from "../../../domain/checkoutItem/model/currency";
2
+ const pricing = ({ paidWithPromocode } = { paidWithPromocode: false }) => ({
3
+ orderTotal: {
4
+ amount: 18301,
5
+ currency: Currency.EUR,
6
+ },
7
+ pendingToPay: {
8
+ amount: 16301,
9
+ currency: Currency.EUR,
10
+ },
11
+ subtotal: {
12
+ amount: 21801,
13
+ currency: Currency.EUR,
14
+ },
15
+ discount: {
16
+ amount: -2500,
17
+ currency: Currency.EUR,
18
+ },
19
+ discountPercentage: 25,
20
+ balanceDiscount: {
21
+ amount: -2000,
22
+ currency: Currency.EUR,
23
+ },
24
+ service: {
25
+ reference: "LK-service",
26
+ originalPrice: {
27
+ amount: 10.0,
28
+ currency: Currency.EUR,
29
+ },
30
+ discount: {
31
+ amount: 0,
32
+ currency: Currency.EUR,
33
+ },
34
+ finalPrice: {
35
+ amount: -1000,
36
+ currency: Currency.EUR,
37
+ },
38
+ prepaid: true,
39
+ paidWithPromocode,
40
+ },
41
+ });
42
+ export { pricing };
@@ -0,0 +1,3 @@
1
+ import { ReturnQuestionProjection } from "../../../projection/returnQuestion/returnQuestion";
2
+ declare const returnQuestions: ReturnQuestionProjection[];
3
+ export { returnQuestions };
@@ -0,0 +1,354 @@
1
+ import { ReturnQuestionType } from "../../../projection/returnQuestion/returnQuestion.constants";
2
+ const returnQuestions = [
3
+ {
4
+ id: "efe07b97-f6fb-4b6a-ba92-b68519320b2c",
5
+ translationKey: "main_title",
6
+ type: ReturnQuestionType.HOST_DEFAULT,
7
+ children: [
8
+ {
9
+ id: "ed396b68-1436-48ab-842f-fbfea996fad4",
10
+ translationKey: "size",
11
+ type: ReturnQuestionType.HOST_SELECT,
12
+ metadata: {
13
+ placeholder: "size_placeholder",
14
+ },
15
+ children: [
16
+ {
17
+ id: "0ad1dba8-b02c-4121-a1e3-981f1c30800d",
18
+ translationKey: "size_title",
19
+ type: ReturnQuestionType.HOST_STACK,
20
+ children: [
21
+ {
22
+ id: "9251dc2c-d76a-484d-9299-346929af932f",
23
+ translationKey: "size_large",
24
+ type: ReturnQuestionType.OPTION,
25
+ children: [
26
+ {
27
+ id: "542c4d24-e1da-484f-8c3a-7d89ee135adc",
28
+ type: ReturnQuestionType.HOST_STACK,
29
+ children: [
30
+ {
31
+ id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
32
+ translationKey: "size_overall",
33
+ type: ReturnQuestionType.OPTION,
34
+ },
35
+ {
36
+ id: "85e84a77-461c-41e6-8544-95b5294d0b80",
37
+ translationKey: "size_trousers_too_long",
38
+ type: ReturnQuestionType.OPTION,
39
+ },
40
+ {
41
+ id: "29441d25-8d9f-471e-a13e-a03f61c88091",
42
+ translationKey: "size_fit_cut_does_not_fit",
43
+ type: ReturnQuestionType.OPTION,
44
+ },
45
+ ],
46
+ },
47
+ ],
48
+ },
49
+ {
50
+ id: "a081c3e9-1904-4a60-8899-b72c1a3a0291",
51
+ translationKey: "size_correct",
52
+ type: ReturnQuestionType.OPTION,
53
+ },
54
+ {
55
+ id: "624cce3d-bd86-463a-b16b-c862ad73d5f3",
56
+ translationKey: "size_small",
57
+ type: ReturnQuestionType.OPTION,
58
+ children: [
59
+ {
60
+ id: "58e5ae9a-bc0d-4d27-b267-854a51c2a79a",
61
+ type: ReturnQuestionType.HOST_STACK,
62
+ children: [
63
+ {
64
+ id: "6a3d11fc-570c-4085-a850-1967228cdd4c",
65
+ translationKey: "size_overall",
66
+ type: ReturnQuestionType.OPTION,
67
+ },
68
+ {
69
+ id: "c27e1936-deea-4dbe-a8f1-fe4fb8564deb",
70
+ translationKey: "size_trousers_too_short",
71
+ type: ReturnQuestionType.OPTION,
72
+ },
73
+ {
74
+ id: "e77232ae-eeec-4722-b2d3-f5c0d34fd0ca",
75
+ translationKey: "size_fit_cut_does_not_fit",
76
+ type: ReturnQuestionType.OPTION,
77
+ },
78
+ ],
79
+ },
80
+ ],
81
+ },
82
+ ],
83
+ },
84
+ ],
85
+ },
86
+ {
87
+ id: "6a6d3878-5561-412c-96f3-7ed79ee587bb",
88
+ translationKey: "style",
89
+ type: ReturnQuestionType.HOST_SELECT,
90
+ metadata: {
91
+ placeholder: "style_placeholder",
92
+ },
93
+ children: [
94
+ {
95
+ id: "fd7ff4a0-78ed-4c0d-aa4d-64962739c322",
96
+ translationKey: "style_title",
97
+ type: ReturnQuestionType.HOST_STACK,
98
+ children: [
99
+ {
100
+ id: "56631448-d33d-49fb-b3f8-4486b68b60c3",
101
+ translationKey: "style_i_love_it_but",
102
+ type: ReturnQuestionType.OPTION,
103
+ children: [
104
+ {
105
+ id: "90329d91-bd5d-4439-bb0a-b338caaeff2b",
106
+ type: ReturnQuestionType.HOST_STACK,
107
+ children: [
108
+ {
109
+ id: "a3d937b6-7499-4a3c-86bf-5c0af9ab2e23",
110
+ translationKey: "style_i_already_have_something_similar",
111
+ type: ReturnQuestionType.OPTION,
112
+ },
113
+ {
114
+ id: "7970edd3-fb5c-42d3-afe3-ce31bcbb856c",
115
+ translationKey: "style_very_basic_simple",
116
+ type: ReturnQuestionType.OPTION,
117
+ },
118
+ {
119
+ id: "bab3d4f9-0227-4550-a53f-3c125d68429c",
120
+ translationKey: "style_i_dont_need_it_at_the_moment",
121
+ type: ReturnQuestionType.OPTION,
122
+ },
123
+ ],
124
+ },
125
+ ],
126
+ },
127
+ {
128
+ id: "5287d1df-a28a-42cd-9138-01f82aeea4c2",
129
+ translationKey: "style_i_like_it_but",
130
+ type: ReturnQuestionType.OPTION,
131
+ children: [
132
+ {
133
+ id: "35b86395-6b6b-4a39-ab16-05511f58acdd",
134
+ type: ReturnQuestionType.HOST_STACK,
135
+ children: [
136
+ {
137
+ id: "e1f6ac53-f203-4b32-9ff0-782c028d9e95",
138
+ translationKey: "style_i_already_have_something_similar",
139
+ type: ReturnQuestionType.OPTION,
140
+ },
141
+ {
142
+ id: "12875926-b67a-4ad3-852c-1608c7dcc558",
143
+ translationKey: "style_very_basic_simple",
144
+ type: ReturnQuestionType.OPTION,
145
+ },
146
+ {
147
+ id: "a5eb96bf-73d4-4df5-8ad8-097410b24526",
148
+ translationKey: "style_i_dont_need_it_at_the_moment",
149
+ type: ReturnQuestionType.OPTION,
150
+ },
151
+ ],
152
+ },
153
+ ],
154
+ },
155
+ {
156
+ id: "757107a9-8e2d-4194-a7fe-0d55cde49c11",
157
+ translationKey: "style_not_bad_but",
158
+ type: ReturnQuestionType.OPTION,
159
+ children: [
160
+ {
161
+ id: "c6f75ee3-a445-4103-a682-f0c3a742108d",
162
+ type: ReturnQuestionType.HOST_STACK,
163
+ children: [
164
+ {
165
+ id: "4f46d4b1-b103-43b2-b669-be721ab46e03",
166
+ translationKey: "style_i_dont_like_the_color",
167
+ type: ReturnQuestionType.OPTION,
168
+ },
169
+ {
170
+ id: "48412165-5e05-4806-8e21-ea59c41d0479",
171
+ translationKey: "style_very_basic_simple",
172
+ type: ReturnQuestionType.OPTION,
173
+ },
174
+ {
175
+ id: "51262c01-eaa3-4d3a-aeb9-95dc8b0dd687",
176
+ translationKey: "style_i_dont_like_the_fabric",
177
+ type: ReturnQuestionType.OPTION,
178
+ },
179
+ {
180
+ id: "9dea1c2b-4f8c-4192-a547-999df55e77e4",
181
+ translationKey: "style_i_dont_like_the_print",
182
+ type: ReturnQuestionType.OPTION,
183
+ },
184
+ {
185
+ id: "b1277bf3-4bbb-487a-8e58-88efecc61c3f",
186
+ translationKey: "style_not_my_style_in_general",
187
+ type: ReturnQuestionType.OPTION,
188
+ },
189
+ ],
190
+ },
191
+ ],
192
+ },
193
+ {
194
+ id: "8a9cd6f8-db4b-4904-8a48-3d9bbd6f7a69",
195
+ translationKey: "style_i_dont_like",
196
+ type: ReturnQuestionType.OPTION,
197
+ children: [
198
+ {
199
+ id: "f604240d-c093-4a9e-ab85-4adc0744066a",
200
+ type: ReturnQuestionType.HOST_STACK,
201
+ children: [
202
+ {
203
+ id: "42dbbb93-7808-4ac3-8431-582f812cb314",
204
+ translationKey: "style_i_dont_like_the_color",
205
+ type: ReturnQuestionType.OPTION,
206
+ },
207
+ {
208
+ id: "af1ade81-7b22-4f7e-a505-2ae275a6440f",
209
+ translationKey: "style_very_basic_simple",
210
+ type: ReturnQuestionType.OPTION,
211
+ },
212
+ {
213
+ id: "26d073b4-2588-4391-9b4c-e8e4a8eba2a8",
214
+ translationKey: "style_i_dont_like_the_fabric",
215
+ type: ReturnQuestionType.OPTION,
216
+ },
217
+ {
218
+ id: "ee50ab07-b7a6-415e-a04a-c9f350396185",
219
+ translationKey: "style_i_dont_like_the_print",
220
+ type: ReturnQuestionType.OPTION,
221
+ },
222
+ {
223
+ id: "ce3227e4-851e-47b7-98c1-c63a402e8477",
224
+ translationKey: "style_not_my_style_in_general",
225
+ type: ReturnQuestionType.OPTION,
226
+ },
227
+ ],
228
+ },
229
+ ],
230
+ },
231
+ ],
232
+ },
233
+ ],
234
+ },
235
+ {
236
+ id: "a1acdb2d-62c8-467f-b7cc-dc24d967290c",
237
+ translationKey: "quality",
238
+ type: ReturnQuestionType.HOST_SELECT,
239
+ metadata: {
240
+ placeholder: "quality_placeholder",
241
+ },
242
+ children: [
243
+ {
244
+ id: "405de847-188f-46c1-b66d-941c22a6b7a9",
245
+ translationKey: "quality_title",
246
+ type: ReturnQuestionType.HOST_STACK,
247
+ children: [
248
+ {
249
+ id: "cce7851c-92c7-461b-8dcb-903c5de59ed1",
250
+ translationKey: "quality_good",
251
+ type: ReturnQuestionType.OPTION,
252
+ },
253
+ {
254
+ id: "4bf8f27d-669b-4d36-8d39-b5599c671816",
255
+ translationKey: "quality_regular",
256
+ type: ReturnQuestionType.OPTION,
257
+ },
258
+ {
259
+ id: "48bfe766-92c0-4ff5-a793-e107b60786ff",
260
+ translationKey: "quality_bad",
261
+ type: ReturnQuestionType.OPTION,
262
+ },
263
+ ],
264
+ },
265
+ ],
266
+ },
267
+ {
268
+ id: "f25ccdcf-b648-479e-b4a1-86129e3e8c0b",
269
+ translationKey: "price",
270
+ type: ReturnQuestionType.HOST_SELECT,
271
+ metadata: {
272
+ placeholder: "price_placeholder",
273
+ },
274
+ children: [
275
+ {
276
+ id: "b0e0463c-787f-4d6c-adf3-5151ab6fc959",
277
+ translationKey: "price_title",
278
+ type: ReturnQuestionType.HOST_STACK,
279
+ children: [
280
+ {
281
+ id: "9c59e396-4135-4255-9437-22555837d686",
282
+ translationKey: "price_expensive",
283
+ type: ReturnQuestionType.OPTION,
284
+ },
285
+ {
286
+ id: "10db17f8-0982-49ee-9aeb-f752d953654c",
287
+ translationKey: "price_cheap",
288
+ type: ReturnQuestionType.OPTION,
289
+ },
290
+ {
291
+ id: "acf64bb3-b91b-48e7-bba1-0541620ed1c5",
292
+ translationKey: "price_fair",
293
+ type: ReturnQuestionType.OPTION,
294
+ },
295
+ ],
296
+ },
297
+ ],
298
+ },
299
+ {
300
+ id: "b7ad1665-5e54-4ee4-b455-e7189f33083c",
301
+ translationKey: "others",
302
+ type: ReturnQuestionType.HOST_SELECT,
303
+ metadata: {
304
+ placeholder: "others_placeholder",
305
+ },
306
+ children: [
307
+ {
308
+ id: "32cd0ef9-78d7-4605-a279-556749b36d4a",
309
+ translationKey: "others_title",
310
+ type: ReturnQuestionType.HOST_STACK,
311
+ children: [
312
+ {
313
+ id: "95c4fd13-9ca3-45a6-8795-23415bbd0a5e",
314
+ translationKey: "others_i_dont_like_the_brand",
315
+ type: ReturnQuestionType.OPTION,
316
+ },
317
+ {
318
+ id: "f25c63bd-42d3-4242-9b81-927025aa9d67",
319
+ translationKey: "others_different_from_preview",
320
+ type: ReturnQuestionType.OPTION,
321
+ },
322
+ {
323
+ id: "0e0b16c1-a721-4a14-aea6-e0cf5c262222",
324
+ translationKey: "others_delivery_delay",
325
+ type: ReturnQuestionType.OPTION,
326
+ },
327
+ {
328
+ id: "11699ae8-325d-429c-9c05-ff2d6cc45d54",
329
+ translationKey: "others_item_is_defective",
330
+ type: ReturnQuestionType.OPTION,
331
+ },
332
+ ],
333
+ },
334
+ ],
335
+ },
336
+ ],
337
+ },
338
+ {
339
+ id: "ce3e8d57-5eea-4dd3-bef4-2e811a143612",
340
+ translationKey: "comment_title",
341
+ type: ReturnQuestionType.HOST_TEXTAREA,
342
+ children: [
343
+ {
344
+ id: "1123a37d-bc00-43a4-9d28-cee1dfaf356c",
345
+ translationKey: "comment_textarea",
346
+ type: ReturnQuestionType.TEXTAREA,
347
+ metadata: {
348
+ placeholder: "comment_textarea_placeholder",
349
+ },
350
+ },
351
+ ],
352
+ },
353
+ ];
354
+ export { returnQuestions };
@@ -1,11 +1,21 @@
1
1
  import { useCallback, useMemo, useState } from "react";
2
2
  import { CommandStatus } from "@lookiero/messaging-react";
3
- import { ChargeStatus } from "@lookiero/payments-front/build/infrastructure/CheckoutAPI";
4
3
  import { NotificationLevel, useCreateToastNotification } from "@lookiero/sty-psp-notifications";
5
4
  import { MESSAGING_CONTEXT_ID } from "../../delivery/baseBootstrap";
6
5
  import { useSubmitCheckout as useSubmitCheckoutCommand } from "../../domain/checkout/react/useSubmitCheckout";
7
6
  import { useBlockCheckoutBooking } from "../../domain/checkoutBooking/react/useBlockCheckoutBooking";
8
7
  import { I18nMessages } from "../i18n/i18n";
8
+ var ChargeStatus;
9
+ (function (ChargeStatus) {
10
+ ChargeStatus["EXECUTED"] = "EXECUTED";
11
+ ChargeStatus["REQUIRES_ACTION"] = "REQUIRES_ACTION";
12
+ ChargeStatus["REQUIRED_ACTION_CANCELLED"] = "REQUIRED_ACTION_CANCELLED";
13
+ ChargeStatus["REJECTED"] = "REJECTED";
14
+ ChargeStatus["CANCELLED"] = "CANCELLED";
15
+ ChargeStatus["TO_CONFIRM"] = "TO_CONFIRM";
16
+ ChargeStatus["ERROR"] = "ERROR";
17
+ ChargeStatus["UNKNOWN"] = "UNKNOWN";
18
+ })(ChargeStatus || (ChargeStatus = {}));
9
19
  const useSubmitCheckout = ({ checkoutId, checkoutBookingId, paymentFlowRef, onError, onSuccess, logger, }) => {
10
20
  const [submitCheckoutCommand, submitCheckoutCommandStatus] = useSubmitCheckoutCommand({ checkoutId, logger });
11
21
  const [blockCheckoutBooking, blockCheckoutBookingStatus] = useBlockCheckoutBooking({ checkoutBookingId, logger });
@@ -72,7 +72,7 @@ const Checkout = ({ children, layout: Layout, useRedirect }) => {
72
72
  header: style.header,
73
73
  scrollView: style.scrollView,
74
74
  } },
75
- React.createElement(ScrollView, { showsVerticalScrollIndicator: false },
75
+ React.createElement(ScrollView, { showsVerticalScrollIndicator: false, testID: "checkout-view" },
76
76
  hasReplacedCheckoutItem && React.createElement(DeliveryBanner, null),
77
77
  React.createElement(AuroraLayout, { fullWidth: !screen.L, style: [screen.L && style.desktopLayoutSpacing, !screen.L && { paddingBottom: pricingHeight }] },
78
78
  React.createElement(Box, { size: { L: "2/3" }, style: screen.L && style.desktopListSpacing },
@@ -1,5 +1,5 @@
1
1
  import React, { useRef } from "react";
2
- import { PaymentInstrumentSelect, PaymentMethod, Section } from "@lookiero/payments-front";
2
+ import { PaymentInstrumentSelect, Section } from "@lookiero/payments-front";
3
3
  import { useLogger } from "@lookiero/sty-psp-logging";
4
4
  import { usePaymentInstrumentEvents } from "../../../../hooks/usePaymentInstrumentEvents";
5
5
  const PaymentInstrument = ({ useRedirect }) => {
@@ -7,6 +7,6 @@ const PaymentInstrument = ({ useRedirect }) => {
7
7
  const { returnUrl } = useRedirect();
8
8
  const logger = useLogger();
9
9
  usePaymentInstrumentEvents({ logger });
10
- return (React.createElement(PaymentInstrumentSelect, { ref: paymentInstrumentSelectRef, beforeRedirect: returnUrl ? () => Promise.resolve(returnUrl) : undefined, hasError: false, hidePaymentMethods: [PaymentMethod.GOOGLE_PAY], section: Section.BOX_CHECKOUT }));
10
+ return (React.createElement(PaymentInstrumentSelect, { ref: paymentInstrumentSelectRef, beforeRedirect: returnUrl ? () => Promise.resolve(returnUrl) : undefined, hasError: false, section: Section.BOX_CHECKOUT }));
11
11
  };
12
12
  export { PaymentInstrument };
@@ -1,4 +1,5 @@
1
1
  import React, { useCallback, useMemo } from "react";
2
+ import { View } from "react-native";
2
3
  import { Button } from "@lookiero/aurora";
3
4
  import { useI18nMessage } from "@lookiero/i18n-react";
4
5
  import { CheckoutQuestionType, } from "../../../../../../projection/checkoutQuestion/checkoutQuestion";
@@ -28,7 +29,7 @@ const CheckoutQuestionsForm = ({ checkoutQuestions, submitButtonDisabled, onSubm
28
29
  return checkoutQuestions.filter((checkoutQuestion) => checkoutQuestion.showCondition.length === 0 ||
29
30
  checkoutQuestion.showCondition.some((condition) => responses.includes(condition)));
30
31
  }, [checkoutQuestions, feedback]);
31
- return (React.createElement(React.Fragment, null,
32
+ return (React.createElement(View, { testID: "checkout-questions-form" },
32
33
  React.createElement(CheckoutQuestionItemProvider, { checkoutQuestionItems: checkoutQuestionItems },
33
34
  React.createElement(CheckoutQuestions, { checkoutQuestions: filteredCheckoutQuestions })),
34
35
  React.createElement(Button, { busy: submitButtonDisabled, testID: "checkout-feedback-button", onPress: handlePress }, buttonText)));