@lookiero/checkout 8.19.0 → 8.21.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/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +212 -254
  57. package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +1 -1
  58. package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +636 -762
  59. package/src/infrastructure/ui/views/summary/Summary.tsx +1 -1
  60. package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +1169 -1211
  61. package/tsconfig.json +8 -1
  62. package/webpack.config.js +8 -1
@@ -100,170 +100,149 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
100
100
  }
101
101
  testID="carousel-item"
102
102
  >
103
- <RNGestureHandlerButton
104
- collapsable={false}
105
- delayLongPress={600}
106
- enabled={true}
107
- exclusive={true}
108
- handlerTag={2}
109
- handlerType="NativeViewGestureHandler"
110
- onGestureEvent={[Function]}
111
- onGestureHandlerEvent={[Function]}
112
- onGestureHandlerStateChange={[Function]}
113
- onHandlerStateChange={[Function]}
114
- rippleColor={0}
115
- touchSoundDisabled={false}
103
+ <View
104
+ onLayout={[Function]}
116
105
  >
117
106
  <View
118
- accessible={true}
119
- collapsable={false}
120
- style={{}}
107
+ style={
108
+ [
109
+ {
110
+ "height": undefined,
111
+ "width": undefined,
112
+ },
113
+ {
114
+ "alignSelf": undefined,
115
+ "marginTop": 0,
116
+ },
117
+ ]
118
+ }
121
119
  >
122
120
  <View
123
- onLayout={[Function]}
121
+ style={
122
+ [
123
+ {
124
+ "position": "relative",
125
+ },
126
+ [
127
+ {
128
+ "flex": 1,
129
+ },
130
+ null,
131
+ ],
132
+ ]
133
+ }
134
+ testID="product-variant-image"
124
135
  >
125
136
  <View
126
137
  style={
127
138
  [
128
139
  {
129
- "height": undefined,
130
- "width": undefined,
131
- },
132
- {
133
- "alignSelf": undefined,
134
- "marginTop": 0,
140
+ "flex": 1,
135
141
  },
136
142
  ]
137
143
  }
144
+ testID="lazy-image-skeleton"
138
145
  >
139
146
  <View
147
+ onLayout={[Function]}
140
148
  style={
141
149
  [
142
150
  {
143
- "position": "relative",
151
+ "backgroundColor": "#F8F7F7",
152
+ "flex": 1,
153
+ "height": undefined,
154
+ "overflow": "hidden",
155
+ "width": undefined,
144
156
  },
145
- [
146
- {
147
- "flex": 1,
148
- },
149
- null,
150
- ],
151
157
  ]
152
158
  }
153
- testID="product-variant-image"
154
159
  >
155
160
  <View
161
+ collapsable={false}
162
+ duration={1200}
156
163
  style={
157
- [
158
- {
159
- "flex": 1,
160
- },
161
- ]
164
+ {
165
+ "height": "100%",
166
+ "left": 0,
167
+ "transform": [
168
+ {
169
+ "translateX": -375,
170
+ },
171
+ ],
172
+ "width": "100%",
173
+ }
162
174
  }
163
- testID="lazy-image-skeleton"
164
175
  >
165
176
  <View
