@lookiero/checkout 3.6.0-beta.4 → 3.6.0-beta.5

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.
@@ -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: "host-select-return-question-item", 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: "option-return-question-item", 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: "textarea-return-question-item", value: feedback, multiline: true, onChange: handleOnChange }));
12
12
  };
13
13
  export { TextareaReturnQuestionItem };
@@ -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 };
@@ -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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lookiero/checkout",
3
- "version": "3.6.0-beta.4",
3
+ "version": "3.6.0-beta.5",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [