@lookiero/checkout 11.5.0 → 12.1.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.
- package/dist/index.d.ts +1 -2
- package/dist/src/ExpoRoot.d.ts +0 -1
- package/dist/src/ExpoRoot.js +2 -3
- package/dist/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackChangeFeedback.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackChangeFeedback.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackCheckout.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackCheckout.js +3 -1
- package/dist/src/infrastructure/tracking/useTrackImageView.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackImageView.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackItemPageView.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackItemPageView.js +3 -1
- package/dist/src/infrastructure/tracking/useTrackKeepItem.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackKeepItem.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackPageView.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackPageView.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackPressBack.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackPressBack.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackPressContinue.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackPressContinue.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackPressItem.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackPressItem.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackPressNext.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackPressNext.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackPressPrevious.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackPressPrevious.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackPressPricing.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackPressPricing.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackReplaceItem.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackReplaceItem.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackResetItem.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackResetItem.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackReturnItem.d.ts +2 -0
- package/dist/src/infrastructure/tracking/useTrackReturnItem.js +3 -2
- package/dist/src/infrastructure/tracking/useTrackTabView.d.ts +3 -1
- package/dist/src/infrastructure/tracking/useTrackTabView.js +3 -2
- package/dist/src/infrastructure/ui/hooks/useCheckoutFlow.js +2 -1
- package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.d.ts +1 -1
- package/dist/src/infrastructure/ui/routing/CheckoutMiddleware.js +5 -3
- package/dist/src/infrastructure/ui/test/render.js +1 -1
- package/dist/src/infrastructure/ui/views/App.d.ts +1 -1
- package/dist/src/infrastructure/ui/views/checkout/Checkout.js +4 -1
- package/dist/src/infrastructure/ui/views/feedback/Feedback.js +4 -1
- package/dist/src/infrastructure/ui/views/item/Item.js +5 -1
- package/dist/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.js +3 -2
- package/dist/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.js +4 -2
- package/dist/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.d.ts +2 -0
- package/dist/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.js +2 -1
- package/dist/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +5 -2
- package/dist/src/infrastructure/ui/views/summary/Summary.js +4 -1
- package/dist/src/infrastructure/ui/views/summaryTabs/SummaryTabs.js +4 -1
- package/dist/src/projection/returnQuestion/returnQuestion.typeguard.d.ts +2 -2
- package/dist/src/version.d.ts +1 -1
- package/dist/src/version.js +1 -1
- package/index.ts +1 -1
- package/jest.config.js +0 -3
- package/jest.setup.js +9 -1
- package/package.json +22 -20
- package/src/ExpoRoot.tsx +2 -3
- package/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.test.ts +4 -0
- package/src/infrastructure/tracking/useTrackAssignedVariationByExperiment.ts +5 -1
- package/src/infrastructure/tracking/useTrackChangeFeedback.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackChangeFeedback.ts +5 -2
- package/src/infrastructure/tracking/useTrackCheckout.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackCheckout.ts +5 -0
- package/src/infrastructure/tracking/useTrackImageView.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackImageView.ts +5 -1
- package/src/infrastructure/tracking/useTrackItemPageView.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackItemPageView.ts +5 -0
- package/src/infrastructure/tracking/useTrackKeepItem.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackKeepItem.ts +12 -2
- package/src/infrastructure/tracking/useTrackPageView.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackPageView.ts +5 -2
- package/src/infrastructure/tracking/useTrackPressBack.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackPressBack.ts +5 -2
- package/src/infrastructure/tracking/useTrackPressContinue.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackPressContinue.ts +5 -2
- package/src/infrastructure/tracking/useTrackPressItem.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackPressItem.ts +5 -2
- package/src/infrastructure/tracking/useTrackPressNext.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackPressNext.ts +5 -2
- package/src/infrastructure/tracking/useTrackPressPrevious.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackPressPrevious.ts +5 -2
- package/src/infrastructure/tracking/useTrackPressPricing.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackPressPricing.ts +5 -2
- package/src/infrastructure/tracking/useTrackReplaceItem.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackReplaceItem.ts +5 -1
- package/src/infrastructure/tracking/useTrackResetItem.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackResetItem.ts +12 -2
- package/src/infrastructure/tracking/useTrackReturnItem.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackReturnItem.ts +12 -2
- package/src/infrastructure/tracking/useTrackTabView.test.tsx +4 -0
- package/src/infrastructure/tracking/useTrackTabView.ts +5 -1
- package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +11 -1
- package/src/infrastructure/ui/hooks/useCheckoutFlow.tsx +2 -0
- package/src/infrastructure/ui/hooks/useQueryBus.test.tsx +1 -1
- package/src/infrastructure/ui/hooks/useStaticInfo.test.tsx +1 -1
- package/src/infrastructure/ui/routing/CheckoutMiddleware.tsx +6 -4
- package/src/infrastructure/ui/test/render.tsx +1 -1
- package/src/infrastructure/ui/views/App.tsx +1 -1
- package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +9 -2
- package/src/infrastructure/ui/views/checkout/Checkout.tsx +4 -0
- package/src/infrastructure/ui/views/feedback/Feedback.test.tsx +7 -1
- package/src/infrastructure/ui/views/feedback/Feedback.tsx +4 -0
- package/src/infrastructure/ui/views/item/Item.test.tsx +7 -1
- package/src/infrastructure/ui/views/item/Item.tsx +5 -0
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +34 -43
- package/src/infrastructure/ui/views/item/components/itemActions/__snapshots__/ItemActions.test.tsx.snap +34 -43
- package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +76 -99
- package/src/infrastructure/ui/views/item/components/selectModal/__snapshots__/SelecModal.test.tsx.snap +34 -43
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +34 -43
- package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.test.tsx +7 -1
- package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.tsx +3 -0
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.test.tsx +7 -1
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.tsx +4 -0
- package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.test.tsx +2 -0
- package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.tsx +4 -0
- package/src/infrastructure/ui/views/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +228 -297
- package/src/infrastructure/ui/views/return/Return.test.tsx +8 -1
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.test.tsx +2 -1
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +5 -2
- package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +26 -32
- package/src/infrastructure/ui/views/summary/Summary.test.tsx +7 -1
- package/src/infrastructure/ui/views/summary/Summary.tsx +4 -0
- package/src/infrastructure/ui/views/summary/components/collapsiblePricing/__snapshots__/CollapsiblePricing.test.tsx.snap +16 -24
- package/src/infrastructure/ui/views/summaryTabs/SummaryTabs.test.tsx +7 -1
- package/src/infrastructure/ui/views/summaryTabs/SummaryTabs.tsx +4 -0
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +105 -135
|
@@ -58,15 +58,7 @@ exports[`SelectField component matches the snapshot 1`] = `
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
accessible={true}
|
|
61
|
-
collapsable={false}
|
|
62
61
|
focusable={true}
|
|
63
|
-
jestAnimatedStyle={
|
|
64
|
-
{
|
|
65
|
-
"value": {
|
|
66
|
-
"opacity": 1,
|
|
67
|
-
},
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
62
|
onClick={[Function]}
|
|
71
63
|
onResponderGrant={[Function]}
|
|
72
64
|
onResponderMove={[Function]}
|
|
@@ -75,14 +67,19 @@ exports[`SelectField component matches the snapshot 1`] = `
|
|
|
75
67
|
onResponderTerminationRequest={[Function]}
|
|
76
68
|
onStartShouldSetResponder={[Function]}
|
|
77
69
|
style={
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
70
|
+
[
|
|
71
|
+
{
|
|
72
|
+
"backgroundColor": "rgba(12, 10, 10, 0.7)",
|
|
73
|
+
"height": "100%",
|
|
74
|
+
"position": "absolute",
|
|
75
|
+
"width": "100%",
|
|
76
|
+
"zIndex": 1,
|
|
77
|
+
},
|
|
78
|
+
undefined,
|
|
79
|
+
{
|
|
80
|
+
"opacity": 1,
|
|
81
|
+
},
|
|
82
|
+
]
|
|
86
83
|
}
|
|
87
84
|
testID="modal-close-button"
|
|
88
85
|
/>
|
|
@@ -116,10 +113,26 @@ exports[`SelectField component matches the snapshot 1`] = `
|
|
|
116
113
|
}
|
|
117
114
|
>
|
|
118
115
|
<View
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
pointerEvents="auto"
|
|
117
|
+
style={
|
|
118
|
+
[
|
|
119
|
+
{
|
|
120
|
+
"backgroundColor": "#FFFFFF",
|
|
121
|
+
"borderRadius": 16,
|
|
122
|
+
"position": "absolute",
|
|
123
|
+
"width": "100%",
|
|
124
|
+
"zIndex": 3,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"borderBottomLeftRadius": 0,
|
|
128
|
+
"borderBottomRightRadius": 0,
|
|
129
|
+
},
|
|
130
|
+
undefined,
|
|
131
|
+
{
|
|
132
|
+
"maxHeight": 800,
|
|
133
|
+
},
|
|
134
|
+
undefined,
|
|
135
|
+
{
|
|
123
136
|
"opacity": 1,
|
|
124
137
|
"transform": [
|
|
125
138
|
{
|
|
@@ -130,29 +143,7 @@ exports[`SelectField component matches the snapshot 1`] = `
|
|
|
130
143
|
},
|
|
131
144
|
],
|
|
132
145
|
},
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
pointerEvents="auto"
|
|
136
|
-
style={
|
|
137
|
-
{
|
|
138
|
-
"backgroundColor": "#FFFFFF",
|
|
139
|
-
"borderBottomLeftRadius": 0,
|
|
140
|
-
"borderBottomRightRadius": 0,
|
|
141
|
-
"borderRadius": 16,
|
|
142
|
-
"maxHeight": 800,
|
|
143
|
-
"opacity": 1,
|
|
144
|
-
"position": "absolute",
|
|
145
|
-
"transform": [
|
|
146
|
-
{
|
|
147
|
-
"translateY": 0,
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"scale": 1,
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
"width": "100%",
|
|
154
|
-
"zIndex": 3,
|
|
155
|
-
}
|
|
146
|
+
]
|
|
156
147
|
}
|
|
157
148
|
>
|
|
158
149
|
<View
|
|
@@ -58,15 +58,7 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
accessible={true}
|
|
61
|
-
collapsable={false}
|
|
62
61
|
focusable={true}
|
|
63
|
-
jestAnimatedStyle={
|
|
64
|
-
{
|
|
65
|
-
"value": {
|
|
66
|
-
"opacity": 1,
|
|
67
|
-
},
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
62
|
onClick={[Function]}
|
|
71
63
|
onResponderGrant={[Function]}
|
|
72
64
|
onResponderMove={[Function]}
|
|
@@ -75,14 +67,19 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
|
|
|
75
67
|
onResponderTerminationRequest={[Function]}
|
|
76
68
|
onStartShouldSetResponder={[Function]}
|
|
77
69
|
style={
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
70
|
+
[
|
|
71
|
+
{
|
|
72
|
+
"backgroundColor": "rgba(12, 10, 10, 0.7)",
|
|
73
|
+
"height": "100%",
|
|
74
|
+
"position": "absolute",
|
|
75
|
+
"width": "100%",
|
|
76
|
+
"zIndex": 1,
|
|
77
|
+
},
|
|
78
|
+
undefined,
|
|
79
|
+
{
|
|
80
|
+
"opacity": 1,
|
|
81
|
+
},
|
|
82
|
+
]
|
|
86
83
|
}
|
|
87
84
|
testID="modal-close-button"
|
|
88
85
|
/>
|
|
@@ -116,10 +113,26 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
|
|
|
116
113
|
}
|
|
117
114
|
>
|
|
118
115
|
<View
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
116
|
+
pointerEvents="auto"
|
|
117
|
+
style={
|
|
118
|
+
[
|
|
119
|
+
{
|
|
120
|
+
"backgroundColor": "#FFFFFF",
|
|
121
|
+
"borderRadius": 16,
|
|
122
|
+
"position": "absolute",
|
|
123
|
+
"width": "100%",
|
|
124
|
+
"zIndex": 3,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"borderBottomLeftRadius": 0,
|
|
128
|
+
"borderBottomRightRadius": 0,
|
|
129
|
+
},
|
|
130
|
+
undefined,
|
|
131
|
+
{
|
|
132
|
+
"maxHeight": 800,
|
|
133
|
+
},
|
|
134
|
+
undefined,
|
|
135
|
+
{
|
|
123
136
|
"opacity": 1,
|
|
124
137
|
"transform": [
|
|
125
138
|
{
|
|
@@ -130,29 +143,7 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
|
|
|
130
143
|
},
|
|
131
144
|
],
|
|
132
145
|
},
|
|
133
|
-
|
|
134
|
-
}
|
|
135
|
-
pointerEvents="auto"
|
|
136
|
-
style={
|
|
137
|
-
{
|
|
138
|
-
"backgroundColor": "#FFFFFF",
|
|
139
|
-
"borderBottomLeftRadius": 0,
|
|
140
|
-
"borderBottomRightRadius": 0,
|
|
141
|
-
"borderRadius": 16,
|
|
142
|
-
"maxHeight": 800,
|
|
143
|
-
"opacity": 1,
|
|
144
|
-
"position": "absolute",
|
|
145
|
-
"transform": [
|
|
146
|
-
{
|
|
147
|
-
"translateY": 0,
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
"scale": 1,
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
"width": "100%",
|
|
154
|
-
"zIndex": 3,
|
|
155
|
-
}
|
|
146
|
+
]
|
|
156
147
|
}
|
|
157
148
|
>
|
|
158
149
|
<View
|
|
@@ -4,6 +4,7 @@ import { CommandStatus } from "@lookiero/messaging-react";
|
|
|
4
4
|
import { Country } from "@lookiero/sty-psp-locale";
|
|
5
5
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
6
6
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
7
|
+
import { Customer } from "../../../../../../projection/customer/customer";
|
|
7
8
|
import { useResetCheckoutItem } from "../../../../../domain/checkoutItem/react/useResetCheckoutItem";
|
|
8
9
|
import { checkoutItem } from "../../../../../projection/checkoutItem/checkoutItem.mock";
|
|
9
10
|
import { returnQuestions as mockReturnQuestions } from "../../../../../projection/returnQuestion/returnQuestions.mock";
|
|
@@ -22,9 +23,14 @@ const checkoutId = "a5422445-0e62-4b11-8a3f-1bb5469ee154";
|
|
|
22
23
|
const customerId = "5257f9c4-277a-45fe-af45-db0b5addaac3";
|
|
23
24
|
const country = Country.ES;
|
|
24
25
|
const segment = Segment.WOMEN;
|
|
26
|
+
const mockCustomer: Customer = {
|
|
27
|
+
customerId,
|
|
28
|
+
country,
|
|
29
|
+
segment,
|
|
30
|
+
} as Customer;
|
|
25
31
|
|
|
26
32
|
jest.mock("../../../../hooks/useStaticInfo", () => ({
|
|
27
|
-
useStaticInfo: () => ({ customer:
|
|
33
|
+
useStaticInfo: () => ({ customer: mockCustomer }),
|
|
28
34
|
}));
|
|
29
35
|
|
|
30
36
|
interface RenderItemWithCustomerDecissionFunctionArgs {
|
|
@@ -47,6 +47,7 @@ const ItemWithCustomerDecission: FC<ItemWithCustomerDecissionProps> = ({
|
|
|
47
47
|
const logger = useLogger();
|
|
48
48
|
const {
|
|
49
49
|
customer: { country, segment },
|
|
50
|
+
tradename,
|
|
50
51
|
} = useStaticInfo();
|
|
51
52
|
|
|
52
53
|
/* ResetCheckoutItem */
|
|
@@ -58,6 +59,7 @@ const ItemWithCustomerDecission: FC<ItemWithCustomerDecissionProps> = ({
|
|
|
58
59
|
page: TrackingPage.ITEM,
|
|
59
60
|
country,
|
|
60
61
|
segment,
|
|
62
|
+
tradename,
|
|
61
63
|
checkoutId,
|
|
62
64
|
checkoutItemId: checkoutItem.id,
|
|
63
65
|
});
|
|
@@ -81,6 +83,7 @@ const ItemWithCustomerDecission: FC<ItemWithCustomerDecissionProps> = ({
|
|
|
81
83
|
country={country}
|
|
82
84
|
currentProductVariant={currentProductVariant}
|
|
83
85
|
segment={segment}
|
|
86
|
+
tradename={tradename}
|
|
84
87
|
customerDecissionBanner={
|
|
85
88
|
<CustomerDecissionBanner
|
|
86
89
|
checkoutItemStatus={checkoutItem.status as CustomerDecissionBannerStatus}
|
|
@@ -5,6 +5,7 @@ import { Country } from "@lookiero/sty-psp-locale";
|
|
|
5
5
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
6
6
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
7
7
|
import { BookedProductsVariantsProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
|
|
8
|
+
import { Customer } from "../../../../../../projection/customer/customer";
|
|
8
9
|
import { useKeepCheckoutItem } from "../../../../../domain/checkoutItem/react/useKeepCheckoutItem";
|
|
9
10
|
import { useReplaceCheckoutItem } from "../../../../../domain/checkoutItem/react/useReplaceCheckoutItem";
|
|
10
11
|
import { bookedProductsVariants as mockBookedProductsVariants } from "../../../../../projection/bookedProductsVariants/bookedProductsVariants.mock";
|
|
@@ -29,9 +30,14 @@ const checkoutId = "a5422445-0e62-4b11-8a3f-1bb5469ee154";
|
|
|
29
30
|
const customerId = "5257f9c4-277a-45fe-af45-db0b5addaac3";
|
|
30
31
|
const country = Country.ES;
|
|
31
32
|
const segment = Segment.WOMEN;
|
|
33
|
+
const mockCustomer: Customer = {
|
|
34
|
+
customerId,
|
|
35
|
+
country,
|
|
36
|
+
segment,
|
|
37
|
+
} as Customer;
|
|
32
38
|
|
|
33
39
|
jest.mock("../../../../hooks/useStaticInfo", () => ({
|
|
34
|
-
useStaticInfo: () => ({ customer:
|
|
40
|
+
useStaticInfo: () => ({ customer: mockCustomer }),
|
|
35
41
|
}));
|
|
36
42
|
|
|
37
43
|
interface RenderItemWithoutCustomerDecissionFunctionArgs {
|
|
@@ -44,6 +44,7 @@ const ItemWithoutCustomerDecission: FC<ItemWithoutCustomerDecissionProps> = ({
|
|
|
44
44
|
const logger = useLogger();
|
|
45
45
|
const {
|
|
46
46
|
customer: { country, segment },
|
|
47
|
+
tradename,
|
|
47
48
|
} = useStaticInfo();
|
|
48
49
|
|
|
49
50
|
const style = useMemo(() => itemWithoutCustomerDecissionStyle(), []);
|
|
@@ -54,6 +55,7 @@ const ItemWithoutCustomerDecission: FC<ItemWithoutCustomerDecissionProps> = ({
|
|
|
54
55
|
page: TrackingPage.ITEM,
|
|
55
56
|
country,
|
|
56
57
|
segment,
|
|
58
|
+
tradename,
|
|
57
59
|
checkoutId,
|
|
58
60
|
checkoutItemId: checkoutItem.id,
|
|
59
61
|
});
|
|
@@ -72,6 +74,7 @@ const ItemWithoutCustomerDecission: FC<ItemWithoutCustomerDecissionProps> = ({
|
|
|
72
74
|
page: TrackingPage.ITEM,
|
|
73
75
|
country,
|
|
74
76
|
segment,
|
|
77
|
+
tradename,
|
|
75
78
|
checkoutId,
|
|
76
79
|
checkoutItemId: checkoutItem.id,
|
|
77
80
|
productVariantId: checkoutItem.productVariant.id,
|
|
@@ -111,6 +114,7 @@ const ItemWithoutCustomerDecission: FC<ItemWithoutCustomerDecissionProps> = ({
|
|
|
111
114
|
country={country}
|
|
112
115
|
currentProductVariant={currentProductVariant}
|
|
113
116
|
segment={segment}
|
|
117
|
+
tradename={tradename}
|
|
114
118
|
style={{
|
|
115
119
|
content: { paddingBottom: Platform.OS === "web" ? style.productVariantPaddingBottom : stickyHeight },
|
|
116
120
|
}}
|
|
@@ -2,6 +2,7 @@ import { RenderAPI, fireEvent } from "@testing-library/react-native";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { Country } from "@lookiero/sty-psp-locale";
|
|
4
4
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
5
|
+
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
5
6
|
import { CheckoutItemStatus } from "../../../../../../domain/checkoutItem/model/checkoutItem";
|
|
6
7
|
import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
|
|
7
8
|
import { CheckoutItemProjection } from "../../../../../../projection/checkoutItem/checkoutItem";
|
|
@@ -58,6 +59,7 @@ const renderProductVariant: RenderProductVariantFunction = ({ checkoutItem, curr
|
|
|
58
59
|
country={Country.ES}
|
|
59
60
|
currentProductVariant={currentProductVariant}
|
|
60
61
|
segment={Segment.WOMEN}
|
|
62
|
+
tradename={Tradename.LOOKIERO}
|
|
61
63
|
/>,
|
|
62
64
|
);
|
|
63
65
|
|
|
@@ -3,6 +3,7 @@ import { StyleProp, View, ViewStyle } from "react-native";
|
|
|
3
3
|
import { Country } from "@lookiero/sty-psp-locale";
|
|
4
4
|
import { Segment } from "@lookiero/sty-psp-segment";
|
|
5
5
|
import { useScreenSize } from "@lookiero/sty-psp-ui";
|
|
6
|
+
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
6
7
|
import { ProductVariantProjection } from "../../../../../../projection/bookedProductsVariants/bookedProductsVariants";
|
|
7
8
|
import {
|
|
8
9
|
CheckoutItemProjection,
|
|
@@ -18,6 +19,7 @@ import { style as productVariantStyle } from "./ProductVariant.style";
|
|
|
18
19
|
type ProductVariantStyle = "content";
|
|
19
20
|
|
|
20
21
|
interface ProductVariantProps {
|
|
22
|
+
readonly tradename: Tradename;
|
|
21
23
|
readonly country: Country;
|
|
22
24
|
readonly segment: Segment;
|
|
23
25
|
readonly checkoutId: string;
|
|
@@ -29,6 +31,7 @@ interface ProductVariantProps {
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
const ProductVariant: FC<ProductVariantProps> = ({
|
|
34
|
+
tradename,
|
|
32
35
|
country,
|
|
33
36
|
segment,
|
|
34
37
|
checkoutId,
|
|
@@ -47,6 +50,7 @@ const ProductVariant: FC<ProductVariantProps> = ({
|
|
|
47
50
|
page: TrackingPage.ITEM,
|
|
48
51
|
country,
|
|
49
52
|
segment,
|
|
53
|
+
tradename,
|
|
50
54
|
checkoutId,
|
|
51
55
|
checkoutItemId: checkoutItem.id,
|
|
52
56
|
productVariantId: checkoutItem.productVariant.id,
|