166
- onLayout={[Function]}
167
- style={
177
+ colors={
168
178
  [
169
- {
170
- "backgroundColor": "#F8F7F7",
171
- "flex": 1,
172
- "height": undefined,
173
- "overflow": "hidden",
174
- "width": undefined,
175
- },
179
+ "rgba(255, 255, 255, 0)",
180
+ "#DAD8D8",
181
+ "#DAD8D8",
182
+ "rgba(255, 255, 255, 0)",
176
183
  ]
177
184
  }
178
- >
179
- <View
180
- collapsable={false}
181
- duration={1200}
182
- style={
183
- {
184
- "height": "100%",
185
- "left": 0,
186
- "transform": [
187
- {
188
- "translateX": -375,
189
- },
190
- ],
191
- "width": "100%",
192
- }
185
+ end={
186
+ {
187
+ "x": 1,
188
+ "y": 0,
193
189
  }
194
- >
195
- <View
196
- colors={
197
- [
198
- "rgba(255, 255, 255, 0)",
199
- "#DAD8D8",
200
- "#DAD8D8",
201
- "rgba(255, 255, 255, 0)",
202
- ]
203
- }
204
- end={
205
- {
206
- "x": 1,
207
- "y": 0,
208
- }
209
- }
210
- locations={
211
- [
212
- 0,
213
- 0.25,
214
- 0.75,
215
- 1,
216
- ]
217
- }
218
- start={
219
- {
220
- "x": 0,
221
- "y": 0,
222
- }
223
- }
224
- style={
225
- {
226
- "height": "100%",
227
- "width": "100%",
228
- }
229
- }
230
- />
231
- </View>
232
- </View>
233
- </View>
234
- <Image
235
- collapsable={false}
236
- jestAnimatedStyle={
237
- {
238
- "value": {
239
- "opacity": 0,
240
- },
241
190
  }
242
- }
243
- onLoad={[Function]}
244
- resizeMode="stretch"
245
- source={
246
- {
247
- "uri": "https://cdn-catalog-back-prod.envs.lookiero.tech/1a/28/1a28f712-a76c-4172-8a11-f15002981dc0.jpg?w=600&f=auto",
191
+ locations={
192
+ [
193
+ 0,
194
+ 0.25,
195
+ 0.75,
196
+ 1,
197
+ ]
248
198
  }
249
- }
250
- style={
251
- {
252
- "flex": 1,
253
- "height": "100%",
254
- "opacity": 0,
255
- "position": "absolute",
256
- "width": "100%",
257
- "zIndex": 10,
199
+ start={
200
+ {
201
+ "x": 0,
202
+ "y": 0,
203
+ }
258
204
  }
259
- }
260
- testID="lazy-image-main-image"
261
- />
205
+ style={
206
+ {
207
+ "height": "100%",
208
+ "width": "100%",
209
+ }
210
+ }
211
+ />
212
+ </View>
262
213
  </View>
263
214
  </View>
215
+ <Image
216
+ collapsable={false}
217
+ jestAnimatedStyle={
218
+ {
219
+ "value": {
220
+ "opacity": 0,
221
+ },
222
+ }
223
+ }
224
+ onLoad={[Function]}
225
+ resizeMode="stretch"
226
+ source={
227
+ {
228
+ "uri": "https://cdn-catalog-back-prod.envs.lookiero.tech/1a/28/1a28f712-a76c-4172-8a11-f15002981dc0.jpg?w=600&f=auto",
229
+ }
230
+ }
231
+ style={
232
+ {
233
+ "flex": 1,
234
+ "height": "100%",
235
+ "opacity": 0,
236
+ "position": "absolute",
237
+ "width": "100%",
238
+ "zIndex": 10,
239
+ }
240
+ }
241
+ testID="lazy-image-main-image"
242
+ />
264
243
  </View>
265
244
  </View>
266
- </RNGestureHandlerButton>
245
+ </View>
267
246
  </View>
268
247
  <View
269
248
  collapsable={false}
@@ -280,170 +259,149 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
280
259
  }
281
260
  testID="carousel-item"
282
261
  >
283
- <RNGestureHandlerButton
284
- collapsable={false}
285
- delayLongPress={600}
286
- enabled={true}
287
- exclusive={true}
288
- handlerTag={3}
289
- handlerType="NativeViewGestureHandler"
290
- onGestureEvent={[Function]}
291
- onGestureHandlerEvent={[Function]}
292
- onGestureHandlerStateChange={[Function]}
293
- onHandlerStateChange={[Function]}
294
- rippleColor={0}
295
- touchSoundDisabled={false}
262
+ <View
263
+ onLayout={[Function]}
296
264
  >
297
265
  <View
298
- accessible={true}
299
- collapsable={false}
300
- style={{}}
266
+ style={
267
+ [
268
+ {
269
+ "height": undefined,
270
+ "width": undefined,
271
+ },
272
+ {
273
+ "alignSelf": undefined,
274
+ "marginTop": 0,
275
+ },
276
+ ]
277
+ }
301
278
  >
302
279
  <View
303
- onLayout={[Function]}
280
+ style={
281
+ [
282
+ {
283
+ "position": "relative",
284
+ },
285
+ [
286
+ {
287
+ "flex": 1,
288
+ },
289
+ null,
290
+ ],
291
+ ]
292
+ }
293
+ testID="product-variant-image"
304
294
  >
305
295
  <View
306
296
  style={
307
297
  [
308
298
  {
309
- "height": undefined,
310
- "width": undefined,
311
- },
312
- {
313
- "alignSelf": undefined,
314
- "marginTop": 0,
299
+ "flex": 1,
315
300
  },
316
301
  ]
317
302
  }
303
+ testID="lazy-image-skeleton"
318
304
  >
319
305
  <View
306
+ onLayout={[Function]}
320
307
  style={
321
308
  [
322
309
  {
323
- "position": "relative",
310
+ "backgroundColor": "#F8F7F7",
311
+ "flex": 1,
312
+ "height": undefined,
313
+ "overflow": "hidden",
314
+ "width": undefined,
324
315
  },
325
- [
326
- {
327
- "flex": 1,
328
- },
329
- null,
330
- ],
331
316
  ]
332
317
  }
333
- testID="product-variant-image"
334
318
  >
335
319
  <View
320
+ collapsable={false}
321
+ duration={1200}
336
322
  style={
337
- [
338
- {
339
- "flex": 1,
340
- },
341
- ]
323
+ {
324
+ "height": "100%",
325
+ "left": 0,
326
+ "transform": [
327
+ {
328
+ "translateX": -375,
329
+ },
330
+ ],
331
+ "width": "100%",
332
+ }
342
333
  }
343
- testID="lazy-image-skeleton"
344
334
  >
345
335
  <View
346
- onLayout={[Function]}
347
- style={
336
+ colors={
348
337
  [
349
- {
350
- "backgroundColor": "#F8F7F7",
351
- "flex": 1,
352
- "height": undefined,
353
- "overflow": "hidden",
354
- "width": undefined,
355
- },
338
+ "rgba(255, 255, 255, 0)",
339
+ "#DAD8D8",
340
+ "#DAD8D8",
341
+ "rgba(255, 255, 255, 0)",
356
342
  ]
357
343
  }
358
- >
359
- <View
360
- collapsable={false}
361
- duration={1200}
362
- style={
363
- {
364
- "height": "100%",
365
- "left": 0,
366
- "transform": [
367
- {
368
- "translateX": -375,
369
- },
370
- ],
371
- "width": "100%",
372
- }
344
+ end={
345
+ {
346
+ "x": 1,
347
+ "y": 0,
373
348
  }
374
- >
375
- <View
376
- colors={
377
- [
378
- "rgba(255, 255, 255, 0)",
379
- "#DAD8D8",
380
- "#DAD8D8",
381
- "rgba(255, 255, 255, 0)",
382
- ]
383
- }
384
- end={
385
- {
386
- "x": 1,
387
- "y": 0,
388
- }
389
- }
390
- locations={
391
- [
392
- 0,
393
- 0.25,
394
- 0.75,
395
- 1,
396
- ]
397
- }
398
- start={
399
- {
400
- "x": 0,
401
- "y": 0,
402
- }
403
- }
404
- style={
405
- {
406
- "height": "100%",
407
- "width": "100%",
408
- }
409
- }
410
- />
411
- </View>
412
- </View>
413
- </View>
414
- <Image
415
- collapsable={false}
416
- jestAnimatedStyle={
417
- {
418
- "value": {
419
- "opacity": 0,
420
- },
421
349
  }
422
- }
423
- onLoad={[Function]}
424
- resizeMode="stretch"
425
- source={
426
- {
427
- "uri": "https://cdn-catalog-back-prod.envs.lookiero.tech/15/ac/15aca112-4e71-4646-8db5-7f9723bc0130.jpg?w=600&f=auto",
350
+ locations={
351
+ [
352
+ 0,
353
+ 0.25,
354
+ 0.75,
355
+ 1,
356
+ ]
428
357
  }
429
- }
430
- style={
431
- {
432
- "flex": 1,
433
- "height": "100%",
434
- "opacity": 0,
435
- "position": "absolute",
436
- "width": "100%",
437
- "zIndex": 10,
358
+ start={
359
+ {
360
+ "x": 0,
361
+ "y": 0,
362
+ }
438
363
  }
439
- }
440
- testID="lazy-image-main-image"
441
- />
364
+ style={
365
+ {
366
+ "height": "100%",
367
+ "width": "100%",
368
+ }
369
+ }
370
+ />
371
+ </View>
442
372
  </View>
443
373
  </View>
374
+ <Image
375
+ collapsable={false}
376
+ jestAnimatedStyle={
377
+ {
378
+ "value": {
379
+ "opacity": 0,
380
+ },
381
+ }
382
+ }
383
+ onLoad={[Function]}
384
+ resizeMode="stretch"
385
+ source={
386
+ {
387
+ "uri": "https://cdn-catalog-back-prod.envs.lookiero.tech/15/ac/15aca112-4e71-4646-8db5-7f9723bc0130.jpg?w=600&f=auto",
388
+ }
389
+ }
390
+ style={
391
+ {
392
+ "flex": 1,
393
+ "height": "100%",
394
+ "opacity": 0,
395
+ "position": "absolute",
396
+ "width": "100%",
397
+ "zIndex": 10,
398
+ }
399
+ }
400
+ testID="lazy-image-main-image"
401
+ />
444
402
  </View>
445
403
  </View>
446
- </RNGestureHandlerButton>
404
+ </View>
447
405
  </View>
448
406
  </View>
449
407
  </View>
@@ -104,7 +104,7 @@ const ItemWithoutCustomerDecission: FC<ItemWithoutCustomerDecissionProps> = ({
104
104
  <>
105
105
  <SizeWithoutStockModal visible={sizeWithoutStockModalVisible} onDismiss={handleOnHideSizeWithoutStockModal} />
106
106
 
107
- <ScrollView showsVerticalScrollIndicator={false}>
107
+ <ScrollView showsVerticalScrollIndicator={false} testID={checkoutItem.id}>
108
108
  <Body style={{ row: style.container }}>
109
109
  <ProductVariant
110
110
  checkoutId={checkoutId}