@lookiero/checkout 15.0.0 → 15.0.1
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/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.js +2 -2
- package/dist/src/version.d.ts +2 -2
- package/dist/src/version.js +2 -2
- package/package.json +3 -3
- package/src/infrastructure/projection/checkoutFeedback/react/useViewCheckoutFeedbackDefinitionByCheckoutId.test.ts +1 -0
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.test.tsx +3 -0
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestions.test.tsx +3 -0
- package/src/infrastructure/ui/components/organisms/checkoutQuestions/components/hostSelectCheckoutQuestionItem/HostSelectCheckoutQuestionItem.test.tsx +4 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestion.test.tsx +1 -0
- package/src/infrastructure/ui/components/organisms/returnQuestions/ReturnQuestions.test.tsx +1 -0
- package/src/infrastructure/ui/components/organisms/returnQuestions/behaviors/useReturnQuestionItem.test.tsx +4 -0
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/hostDefaultReturnQuestionItem/HostDefaultReturnQuestionItem.test.tsx +1 -1
- package/src/infrastructure/ui/components/organisms/returnQuestions/components/returnQuestionFeedbackItem/ReturnQuestionFeedbackItem.test.tsx +2 -2
- package/src/infrastructure/ui/hooks/useCheckoutFlow.test.tsx +2 -14
- package/src/infrastructure/ui/routing/CheckoutMiddleware.test.tsx +1 -0
- package/src/infrastructure/ui/views/checkout/Checkout.test.tsx +0 -12
- package/src/infrastructure/ui/views/item/components/getOutOfCheckoutModal/__snapshots__/GetOutOfCheckoutModal.test.tsx.snap +1 -10
- package/src/infrastructure/ui/views/item/components/productVariantSlider/ProductVariantSlider.test.tsx +4 -2
- package/src/infrastructure/ui/views/item/components/sizeWithoutStockModal/__snapshots__/SizeWithoutStockModal.test.tsx.snap +1 -10
- package/src/infrastructure/ui/views/item/views/itemWithCustomerDecission/ItemWithCustomerDecission.test.tsx +1 -0
- package/src/infrastructure/ui/views/item/views/itemWithoutCustomerDecission/ItemWithoutCustomerDecission.test.tsx +1 -0
- package/src/infrastructure/ui/views/item/views/productVariant/ProductVariant.test.tsx +1 -0
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +2 -2
- package/src/projection/checkoutFeedback/viewCheckoutFeedbackDefinitionByCheckoutId.test.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PortalHost } from "@gorhom/portal";
|
|
2
2
|
import React, { useCallback, useMemo } from "react";
|
|
3
3
|
import { Platform, View } from "react-native";
|
|
4
|
-
import { KeyboardAwareScrollView } from "react-native-keyboard-
|
|
4
|
+
import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
|
|
5
5
|
import { generatePath, useNavigate } from "react-router-native";
|
|
6
6
|
import { Box, Layout as AuroraLayout, Spinner } from "@lookiero/aurora";
|
|
7
7
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
@@ -111,7 +111,7 @@ const ReturnQuestionsForm = ({ checkout, checkoutItem, country, layout: Layout,
|
|
|
111
111
|
header: style.header,
|
|
112
112
|
} },
|
|
113
113
|
React.createElement(ProductVariantPreview, { country: country, item: checkoutItem }),
|
|
114
|
-
React.createElement(KeyboardAwareScrollView, {
|
|
114
|
+
React.createElement(KeyboardAwareScrollView, { bottomOffset: Platform.OS === "android" ? 10 : 120, keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, testID: "return-questions-form" },
|
|
115
115
|
React.createElement(View, { style: style.background },
|
|
116
116
|
React.createElement(AuroraLayout, { fullWidth: !isDektopScreen, style: [style.layout, isDektopScreen ? style.desktopLayoutSpacing : undefined] },
|
|
117
117
|
React.createElement(Box, { size: { L: "2/3" } },
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "15.0.
|
|
2
|
-
export declare const RELEASE = "checkout@15.0.
|
|
1
|
+
export declare const VERSION = "15.0.1";
|
|
2
|
+
export declare const RELEASE = "checkout@15.0.1";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = "15.0.
|
|
2
|
-
export const RELEASE = "checkout@15.0.
|
|
1
|
+
export const VERSION = "15.0.1";
|
|
2
|
+
export const RELEASE = "checkout@15.0.1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": "false",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@lookiero/sty-psp-segment": "^0.1",
|
|
34
34
|
"@lookiero/sty-psp-storage": "^1.1",
|
|
35
35
|
"@lookiero/sty-psp-tracking": "^2.5",
|
|
36
|
-
"@lookiero/sty-psp-ui": "^5.
|
|
36
|
+
"@lookiero/sty-psp-ui": "^5.1",
|
|
37
37
|
"@lookiero/sty-psp-ui-settings": "^1.7",
|
|
38
38
|
"@lookiero/sty-psp-units": "^0.1",
|
|
39
39
|
"@lookiero/sty-psp-uuid": "^0.2",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@sentry/react-native": "~7.2.0",
|
|
42
42
|
"react": "19.1.0",
|
|
43
43
|
"react-native": "0.81.5",
|
|
44
|
-
"react-native-keyboard-
|
|
44
|
+
"react-native-keyboard-controller": "~1.18.5",
|
|
45
45
|
"react-native-reanimated": "~4.1.1",
|
|
46
46
|
"react-native-svg": "15.12.1",
|
|
47
47
|
"react-native-worklets": "0.5.1",
|
|
@@ -22,6 +22,7 @@ const checkoutFeedbackDefinition: CheckoutFeedbackQuestionProjection[] = [
|
|
|
22
22
|
{
|
|
23
23
|
id: "01975911-d451-7651-b1ae-3f977928e8a2",
|
|
24
24
|
type: CheckoutFeedbackQuestionType.HOST_TEXTAREA,
|
|
25
|
+
translationKey: "checkout.feedback.question.textarea",
|
|
25
26
|
metadata: {
|
|
26
27
|
showCondition: [],
|
|
27
28
|
},
|
package/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestion.test.tsx
CHANGED
|
@@ -26,16 +26,19 @@ const checkoutQuestion: CheckoutFeedbackQuestionProjection = {
|
|
|
26
26
|
id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
|
|
27
27
|
translationKey: "checkout.checkout_question.icon.bad",
|
|
28
28
|
type: CheckoutFeedbackQuestionType.ICON,
|
|
29
|
+
metadata: { icon: "checkout_feedback.icon.bad" },
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
id: "85e84a77-461c-41e6-8544-95b5294d0b80",
|
|
32
33
|
translationKey: "checkout.checkout_question.icon.regular",
|
|
33
34
|
type: CheckoutFeedbackQuestionType.ICON,
|
|
35
|
+
metadata: { icon: "checkout_feedback.icon.regular" },
|
|
34
36
|
},
|
|
35
37
|
{
|
|
36
38
|
id: "29441d25-8d9f-471e-a13e-a03f61c88091",
|
|
37
39
|
translationKey: "checkout.checkout_question.icon.good",
|
|
38
40
|
type: CheckoutFeedbackQuestionType.ICON,
|
|
41
|
+
metadata: { icon: "checkout_feedback.icon.good" },
|
|
39
42
|
},
|
|
40
43
|
],
|
|
41
44
|
};
|
package/src/infrastructure/ui/components/organisms/checkoutQuestions/CheckoutQuestions.test.tsx
CHANGED
|
@@ -14,16 +14,19 @@ const checkoutQuestions: CheckoutFeedbackQuestionProjection[] = [
|
|
|
14
14
|
id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
|
|
15
15
|
translationKey: "checkout.checkout_question.icon.bad",
|
|
16
16
|
type: CheckoutFeedbackQuestionType.ICON,
|
|
17
|
+
metadata: { icon: "checkout_feedback.icon.bad" },
|
|
17
18
|
},
|
|
18
19
|
{
|
|
19
20
|
id: "85e84a77-461c-41e6-8544-95b5294d0b80",
|
|
20
21
|
translationKey: "checkout.checkout_question.icon.regular",
|
|
21
22
|
type: CheckoutFeedbackQuestionType.ICON,
|
|
23
|
+
metadata: { icon: "checkout_feedback.icon.regular" },
|
|
22
24
|
},
|
|
23
25
|
{
|
|
24
26
|
id: "29441d25-8d9f-471e-a13e-a03f61c88091",
|
|
25
27
|
translationKey: "checkout.checkout_question.icon.good",
|
|
26
28
|
type: CheckoutFeedbackQuestionType.ICON,
|
|
29
|
+
metadata: { icon: "checkout_feedback.icon.good" },
|
|
27
30
|
},
|
|
28
31
|
];
|
|
29
32
|
|
|
@@ -19,16 +19,19 @@ const checkoutQuestion: CheckoutFeedbackQuestionProjection = {
|
|
|
19
19
|
id: "68c0bb98-b00a-4b86-af43-528fe903cb69",
|
|
20
20
|
translationKey: "checkout.checkout_question.icon.bad",
|
|
21
21
|
type: CheckoutFeedbackQuestionType.ICON,
|
|
22
|
+
metadata: { icon: "checkout_feedback.icon.bad" },
|
|
22
23
|
},
|
|
23
24
|
{
|
|
24
25
|
id: "85e84a77-461c-41e6-8544-95b5294d0b80",
|
|
25
26
|
translationKey: "checkout.checkout_question.icon.regular",
|
|
26
27
|
type: CheckoutFeedbackQuestionType.ICON,
|
|
28
|
+
metadata: { icon: "checkout_feedback.icon.regular" },
|
|
27
29
|
},
|
|
28
30
|
{
|
|
29
31
|
id: "29441d25-8d9f-471e-a13e-a03f61c88091",
|
|
30
32
|
translationKey: "checkout.checkout_question.icon.good",
|
|
31
33
|
type: CheckoutFeedbackQuestionType.ICON,
|
|
34
|
+
metadata: { icon: "checkout_feedback.icon.good" },
|
|
32
35
|
},
|
|
33
36
|
],
|
|
34
37
|
};
|
|
@@ -47,7 +50,7 @@ describe("HostSelectCheckoutQuestionItem component (CheckoutQuestions organism)"
|
|
|
47
50
|
it("renders correctly", async () => {
|
|
48
51
|
const { getByText } = renderHostSelectCheckoutQuestionItem();
|
|
49
52
|
|
|
50
|
-
expect(getByText(checkoutQuestion.translationKey)).toBeTruthy();
|
|
53
|
+
expect(getByText(checkoutQuestion.translationKey!)).toBeTruthy();
|
|
51
54
|
expect(getByText("HostSelectCheckoutQuestionItem children")).toBeTruthy();
|
|
52
55
|
});
|
|
53
56
|
});
|
|
@@ -48,6 +48,7 @@ const returnQuestionItems: ReturnQuestionItems = {
|
|
|
48
48
|
[ReturnQuestionType.HOST_TEXTAREA]: Item,
|
|
49
49
|
[ReturnQuestionType.HOST_SELECT]: Item,
|
|
50
50
|
[ReturnQuestionType.HOST_STACK]: Item,
|
|
51
|
+
[ReturnQuestionType.HOST_RADIO_GROUP]: Item,
|
|
51
52
|
[ReturnQuestionType.OPTION]: Item,
|
|
52
53
|
[ReturnQuestionType.TEXTAREA]: Item,
|
|
53
54
|
};
|
|
@@ -36,6 +36,7 @@ const returnQuestionItems: ReturnQuestionItems = {
|
|
|
36
36
|
[ReturnQuestionType.HOST_TEXTAREA]: Item,
|
|
37
37
|
[ReturnQuestionType.HOST_SELECT]: Item,
|
|
38
38
|
[ReturnQuestionType.HOST_STACK]: Item,
|
|
39
|
+
[ReturnQuestionType.HOST_RADIO_GROUP]: Item,
|
|
39
40
|
[ReturnQuestionType.OPTION]: Item,
|
|
40
41
|
[ReturnQuestionType.TEXTAREA]: Item,
|
|
41
42
|
};
|
|
@@ -14,6 +14,8 @@ const hostSelectText = "host select";
|
|
|
14
14
|
const HostSelect: ReturnQuestionItem<ReturnQuestionType.HOST_SELECT> = () => <Text>{hostSelectText}</Text>;
|
|
15
15
|
const hostStackText = "host stack";
|
|
16
16
|
const HostStack: ReturnQuestionItem<ReturnQuestionType.HOST_STACK> = () => <Text>{hostStackText}</Text>;
|
|
17
|
+
const hostRadioGroupText = "host radio group";
|
|
18
|
+
const HostRadioGroup: ReturnQuestionItem<ReturnQuestionType.HOST_RADIO_GROUP> = () => <Text>{hostRadioGroupText}</Text>;
|
|
17
19
|
const optionText = "option";
|
|
18
20
|
const Option: ReturnQuestionItem<ReturnQuestionType.OPTION> = () => <Text>{optionText}</Text>;
|
|
19
21
|
const textareaText = "textarea";
|
|
@@ -24,6 +26,7 @@ const returnQuestionItems: ReturnQuestionItems = {
|
|
|
24
26
|
[ReturnQuestionType.HOST_TEXTAREA]: HostDefault,
|
|
25
27
|
[ReturnQuestionType.HOST_SELECT]: HostSelect,
|
|
26
28
|
[ReturnQuestionType.HOST_STACK]: HostStack,
|
|
29
|
+
[ReturnQuestionType.HOST_RADIO_GROUP]: HostRadioGroup,
|
|
27
30
|
[ReturnQuestionType.OPTION]: Option,
|
|
28
31
|
[ReturnQuestionType.TEXTAREA]: Textarea,
|
|
29
32
|
};
|
|
@@ -33,6 +36,7 @@ const scenarios: [ReturnQuestionType, string][] = [
|
|
|
33
36
|
[ReturnQuestionType.HOST_TEXTAREA, hostDefaultText],
|
|
34
37
|
[ReturnQuestionType.HOST_SELECT, hostSelectText],
|
|
35
38
|
[ReturnQuestionType.HOST_STACK, hostStackText],
|
|
39
|
+
[ReturnQuestionType.HOST_RADIO_GROUP, hostRadioGroupText],
|
|
36
40
|
[ReturnQuestionType.OPTION, optionText],
|
|
37
41
|
[ReturnQuestionType.TEXTAREA, textareaText],
|
|
38
42
|
];
|
|
@@ -44,7 +44,7 @@ describe("HostDefaultReturnQuestionItem component (ReturnQuestions organism)", (
|
|
|
44
44
|
</HostDefaultReturnQuestionItem>,
|
|
45
45
|
);
|
|
46
46
|
|
|
47
|
-
expect(getByText(returnQuestion.translationKey)).toBeTruthy();
|
|
47
|
+
expect(getByText(returnQuestion.translationKey!)).toBeTruthy();
|
|
48
48
|
expect(getByText("HostDefaultReturnQuestionItem children")).toBeTruthy();
|
|
49
49
|
});
|
|
50
50
|
});
|
|
@@ -68,7 +68,7 @@ describe("ReturnQuestionFeedbackItem component (ReturnQuestions organism)", () =
|
|
|
68
68
|
/>,
|
|
69
69
|
);
|
|
70
70
|
|
|
71
|
-
expect(getByText(returnQuestion.translationKey)).toBeTruthy();
|
|
71
|
+
expect(getByText(returnQuestion.translationKey!)).toBeTruthy();
|
|
72
72
|
expect(getByText("size_large / size_overall")).toBeTruthy();
|
|
73
73
|
});
|
|
74
74
|
|
|
@@ -80,7 +80,7 @@ describe("ReturnQuestionFeedbackItem component (ReturnQuestions organism)", () =
|
|
|
80
80
|
/>,
|
|
81
81
|
);
|
|
82
82
|
|
|
83
|
-
expect(getByText(returnQuestionUnanswered.translationKey)).toBeTruthy();
|
|
83
|
+
expect(getByText(returnQuestionUnanswered.translationKey!)).toBeTruthy();
|
|
84
84
|
expect(getByText(I18nMessages.FEEDBACK_UNANSWERED)).toBeTruthy();
|
|
85
85
|
});
|
|
86
86
|
});
|
|
@@ -7,8 +7,6 @@ import { Segment } from "@lookiero/sty-psp-segment";
|
|
|
7
7
|
import { CheckoutItemStatus } from "../../../domain/checkoutItem/model/checkoutItem";
|
|
8
8
|
import { CheckoutBookingProjection } from "../../../projection/checkoutBooking/checkoutBooking";
|
|
9
9
|
import { Customer } from "../../../projection/customer/customer";
|
|
10
|
-
import { OrderProjection } from "../../../projection/order/order";
|
|
11
|
-
import { SubscriptionProjection } from "../../../projection/subscription/subscription";
|
|
12
10
|
import { useSubmitCheckout } from "../../domain/checkout/react/useSubmitCheckout";
|
|
13
11
|
import { checkout } from "../../projection/checkout/checkout.mock";
|
|
14
12
|
import { useViewIsSizeChangeEnabledByCheckoutId } from "../../projection/checkout/react/useViewIsSizeChangeEnabledByCheckoutId";
|
|
@@ -32,13 +30,7 @@ const mockCheckout = checkout({
|
|
|
32
30
|
{ status: CheckoutItemStatus.RETURNED },
|
|
33
31
|
],
|
|
34
32
|
});
|
|
35
|
-
const order: OrderProjection = {
|
|
36
|
-
orderNumber: 12345,
|
|
37
|
-
isFirstOrder: false,
|
|
38
|
-
coupon: null,
|
|
39
|
-
};
|
|
40
33
|
const mockPricing = mockCheckoutPricingProjection;
|
|
41
|
-
const subscription: SubscriptionProjection = "o";
|
|
42
34
|
const customerId = "a8fff6d7-708c-41a7-b42a-58c5706d33df";
|
|
43
35
|
const basePath = "/checkout";
|
|
44
36
|
const country = Country.ES;
|
|
@@ -114,9 +106,7 @@ describe("useCheckoutFlow custom hook", () => {
|
|
|
114
106
|
setTimeout(() => onSuccess(), 1000);
|
|
115
107
|
});
|
|
116
108
|
|
|
117
|
-
const { result } = renderHook(() =>
|
|
118
|
-
sut({ checkout: mockCheckout, order, subscription, getAuthToken, onSuccess: mockOnSuccess }),
|
|
119
|
-
);
|
|
109
|
+
const { result } = renderHook(() => sut({ checkout: mockCheckout, getAuthToken, onSuccess: mockOnSuccess }));
|
|
120
110
|
|
|
121
111
|
let checkoutFlow: () => void, status, paymentFlowComponent;
|
|
122
112
|
|
|
@@ -167,9 +157,7 @@ describe("useCheckoutFlow custom hook", () => {
|
|
|
167
157
|
setTimeout(() => onError({ metadata: null }), 1000);
|
|
168
158
|
});
|
|
169
159
|
|
|
170
|
-
const { result } = renderHook(() =>
|
|
171
|
-
sut({ checkout: mockCheckout, order, subscription, getAuthToken, onSuccess: mockOnSuccess }),
|
|
172
|
-
);
|
|
160
|
+
const { result } = renderHook(() => sut({ checkout: mockCheckout, getAuthToken, onSuccess: mockOnSuccess }));
|
|
173
161
|
|
|
174
162
|
let checkoutFlow: () => void, status, paymentFlowComponent;
|
|
175
163
|
|
|
@@ -8,8 +8,6 @@ import { DummyLayout } from "@lookiero/sty-psp-ui";
|
|
|
8
8
|
import { Tradename } from "@lookiero/sty-sp-tradename";
|
|
9
9
|
import { CheckoutItemStatus } from "../../../../domain/checkoutItem/model/checkoutItem";
|
|
10
10
|
import { Customer } from "../../../../projection/customer/customer";
|
|
11
|
-
import { OrderProjection } from "../../../../projection/order/order";
|
|
12
|
-
import { SubscriptionProjection } from "../../../../projection/subscription/subscription";
|
|
13
11
|
import { checkout } from "../../../projection/checkout/checkout.mock";
|
|
14
12
|
import { useViewFirstAvailableCheckoutByCustomerId } from "../../../projection/checkout/react/useViewFirstAvailableCheckoutByCustomerId";
|
|
15
13
|
import { mockCheckoutPricingProjection } from "../../../projection/pricing/pricing.mock";
|
|
@@ -38,12 +36,6 @@ const mockCheckout = checkout({
|
|
|
38
36
|
{ status: CheckoutItemStatus.REPLACED },
|
|
39
37
|
],
|
|
40
38
|
});
|
|
41
|
-
const order: OrderProjection = {
|
|
42
|
-
orderNumber: 12345,
|
|
43
|
-
isFirstOrder: false,
|
|
44
|
-
coupon: null,
|
|
45
|
-
};
|
|
46
|
-
const subscription: SubscriptionProjection = "o";
|
|
47
39
|
const mockUseRedirect = jest.fn(() => ({ returnUrl: "https://web2.dev.aws.lookiero.es/user/" }));
|
|
48
40
|
|
|
49
41
|
const mockOnSuccess = jest.fn();
|
|
@@ -95,8 +87,6 @@ describe("Checkout view", () => {
|
|
|
95
87
|
<Checkout
|
|
96
88
|
getAuthToken={getAuthToken}
|
|
97
89
|
layout={DummyLayout}
|
|
98
|
-
order={order}
|
|
99
|
-
subscription={subscription}
|
|
100
90
|
useRedirect={mockUseRedirect}
|
|
101
91
|
onCheckoutFlowSuccess={mockOnSuccess}
|
|
102
92
|
/>,
|
|
@@ -144,8 +134,6 @@ describe("Checkout view", () => {
|
|
|
144
134
|
<Checkout
|
|
145
135
|
getAuthToken={getAuthToken}
|
|
146
136
|
layout={DummyLayout}
|
|
147
|
-
order={order}
|
|
148
|
-
subscription={subscription}
|
|
149
137
|
useRedirect={mockUseRedirect}
|
|
150
138
|
onCheckoutFlowSuccess={mockOnSuccess}
|
|
151
139
|
/>,
|
|
@@ -148,16 +148,7 @@ exports[`GetOutOfCheckoutModal component matches the snapshot 1`] = `
|
|
|
148
148
|
]
|
|
149
149
|
}
|
|
150
150
|
>
|
|
151
|
-
<View
|
|
152
|
-
contentInset={
|
|
153
|
-
{
|
|
154
|
-
"bottom": 0,
|
|
155
|
-
"top": 0,
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
keyboardShouldPersistTaps="handled"
|
|
159
|
-
showsVerticalScrollIndicator={false}
|
|
160
|
-
>
|
|
151
|
+
<View>
|
|
161
152
|
<View
|
|
162
153
|
style={
|
|
163
154
|
{
|
|
@@ -26,7 +26,9 @@ afterAll(() => {
|
|
|
26
26
|
|
|
27
27
|
describe("ProductVariantSlider", () => {
|
|
28
28
|
test("matches the snapshot", async () => {
|
|
29
|
-
const { findByTestId, toJSON } = render(
|
|
29
|
+
const { findByTestId, toJSON } = render(
|
|
30
|
+
<ProductVariantSlider availableHeight={400} producVariantMedia={producVariantMedia} />,
|
|
31
|
+
);
|
|
30
32
|
|
|
31
33
|
fireEvent(await findByTestId("carousel-layout"), "layout", {
|
|
32
34
|
nativeEvent: { layout: { width: 300, height: 400 } },
|
|
@@ -37,7 +39,7 @@ describe("ProductVariantSlider", () => {
|
|
|
37
39
|
|
|
38
40
|
test("renders correctly", async () => {
|
|
39
41
|
const { findByTestId, findAllByTestId } = render(
|
|
40
|
-
<ProductVariantSlider producVariantMedia={producVariantMedia} onChanged={mockOnChanged} />,
|
|
42
|
+
<ProductVariantSlider availableHeight={400} producVariantMedia={producVariantMedia} onChanged={mockOnChanged} />,
|
|
41
43
|
);
|
|
42
44
|
|
|
43
45
|
fireEvent(await findByTestId("carousel-layout"), "layout", {
|
|
@@ -236,16 +236,7 @@ exports[`SizeWithoutStockModal component matches the snapshot 1`] = `
|
|
|
236
236
|
</Text>
|
|
237
237
|
</View>
|
|
238
238
|
</View>
|
|
239
|
-
<View
|
|
240
|
-
contentInset={
|
|
241
|
-
{
|
|
242
|
-
"bottom": 0,
|
|
243
|
-
"top": 0,
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
keyboardShouldPersistTaps="handled"
|
|
247
|
-
showsVerticalScrollIndicator={false}
|
|
248
|
-
>
|
|
239
|
+
<View>
|
|
249
240
|
<View
|
|
250
241
|
style={
|
|
251
242
|
{
|
|
@@ -50,6 +50,7 @@ const renderItemWithCustomerDecission: RenderItemWithCustomerDecissionFunction =
|
|
|
50
50
|
<ItemWithCustomerDecission
|
|
51
51
|
checkoutId={checkoutId}
|
|
52
52
|
checkoutItem={checkoutItem}
|
|
53
|
+
headerHeight={0}
|
|
53
54
|
returnQuestions={mockReturnQuestions}
|
|
54
55
|
currentProductVariant={{
|
|
55
56
|
id: checkoutItem.productVariant.id,
|
|
@@ -60,6 +60,7 @@ const renderItemWithoutCustomerDecission: RenderItemWithoutCustomerDecissionFunc
|
|
|
60
60
|
bookedProductsVariants={bookedProductVariants}
|
|
61
61
|
checkoutId={checkoutId}
|
|
62
62
|
checkoutItem={checkoutItem}
|
|
63
|
+
headerHeight={0}
|
|
63
64
|
currentProductVariant={{
|
|
64
65
|
id: checkoutItem.productVariant.id,
|
|
65
66
|
size: checkoutItem.productVariant.size,
|
package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PortalHost } from "@gorhom/portal";
|
|
2
2
|
import React, { FC, useCallback, useMemo } from "react";
|
|
3
3
|
import { Platform, View } from "react-native";
|
|
4
|
-
import { KeyboardAwareScrollView } from "react-native-keyboard-
|
|
4
|
+
import { KeyboardAwareScrollView } from "react-native-keyboard-controller";
|
|
5
5
|
import { generatePath, useNavigate } from "react-router-native";
|
|
6
6
|
import { Box, Layout as AuroraLayout, Spinner } from "@lookiero/aurora";
|
|
7
7
|
import { useI18nMessage } from "@lookiero/i18n-react";
|
|
@@ -164,7 +164,7 @@ const ReturnQuestionsForm: FC<ReturnQuestionsFormProps> = ({
|
|
|
164
164
|
<ProductVariantPreview country={country} item={checkoutItem} />
|
|
165
165
|
|
|
166
166
|
<KeyboardAwareScrollView
|
|
167
|
-
|
|
167
|
+
bottomOffset={Platform.OS === "android" ? 10 : 120}
|
|
168
168
|
keyboardShouldPersistTaps="handled"
|
|
169
169
|
showsVerticalScrollIndicator={false}
|
|
170
170
|
testID="return-questions-form"
|
|
@@ -20,6 +20,7 @@ const checkoutFeedbackDefinition: CheckoutFeedbackQuestionProjection[] = [
|
|
|
20
20
|
{
|
|
21
21
|
id: "01975911-d451-7651-b1ae-3f977928e8a2",
|
|
22
22
|
type: CheckoutFeedbackQuestionType.HOST_TEXTAREA,
|
|
23
|
+
translationKey: "checkout.feedback.question.textarea",
|
|
23
24
|
metadata: {
|
|
24
25
|
showCondition: [],
|
|
25
26
|
},
|