@lookiero/checkout 3.6.0-beta.0 → 3.6.0-beta.10
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/infrastructure/ui/components/organisms/checkoutQuestions/components/iconCheckoutQuestionItem/IconCheckoutQuestionItem.js +2 -2
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/hostSelectReturnQuestionItem/HostSelectReturnQuestionItem.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/optionReturnQuestionItem/OptionReturnQuestionItem.js +1 -1
- package/dist/infrastructure/ui/components/organisms/returnQuestions/components/textareaReturnQuestionItem/TextareaReturnQuestionItem.js +1 -1
- package/dist/infrastructure/ui/views/feedback/components/checkoutQuestionsForm/CheckoutQuestionsForm.js +1 -1
- package/dist/infrastructure/ui/views/item/components/itemActions/ItemActions.js +1 -1
- package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js +1 -1
- package/dist/infrastructure/ui/views/summary/components/pricing/Pricing.js +2 -2
- package/dist/shared/notifications/infrastructure/ui/components/modalNotifications/ModalNotificationItem.js +1 -1
- package/dist/shared/ui/components/atoms/input/Input.js +1 -1
- package/dist/shared/ui/components/molecules/selectField/SelectField.js +1 -1
- package/package.json +1 -1
|
@@ -21,7 +21,7 @@ const IconCheckoutQuestionItem = ({ checkoutQuestion, checkoutQuestionParentId,
|
|
|
21
21
|
const { feedback, onChange } = useCheckoutQuestionFeedbackForId({ id: checkoutQuestionParentId });
|
|
22
22
|
const handleOnPress = useCallback(() => onChange({ checkoutQuestionId: checkoutQuestionParentId, checkoutQuestionFeedback: checkoutQuestion.id }), [onChange, checkoutQuestion.id, checkoutQuestionParentId]);
|
|
23
23
|
invariant(Icon, "CheckoutQuestion icon does not exist");
|
|
24
|
-
return (React.createElement(Pressable, { onPress: handleOnPress },
|
|
25
|
-
React.createElement(Icon, { fill: feedback === checkoutQuestion.id ? colorAccent : "none", style: style.icon
|
|
24
|
+
return (React.createElement(Pressable, { testID: checkoutQuestion.name, onPress: handleOnPress },
|
|
25
|
+
React.createElement(Icon, { fill: feedback === checkoutQuestion.id ? colorAccent : "none", style: style.icon })));
|
|
26
26
|
};
|
|
27
27
|
export { IconCheckoutQuestionItem };
|
|
@@ -31,7 +31,7 @@ const HostSelectReturnQuestionItem = ({ returnQuestion, children, portalHostName
|
|
|
31
31
|
// deepestReturnQuestionWithFeedback needs to be as a dependency in order to be re-evaluated whenever it changes
|
|
32
32
|
}, [handleOnModalClose, deepestReturnQuestionWithFeedback, isLeaf]);
|
|
33
33
|
return (React.createElement(React.Fragment, null,
|
|
34
|
-
React.createElement(TouchableHighlight, { style: style.container, underlayColor: containerUnderlayColor, onPress: handleOnPress },
|
|
34
|
+
React.createElement(TouchableHighlight, { style: style.container, testID: returnQuestion.name, underlayColor: containerUnderlayColor, onPress: handleOnPress },
|
|
35
35
|
React.createElement(View, { pointerEvents: "none" },
|
|
36
36
|
React.createElement(InputField, { editable: false, icon: "arrow-down", label: placeholderText, value: inputValue }))),
|
|
37
37
|
React.createElement(Modal, { portalHostName: portalHostName, visible: modalVisible, header: deepestReturnQuestionWithFeedback && (React.createElement(ButtonIcon, { name: "arrow-left", testID: "modal-back-button", onPress: handleOnBackButtonPress })), scroll: true, showCloseButton: true, onClose: handleOnModalClose },
|
|
@@ -8,7 +8,7 @@ const OptionReturnQuestionItem = ({ returnQuestion, returnQuestionParentId, }) =
|
|
|
8
8
|
const { onChange } = useReturnQuestionFeedbackForId({ id: returnQuestionParentId });
|
|
9
9
|
const optionText = useI18nMessage({ id: returnQuestion.name });
|
|
10
10
|
const handleOnPress = useCallback(() => onChange({ returnQuestionId: returnQuestionParentId, returnQuestionFeedback: returnQuestion.id }), [onChange, returnQuestion.id, returnQuestionParentId]);
|
|
11
|
-
return (React.createElement(TouchableHighlight, { style: style.container, underlayColor: containerUnderlayColor, onPress: handleOnPress },
|
|
11
|
+
return (React.createElement(TouchableHighlight, { style: style.container, testID: returnQuestion.name, underlayColor: containerUnderlayColor, onPress: handleOnPress },
|
|
12
12
|
React.createElement(Text, { level: 3, style: style.text }, optionText)));
|
|
13
13
|
};
|
|
14
14
|
export { OptionReturnQuestionItem };
|
|
@@ -8,6 +8,6 @@ const TextareaReturnQuestionItem = ({ returnQuestion, returnQuestionParentId, })
|
|
|
8
8
|
const placeholderText = useMemo(() => (returnQuestion.placeholder ? formatMessage({ id: returnQuestion.placeholder }) : ""), [formatMessage, returnQuestion.placeholder]);
|
|
9
9
|
const { feedback, onChange } = useReturnQuestionFeedbackForId({ id: returnQuestionParentId });
|
|
10
10
|
const handleOnChange = useCallback((value) => onChange({ returnQuestionId: returnQuestionParentId, returnQuestionFeedback: value }), [onChange, returnQuestionParentId]);
|
|
11
|
-
return (React.createElement(InputField, { label: placeholderText, minHeight: TEXTAREA_MIN_HEIGHT, placeholder: placeholderText, value: feedback, multiline: true, onChange: handleOnChange }));
|
|
11
|
+
return (React.createElement(InputField, { label: placeholderText, minHeight: TEXTAREA_MIN_HEIGHT, placeholder: placeholderText, testID: returnQuestion.name, value: feedback, multiline: true, onChange: handleOnChange }));
|
|
12
12
|
};
|
|
13
13
|
export { TextareaReturnQuestionItem };
|
|
@@ -32,6 +32,6 @@ const CheckoutQuestionsForm = ({ checkoutQuestions, submitButtonDisabled, onSubm
|
|
|
32
32
|
return (React.createElement(React.Fragment, null,
|
|
33
33
|
React.createElement(CheckoutQuestionItemProvider, { checkoutQuestionItems: checkoutQuestionItems },
|
|
34
34
|
React.createElement(CheckoutQuestions, { checkoutQuestions: filteredCheckoutQuestions })),
|
|
35
|
-
React.createElement(Button, { busy: submitButtonDisabled, style: style.button, onPress: handlePress }, buttonText)));
|
|
35
|
+
React.createElement(Button, { busy: submitButtonDisabled, style: style.button, testID: "checkout-feedback-button", onPress: handlePress }, buttonText)));
|
|
36
36
|
};
|
|
37
37
|
export { CheckoutQuestionsForm };
|
|
@@ -29,7 +29,7 @@ const ItemActions = ({ productVariants, currentProductVariant, country, onSizeSe
|
|
|
29
29
|
inputField: { input: disabledSizeSelector && style.inputDisabled },
|
|
30
30
|
}, onChange: onReplace })),
|
|
31
31
|
React.createElement(View, { style: style.returnButtonContainer },
|
|
32
|
-
React.createElement(Button, { variant: BUTTON_VARIANT.SECONDARY, onPress: onReturn },
|
|
32
|
+
React.createElement(Button, { testID: "return-button", variant: BUTTON_VARIANT.SECONDARY, onPress: onReturn },
|
|
33
33
|
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, returnButtonText)))))));
|
|
34
34
|
};
|
|
35
35
|
export { ItemActions };
|
package/dist/infrastructure/ui/views/item/components/returnQuestionsForm/ReturnQuestionsForm.js
CHANGED
|
@@ -35,7 +35,7 @@ const ReturnQuestionsForm = ({ returnQuestions, visible, onSubmit, onClose }) =>
|
|
|
35
35
|
React.createElement(View, { style: style.returnQuestionsContainer },
|
|
36
36
|
React.createElement(Text, { level: 2, style: style.title }, titleText),
|
|
37
37
|
React.createElement(ReturnQuestions, { portalHostName: RETURN_QUESTION_FORM_PORTAL_HOST_NAME, returnQuestions: returnQuestions }),
|
|
38
|
-
React.createElement(Button, { style: style.submit, onPress: handleOnSubmit },
|
|
38
|
+
React.createElement(Button, { style: style.submit, testID: "return-questions-submit-button", onPress: handleOnSubmit },
|
|
39
39
|
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, submitButtonText))))));
|
|
40
40
|
};
|
|
41
41
|
export { ReturnQuestionsForm };
|
|
@@ -40,7 +40,7 @@ const Pricing = ({ pendingToPay, subtotal, balanceDiscount, discount, discountPe
|
|
|
40
40
|
totalCheckoutItemsKeptText),
|
|
41
41
|
React.createElement(Price, { price: pendingToPay, variant: "detail" })),
|
|
42
42
|
React.createElement(View, { style: style.collapsedContent },
|
|
43
|
-
React.createElement(Button, { busy: busy, small: true, onPress: onSubmit },
|
|
43
|
+
React.createElement(Button, { busy: busy, testID: "cta-confirm-checkout", small: true, onPress: onSubmit },
|
|
44
44
|
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, submitButtonText))))) : (React.createElement(animated.View, { style: { opacity: notCollapsedStyle.opacitiy } },
|
|
45
45
|
React.createElement(Row, { text: `${subtotalText} ${totalCheckoutItemsKeptText}` },
|
|
46
46
|
React.createElement(Price, { price: subtotal, variant: "subtotal" })),
|
|
@@ -52,6 +52,6 @@ const Pricing = ({ pendingToPay, subtotal, balanceDiscount, discount, discountPe
|
|
|
52
52
|
React.createElement(View, { style: style.divider }),
|
|
53
53
|
React.createElement(Row, { level: 2, text: totalText },
|
|
54
54
|
React.createElement(Price, { price: pendingToPay, variant: "total" })),
|
|
55
|
-
React.createElement(Button, { busy: busy, onPress: onSubmit }, submitButtonText)))));
|
|
55
|
+
React.createElement(Button, { busy: busy, testID: "cta-confirm-checkout", onPress: onSubmit }, submitButtonText)))));
|
|
56
56
|
};
|
|
57
57
|
export { Pricing };
|
|
@@ -26,7 +26,7 @@ const ModalNotificationItem = ({ visible, notification, onRemove, testID = "moda
|
|
|
26
26
|
React.createElement(View, { style: style.modal },
|
|
27
27
|
React.createElement(Text, { align: ALIGN.CENTER, level: 1, style: style.title }, titleText),
|
|
28
28
|
React.createElement(Text, { level: 3, style: style.description }, bodyText),
|
|
29
|
-
React.createElement(Button, { style: style.button, onPress: handleOnClose },
|
|
29
|
+
React.createElement(Button, { style: style.button, testID: "modal-notification-button", onPress: handleOnClose },
|
|
30
30
|
React.createElement(Text, { align: ALIGN.CENTER, level: 3, selectable: false, style: style.buttonText, action: true, upperCase: true }, acceptText)))));
|
|
31
31
|
};
|
|
32
32
|
export { ModalNotificationItem };
|
|
@@ -32,6 +32,6 @@ const Input = ({ minHeight = MIN_HEIGHT, maxHeight = MAX_HEIGHT, style: customSt
|
|
|
32
32
|
}, [maxHeight, minHeight, multiline]);
|
|
33
33
|
useLayoutEffect(handleOnContentSizeChangeWeb, [handleOnContentSizeChangeWeb, value]);
|
|
34
34
|
const textInputRef = useRef(null);
|
|
35
|
-
return (React.createElement(TextInput, {
|
|
35
|
+
return (React.createElement(TextInput, { ref: textInputRef, multiline: multiline, numberOfLines: !!multiline ? undefined : 1, placeholderTextColor: placeholderTextColor, style: [style.input, customStyle, { height }], testID: "input", textAlignVertical: "top", value: value, onChange: onChange, onContentSizeChange: handleOnContentSizeChange, ...restOfProps }));
|
|
36
36
|
};
|
|
37
37
|
export { Input };
|
|
@@ -22,7 +22,7 @@ const SelectField = ({ title, placeholder, value, options, style: customStyle, o
|
|
|
22
22
|
React.createElement(Modal, { testID: "select-field-modal", visible: modalVisible, scroll: true, showCloseButton: true, onClose: handleOnModalClose },
|
|
23
23
|
React.createElement(View, { style: [style.modalContent, customStyle?.modalContent] },
|
|
24
24
|
title && (React.createElement(Text, { level: 2, style: style.modalTitle }, title)),
|
|
25
|
-
options.map(({ label, value: optionValue }) => (React.createElement(TouchableHighlight, { key: optionValue, disabled: value === optionValue, style: [style.option, customStyle?.option], underlayColor: colorGrayscaleS, onPress: value !== optionValue ? () => handleOnPressOption(optionValue) : undefined },
|
|
25
|
+
options.map(({ label, value: optionValue }) => (React.createElement(TouchableHighlight, { key: optionValue, disabled: value === optionValue, style: [style.option, customStyle?.option], testID: optionValue, underlayColor: colorGrayscaleS, onPress: value !== optionValue ? () => handleOnPressOption(optionValue) : undefined },
|
|
26
26
|
React.createElement(Text, { color: value === optionValue ? COLOR.GRAYSCALE_M : COLOR.CONTENT, level: 3, style: [style.optionText, customStyle?.optionText] }, label))))))));
|
|
27
27
|
};
|
|
28
28
|
export { SelectField };
|