@lookiero/checkout 14.8.5 → 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/metro.config.js +8 -14
- package/package.json +22 -19
- package/src/infrastructure/domain/checkoutItem/react/useReturnCheckoutItem.test.ts +16 -0
- 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 -3
- package/src/infrastructure/ui/views/item/components/productVariantSlider/__snapshots__/ProductVariantSlider.test.tsx.snap +26 -34
- 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/item/views/productVariant/__snapshots__/ProductVariant.test.tsx.snap +78 -102
- package/src/infrastructure/ui/views/return/components/returnQuestionsForm/ReturnQuestionsForm.tsx +2 -2
- package/src/infrastructure/ui/views/shared/components/productVariant/__snapshots__/ProductVariant.test.tsx.snap +20 -28
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/CheckoutItemsTabs.test.tsx +0 -1
- package/src/infrastructure/ui/views/summaryTabs/components/checkoutItemsTabs/__snapshots__/CheckoutItemsTabs.test.tsx.snap +40 -56
- 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 = "
|
|
2
|
-
export declare const RELEASE = "checkout@
|
|
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 = "
|
|
2
|
-
export const RELEASE = "checkout@
|
|
1
|
+
export const VERSION = "15.0.1";
|
|
2
|
+
export const RELEASE = "checkout@15.0.1";
|
package/metro.config.js
CHANGED
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
// Learn more https://docs.expo.io/guides/customizing-metro
|
|
2
|
-
const {
|
|
3
|
-
const path = require(
|
|
4
|
-
|
|
5
|
-
const {
|
|
6
|
-
withSentryConfig
|
|
7
|
-
} = require("@sentry/react-native/metro");
|
|
2
|
+
const { getSentryExpoConfig } = require("@sentry/react-native/metro");
|
|
3
|
+
const path = require("path");
|
|
8
4
|
|
|
9
5
|
// Find the project and workspace directories
|
|
10
6
|
const projectRoot = __dirname;
|
|
11
7
|
// This can be replaced with `find-yarn-workspace-root`
|
|
12
|
-
const monorepoRoot = path.resolve(projectRoot,
|
|
8
|
+
const monorepoRoot = path.resolve(projectRoot, "../..");
|
|
13
9
|
|
|
14
|
-
const config =
|
|
10
|
+
const config = getSentryExpoConfig(__dirname);
|
|
15
11
|
|
|
16
12
|
// 1. Watch all files within the monorepo
|
|
17
|
-
config.watchFolders = [monorepoRoot];
|
|
13
|
+
config.watchFolders = [...config.watchFolders, projectRoot, monorepoRoot];
|
|
18
14
|
// 2. Let Metro know where to resolve packages and in what order
|
|
19
15
|
config.resolver.nodeModulesPaths = [
|
|
20
|
-
path.resolve(projectRoot,
|
|
21
|
-
path.resolve(monorepoRoot,
|
|
16
|
+
path.resolve(projectRoot, "node_modules"),
|
|
17
|
+
path.resolve(monorepoRoot, "node_modules"),
|
|
22
18
|
];
|
|
23
19
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
module.exports = withSentryConfig(config);
|
|
20
|
+
module.exports = config;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lookiero/checkout",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "15.0.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"sideEffects": "false",
|
|
@@ -19,28 +19,32 @@
|
|
|
19
19
|
"eas:all": "eas build -p all -e test"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@expo/metro-runtime": "
|
|
22
|
+
"@expo/metro-runtime": "~6.1.2",
|
|
23
23
|
"@lookiero/messaging": "^8.1.1",
|
|
24
24
|
"@lookiero/messaging-react": "^8.1.1",
|
|
25
25
|
"@lookiero/sty-psp-ab-testing": "^0.4",
|
|
26
|
-
"@lookiero/sty-psp-expo-config": "^
|
|
26
|
+
"@lookiero/sty-psp-expo-config": "^3.0",
|
|
27
27
|
"@lookiero/sty-psp-http": "^2.1",
|
|
28
28
|
"@lookiero/sty-psp-i18n": "^2.1",
|
|
29
29
|
"@lookiero/sty-psp-locale": "^2.1",
|
|
30
|
-
"@lookiero/sty-psp-logging": "^2.
|
|
31
|
-
"@lookiero/sty-psp-notifications": "^2.
|
|
32
|
-
"@lookiero/sty-psp-react-native": "^
|
|
30
|
+
"@lookiero/sty-psp-logging": "^2.3",
|
|
31
|
+
"@lookiero/sty-psp-notifications": "^2.22",
|
|
32
|
+
"@lookiero/sty-psp-react-native": "^3.0",
|
|
33
33
|
"@lookiero/sty-psp-segment": "^0.1",
|
|
34
34
|
"@lookiero/sty-psp-storage": "^1.1",
|
|
35
|
-
"@lookiero/sty-psp-tracking": "^2.
|
|
36
|
-
"@lookiero/sty-psp-ui": "^
|
|
37
|
-
"@lookiero/sty-psp-ui-settings": "^1.
|
|
35
|
+
"@lookiero/sty-psp-tracking": "^2.5",
|
|
36
|
+
"@lookiero/sty-psp-ui": "^5.1",
|
|
37
|
+
"@lookiero/sty-psp-ui-settings": "^1.7",
|
|
38
38
|
"@lookiero/sty-psp-units": "^0.1",
|
|
39
39
|
"@lookiero/sty-psp-uuid": "^0.2",
|
|
40
40
|
"@lookiero/sty-sp-tradename": "^1.0",
|
|
41
|
-
"@sentry/react-native": "
|
|
42
|
-
"react
|
|
43
|
-
"react-native
|
|
41
|
+
"@sentry/react-native": "~7.2.0",
|
|
42
|
+
"react": "19.1.0",
|
|
43
|
+
"react-native": "0.81.5",
|
|
44
|
+
"react-native-keyboard-controller": "~1.18.5",
|
|
45
|
+
"react-native-reanimated": "~4.1.1",
|
|
46
|
+
"react-native-svg": "15.12.1",
|
|
47
|
+
"react-native-worklets": "0.5.1",
|
|
44
48
|
"tiny-invariant": "^1.3.1"
|
|
45
49
|
},
|
|
46
50
|
"devDependencies": {
|
|
@@ -52,7 +56,7 @@
|
|
|
52
56
|
"@lookiero/sty-psp-prettier-config": "*",
|
|
53
57
|
"@lookiero/sty-psp-scripts": "*",
|
|
54
58
|
"@lookiero/sty-psp-typescript": "*",
|
|
55
|
-
"@react-native-async-storage/async-storage": "2.
|
|
59
|
+
"@react-native-async-storage/async-storage": "2.2.0",
|
|
56
60
|
"@react-native/assets-registry": "^0.79.2",
|
|
57
61
|
"@remix-run/router": ">=1.10",
|
|
58
62
|
"@testing-library/react-native": ">=13",
|
|
@@ -66,10 +70,9 @@
|
|
|
66
70
|
"http-proxy-middleware": "^2.0.9",
|
|
67
71
|
"jest-mock-extended": ">=3",
|
|
68
72
|
"jest-when": ">=3",
|
|
69
|
-
"react-native-gesture-handler": "~2.
|
|
73
|
+
"react-native-gesture-handler": "~2.28.0",
|
|
70
74
|
"react-native-get-random-values": "~1.11.0",
|
|
71
|
-
"react-native-
|
|
72
|
-
"react-native-safe-area-context": "5.4.0",
|
|
75
|
+
"react-native-safe-area-context": "~5.6.0",
|
|
73
76
|
"react-router-dom": "6.30.3",
|
|
74
77
|
"react-router-native": "6.30.3"
|
|
75
78
|
},
|
|
@@ -82,13 +85,13 @@
|
|
|
82
85
|
"@lookiero/i18n-react": ">=3",
|
|
83
86
|
"@lookiero/payments-front": ">=9",
|
|
84
87
|
"apollo-boost": "0.4.4",
|
|
85
|
-
"expo": ">=
|
|
88
|
+
"expo": ">=54",
|
|
86
89
|
"expo-font": ">=12",
|
|
87
90
|
"react": ">=19",
|
|
88
|
-
"react-native": ">=0.
|
|
91
|
+
"react-native": ">=0.81",
|
|
89
92
|
"react-native-gesture-handler": ">=2.24",
|
|
90
93
|
"react-native-get-random-values": ">=1.11",
|
|
91
|
-
"react-native-reanimated": ">=
|
|
94
|
+
"react-native-reanimated": ">=4",
|
|
92
95
|
"react-native-safe-area-context": ">=5.4",
|
|
93
96
|
"react-router-dom": ">=6.14",
|
|
94
97
|
"react-router-native": ">=6.14",
|
|
@@ -9,9 +9,11 @@ import { MESSAGING_CONTEXT_ID } from "../../../delivery/baseBootstrap";
|
|
|
9
9
|
import { useReturnCheckoutItem as sut } from "./useReturnCheckoutItem";
|
|
10
10
|
|
|
11
11
|
const mockCreateToastNotification = jest.fn();
|
|
12
|
+
const mockClearNotifications = jest.fn();
|
|
12
13
|
jest.mock("@lookiero/sty-psp-notifications", () => ({
|
|
13
14
|
...jest.requireActual("@lookiero/sty-psp-notifications"),
|
|
14
15
|
useCreateToastNotification: () => [mockCreateToastNotification],
|
|
16
|
+
useClearNotifications: () => [mockClearNotifications],
|
|
15
17
|
}));
|
|
16
18
|
|
|
17
19
|
const checkoutItemId = "6248e14a-a269-4259-838b-39f493f30769";
|
|
@@ -38,7 +40,21 @@ const { Component: Messaging } = bootstrap({ id: MESSAGING_CONTEXT_ID })
|
|
|
38
40
|
.command(RETURN_CHECKOUT_ITEM, mockReturnCheckoutItemHandler, {})(get, save)
|
|
39
41
|
.build();
|
|
40
42
|
|
|
43
|
+
beforeAll(() => {
|
|
44
|
+
jest.useFakeTimers();
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
afterAll(() => {
|
|
48
|
+
jest.useRealTimers();
|
|
49
|
+
});
|
|
50
|
+
|
|
41
51
|
describe("useReturnCheckoutItem integration hook", () => {
|
|
52
|
+
beforeEach(() => {
|
|
53
|
+
logger.captureException.mockClear();
|
|
54
|
+
mockCreateToastNotification.mockClear();
|
|
55
|
+
mockClearNotifications.mockClear();
|
|
56
|
+
});
|
|
57
|
+
|
|
42
58
|
it("returns success as the status when 'return' succeeds", async () => {
|
|
43
59
|
mockReturnCheckoutItemHandler.mockImplementation(() => () => ({ domainEvents: [] }));
|
|
44
60
|
const { result } = renderHook(() => sut({ checkoutItemId, logger }), { wrapper: Messaging });
|
|
@@ -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
|
{
|
|
@@ -21,13 +21,14 @@ beforeAll(() => {
|
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
afterAll(() => {
|
|
24
|
-
jest.runOnlyPendingTimers();
|
|
25
24
|
jest.useRealTimers();
|
|
26
25
|
});
|
|
27
26
|
|
|
28
27
|
describe("ProductVariantSlider", () => {
|
|
29
28
|
test("matches the snapshot", async () => {
|
|
30
|
-
const { findByTestId, toJSON } = render(
|
|
29
|
+
const { findByTestId, toJSON } = render(
|
|
30
|
+
<ProductVariantSlider availableHeight={400} producVariantMedia={producVariantMedia} />,
|
|
31
|
+
);
|
|
31
32
|
|
|
32
33
|
fireEvent(await findByTestId("carousel-layout"), "layout", {
|
|
33
34
|
nativeEvent: { layout: { width: 300, height: 400 } },
|
|
@@ -38,7 +39,7 @@ describe("ProductVariantSlider", () => {
|
|
|
38
39
|
|
|
39
40
|
test("renders correctly", async () => {
|
|
40
41
|
const { findByTestId, findAllByTestId } = render(
|
|
41
|
-
<ProductVariantSlider producVariantMedia={producVariantMedia} onChanged={mockOnChanged} />,
|
|
42
|
+
<ProductVariantSlider availableHeight={400} producVariantMedia={producVariantMedia} onChanged={mockOnChanged} />,
|
|
42
43
|
);
|
|
43
44
|
|
|
44
45
|
fireEvent(await findByTestId("carousel-layout"), "layout", {
|
|
@@ -156,20 +156,16 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
|
|
|
156
156
|
collapsable={false}
|
|
157
157
|
duration={1200}
|
|
158
158
|
style={
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
},
|
|
170
|
-
],
|
|
171
|
-
},
|
|
172
|
-
]
|
|
159
|
+
{
|
|
160
|
+
"height": "100%",
|
|
161
|
+
"left": 0,
|
|
162
|
+
"transform": [
|
|
163
|
+
{
|
|
164
|
+
"translateX": -375,
|
|
165
|
+
},
|
|
166
|
+
],
|
|
167
|
+
"width": "100%",
|
|
168
|
+
}
|
|
173
169
|
}
|
|
174
170
|
>
|
|
175
171
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -317,20 +313,16 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
|
|
|
317
313
|
collapsable={false}
|
|
318
314
|
duration={1200}
|
|
319
315
|
style={
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
},
|
|
331
|
-
],
|
|
332
|
-
},
|
|
333
|
-
]
|
|
316
|
+
{
|
|
317
|
+
"height": "100%",
|
|
318
|
+
"left": 0,
|
|
319
|
+
"transform": [
|
|
320
|
+
{
|
|
321
|
+
"translateX": -375,
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
"width": "100%",
|
|
325
|
+
}
|
|
334
326
|
}
|
|
335
327
|
>
|
|
336
328
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -471,9 +463,9 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
|
|
|
471
463
|
"marginHorizontal": 3,
|
|
472
464
|
},
|
|
473
465
|
{
|
|
474
|
-
"height":
|
|
475
|
-
"opacity":
|
|
476
|
-
"width":
|
|
466
|
+
"height": 0,
|
|
467
|
+
"opacity": 0,
|
|
468
|
+
"width": 0,
|
|
477
469
|
},
|
|
478
470
|
{
|
|
479
471
|
"borderRadius": 8,
|
|
@@ -527,9 +519,9 @@ exports[`ProductVariantSlider matches the snapshot 1`] = `
|
|
|
527
519
|
"marginHorizontal": 3,
|
|
528
520
|
},
|
|
529
521
|
{
|
|
530
|
-
"height":
|
|
531
|
-
"opacity": 0
|
|
532
|
-
"width":
|
|
522
|
+
"height": 0,
|
|
523
|
+
"opacity": 0,
|
|
524
|
+
"width": 0,
|
|
533
525
|
},
|
|
534
526
|
{
|
|
535
527
|
"borderRadius": 8,
|
|
@@ -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,
|
|
@@ -167,20 +167,16 @@ exports[`ItemActions component matches the snapshot for a KEPT checkoutItem 1`]
|
|
|
167
167
|
collapsable={false}
|
|
168
168
|
duration={1200}
|
|
169
169
|
style={
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
},
|
|
181
|
-
],
|
|
182
|
-
},
|
|
183
|
-
]
|
|
170
|
+
{
|
|
171
|
+
"height": "100%",
|
|
172
|
+
"left": 0,
|
|
173
|
+
"transform": [
|
|
174
|
+
{
|
|
175
|
+
"translateX": -375,
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
"width": "100%",
|
|
179
|
+
}
|
|
184
180
|
}
|
|
185
181
|
>
|
|
186
182
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -328,20 +324,16 @@ exports[`ItemActions component matches the snapshot for a KEPT checkoutItem 1`]
|
|
|
328
324
|
collapsable={false}
|
|
329
325
|
duration={1200}
|
|
330
326
|
style={
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
},
|
|
342
|
-
],
|
|
343
|
-
},
|
|
344
|
-
]
|
|
327
|
+
{
|
|
328
|
+
"height": "100%",
|
|
329
|
+
"left": 0,
|
|
330
|
+
"transform": [
|
|
331
|
+
{
|
|
332
|
+
"translateX": -375,
|
|
333
|
+
},
|
|
334
|
+
],
|
|
335
|
+
"width": "100%",
|
|
336
|
+
}
|
|
345
337
|
}
|
|
346
338
|
>
|
|
347
339
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -482,9 +474,9 @@ exports[`ItemActions component matches the snapshot for a KEPT checkoutItem 1`]
|
|
|
482
474
|
"marginHorizontal": 3,
|
|
483
475
|
},
|
|
484
476
|
{
|
|
485
|
-
"height":
|
|
486
|
-
"opacity":
|
|
487
|
-
"width":
|
|
477
|
+
"height": 0,
|
|
478
|
+
"opacity": 0,
|
|
479
|
+
"width": 0,
|
|
488
480
|
},
|
|
489
481
|
{
|
|
490
482
|
"borderRadius": 8,
|
|
@@ -538,9 +530,9 @@ exports[`ItemActions component matches the snapshot for a KEPT checkoutItem 1`]
|
|
|
538
530
|
"marginHorizontal": 3,
|
|
539
531
|
},
|
|
540
532
|
{
|
|
541
|
-
"height":
|
|
542
|
-
"opacity": 0
|
|
543
|
-
"width":
|
|
533
|
+
"height": 0,
|
|
534
|
+
"opacity": 0,
|
|
535
|
+
"width": 0,
|
|
544
536
|
},
|
|
545
537
|
{
|
|
546
538
|
"borderRadius": 8,
|
|
@@ -851,20 +843,16 @@ exports[`ItemActions component matches the snapshot for a REPLACED checkoutItem
|
|
|
851
843
|
collapsable={false}
|
|
852
844
|
duration={1200}
|
|
853
845
|
style={
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
},
|
|
865
|
-
],
|
|
866
|
-
},
|
|
867
|
-
]
|
|
846
|
+
{
|
|
847
|
+
"height": "100%",
|
|
848
|
+
"left": 0,
|
|
849
|
+
"transform": [
|
|
850
|
+
{
|
|
851
|
+
"translateX": -375,
|
|
852
|
+
},
|
|
853
|
+
],
|
|
854
|
+
"width": "100%",
|
|
855
|
+
}
|
|
868
856
|
}
|
|
869
857
|
>
|
|
870
858
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -1012,20 +1000,16 @@ exports[`ItemActions component matches the snapshot for a REPLACED checkoutItem
|
|
|
1012
1000
|
collapsable={false}
|
|
1013
1001
|
duration={1200}
|
|
1014
1002
|
style={
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
},
|
|
1026
|
-
],
|
|
1027
|
-
},
|
|
1028
|
-
]
|
|
1003
|
+
{
|
|
1004
|
+
"height": "100%",
|
|
1005
|
+
"left": 0,
|
|
1006
|
+
"transform": [
|
|
1007
|
+
{
|
|
1008
|
+
"translateX": -375,
|
|
1009
|
+
},
|
|
1010
|
+
],
|
|
1011
|
+
"width": "100%",
|
|
1012
|
+
}
|
|
1029
1013
|
}
|
|
1030
1014
|
>
|
|
1031
1015
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -1166,9 +1150,9 @@ exports[`ItemActions component matches the snapshot for a REPLACED checkoutItem
|
|
|
1166
1150
|
"marginHorizontal": 3,
|
|
1167
1151
|
},
|
|
1168
1152
|
{
|
|
1169
|
-
"height":
|
|
1170
|
-
"opacity":
|
|
1171
|
-
"width":
|
|
1153
|
+
"height": 0,
|
|
1154
|
+
"opacity": 0,
|
|
1155
|
+
"width": 0,
|
|
1172
1156
|
},
|
|
1173
1157
|
{
|
|
1174
1158
|
"borderRadius": 8,
|
|
@@ -1222,9 +1206,9 @@ exports[`ItemActions component matches the snapshot for a REPLACED checkoutItem
|
|
|
1222
1206
|
"marginHorizontal": 3,
|
|
1223
1207
|
},
|
|
1224
1208
|
{
|
|
1225
|
-
"height":
|
|
1226
|
-
"opacity": 0
|
|
1227
|
-
"width":
|
|
1209
|
+
"height": 0,
|
|
1210
|
+
"opacity": 0,
|
|
1211
|
+
"width": 0,
|
|
1228
1212
|
},
|
|
1229
1213
|
{
|
|
1230
1214
|
"borderRadius": 8,
|
|
@@ -1535,20 +1519,16 @@ exports[`ItemActions component matches the snapshot for an INITIAL checkoutItem
|
|
|
1535
1519
|
collapsable={false}
|
|
1536
1520
|
duration={1200}
|
|
1537
1521
|
style={
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
},
|
|
1549
|
-
],
|
|
1550
|
-
},
|
|
1551
|
-
]
|
|
1522
|
+
{
|
|
1523
|
+
"height": "100%",
|
|
1524
|
+
"left": 0,
|
|
1525
|
+
"transform": [
|
|
1526
|
+
{
|
|
1527
|
+
"translateX": -375,
|
|
1528
|
+
},
|
|
1529
|
+
],
|
|
1530
|
+
"width": "100%",
|
|
1531
|
+
}
|
|
1552
1532
|
}
|
|
1553
1533
|
>
|
|
1554
1534
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -1696,20 +1676,16 @@ exports[`ItemActions component matches the snapshot for an INITIAL checkoutItem
|
|
|
1696
1676
|
collapsable={false}
|
|
1697
1677
|
duration={1200}
|
|
1698
1678
|
style={
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
},
|
|
1710
|
-
],
|
|
1711
|
-
},
|
|
1712
|
-
]
|
|
1679
|
+
{
|
|
1680
|
+
"height": "100%",
|
|
1681
|
+
"left": 0,
|
|
1682
|
+
"transform": [
|
|
1683
|
+
{
|
|
1684
|
+
"translateX": -375,
|
|
1685
|
+
},
|
|
1686
|
+
],
|
|
1687
|
+
"width": "100%",
|
|
1688
|
+
}
|
|
1713
1689
|
}
|
|
1714
1690
|
>
|
|
1715
1691
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -1850,9 +1826,9 @@ exports[`ItemActions component matches the snapshot for an INITIAL checkoutItem
|
|
|
1850
1826
|
"marginHorizontal": 3,
|
|
1851
1827
|
},
|
|
1852
1828
|
{
|
|
1853
|
-
"height":
|
|
1854
|
-
"opacity":
|
|
1855
|
-
"width":
|
|
1829
|
+
"height": 0,
|
|
1830
|
+
"opacity": 0,
|
|
1831
|
+
"width": 0,
|
|
1856
1832
|
},
|
|
1857
1833
|
{
|
|
1858
1834
|
"borderRadius": 8,
|
|
@@ -1906,9 +1882,9 @@ exports[`ItemActions component matches the snapshot for an INITIAL checkoutItem
|
|
|
1906
1882
|
"marginHorizontal": 3,
|
|
1907
1883
|
},
|
|
1908
1884
|
{
|
|
1909
|
-
"height":
|
|
1910
|
-
"opacity": 0
|
|
1911
|
-
"width":
|
|
1885
|
+
"height": 0,
|
|
1886
|
+
"opacity": 0,
|
|
1887
|
+
"width": 0,
|
|
1912
1888
|
},
|
|
1913
1889
|
{
|
|
1914
1890
|
"borderRadius": 8,
|
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"
|
|
@@ -129,20 +129,16 @@ exports[`ProductVariant component matches the snapshot for a non-unique size: no
|
|
|
129
129
|
collapsable={false}
|
|
130
130
|
duration={1200}
|
|
131
131
|
style={
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
],
|
|
144
|
-
},
|
|
145
|
-
]
|
|
132
|
+
{
|
|
133
|
+
"height": "100%",
|
|
134
|
+
"left": 0,
|
|
135
|
+
"transform": [
|
|
136
|
+
{
|
|
137
|
+
"translateX": -375,
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
"width": "100%",
|
|
141
|
+
}
|
|
146
142
|
}
|
|
147
143
|
>
|
|
148
144
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -487,20 +483,16 @@ exports[`ProductVariant component matches the snapshot for an unique size: uniqu
|
|
|
487
483
|
collapsable={false}
|
|
488
484
|
duration={1200}
|
|
489
485
|
style={
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
},
|
|
501
|
-
],
|
|
502
|
-
},
|
|
503
|
-
]
|
|
486
|
+
{
|
|
487
|
+
"height": "100%",
|
|
488
|
+
"left": 0,
|
|
489
|
+
"transform": [
|
|
490
|
+
{
|
|
491
|
+
"translateX": -375,
|
|
492
|
+
},
|
|
493
|
+
],
|
|
494
|
+
"width": "100%",
|
|
495
|
+
}
|
|
504
496
|
}
|
|
505
497
|
>
|
|
506
498
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -414,20 +414,16 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
414
414
|
collapsable={false}
|
|
415
415
|
duration={1200}
|
|
416
416
|
style={
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
},
|
|
428
|
-
],
|
|
429
|
-
},
|
|
430
|
-
]
|
|
417
|
+
{
|
|
418
|
+
"height": "100%",
|
|
419
|
+
"left": 0,
|
|
420
|
+
"transform": [
|
|
421
|
+
{
|
|
422
|
+
"translateX": -375,
|
|
423
|
+
},
|
|
424
|
+
],
|
|
425
|
+
"width": "100%",
|
|
426
|
+
}
|
|
431
427
|
}
|
|
432
428
|
>
|
|
433
429
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -744,20 +740,16 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
744
740
|
collapsable={false}
|
|
745
741
|
duration={1200}
|
|
746
742
|
style={
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
},
|
|
758
|
-
],
|
|
759
|
-
},
|
|
760
|
-
]
|
|
743
|
+
{
|
|
744
|
+
"height": "100%",
|
|
745
|
+
"left": 0,
|
|
746
|
+
"transform": [
|
|
747
|
+
{
|
|
748
|
+
"translateX": -375,
|
|
749
|
+
},
|
|
750
|
+
],
|
|
751
|
+
"width": "100%",
|
|
752
|
+
}
|
|
761
753
|
}
|
|
762
754
|
>
|
|
763
755
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -1119,20 +1111,16 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
1119
1111
|
collapsable={false}
|
|
1120
1112
|
duration={1200}
|
|
1121
1113
|
style={
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
},
|
|
1133
|
-
],
|
|
1134
|
-
},
|
|
1135
|
-
]
|
|
1114
|
+
{
|
|
1115
|
+
"height": "100%",
|
|
1116
|
+
"left": 0,
|
|
1117
|
+
"transform": [
|
|
1118
|
+
{
|
|
1119
|
+
"translateX": -375,
|
|
1120
|
+
},
|
|
1121
|
+
],
|
|
1122
|
+
"width": "100%",
|
|
1123
|
+
}
|
|
1136
1124
|
}
|
|
1137
1125
|
>
|
|
1138
1126
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -1449,20 +1437,16 @@ exports[`CheckoutItemTabs component matches the snapshot 1`] = `
|
|
|
1449
1437
|
collapsable={false}
|
|
1450
1438
|
duration={1200}
|
|
1451
1439
|
style={
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
},
|
|
1463
|
-
],
|
|
1464
|
-
},
|
|
1465
|
-
]
|
|
1440
|
+
{
|
|
1441
|
+
"height": "100%",
|
|
1442
|
+
"left": 0,
|
|
1443
|
+
"transform": [
|
|
1444
|
+
{
|
|
1445
|
+
"translateX": -375,
|
|
1446
|
+
},
|
|
1447
|
+
],
|
|
1448
|
+
"width": "100%",
|
|
1449
|
+
}
|
|
1466
1450
|
}
|
|
1467
1451
|
>
|
|
1468
1452
|
<ViewManagerAdapter_ExpoLinearGradient
|
|
@@ -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
|
},
|