@dxc-technology/halstack-react 0.0.0-4e9134c → 0.0.0-4fd9593
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/ThemeContext.js +2 -2
- package/dist/accordion/Accordion.js +32 -30
- package/dist/alert/Alert.js +8 -4
- package/dist/box/Box.js +1 -9
- package/dist/checkbox/Checkbox.js +5 -5
- package/dist/chip/Chip.js +21 -25
- package/dist/common/variables.js +284 -269
- package/dist/date/Date.js +3 -3
- package/dist/dialog/Dialog.js +7 -2
- package/dist/dropdown/Dropdown.js +6 -6
- package/dist/footer/Footer.js +19 -31
- package/dist/header/Header.js +17 -25
- package/dist/heading/Heading.js +1 -5
- package/dist/input-text/InputText.js +92 -57
- package/dist/link/Link.js +2 -2
- package/dist/paginator/Paginator.js +10 -4
- package/dist/select/Select.js +78 -56
- package/dist/sidenav/Sidenav.js +6 -12
- package/dist/spinner/Spinner.js +20 -16
- package/dist/table/Table.js +5 -1
- package/dist/tag/Tag.js +13 -5
- package/dist/textarea/Textarea.js +26 -22
- package/dist/toggle-group/ToggleGroup.js +1 -1
- package/dist/upload/buttons-upload/ButtonsUpload.js +5 -1
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +10 -6
- package/dist/upload/file-upload/FileToUpload.js +1 -1
- package/dist/upload/transaction/Transaction.js +13 -9
- package/dist/upload/transactions/Transactions.js +11 -11
- package/dist/wizard/Wizard.js +8 -8
- package/package.json +1 -1
- package/test/NewTextarea.test.js +0 -1
- package/test/Select.test.js +4 -7
|
@@ -189,7 +189,7 @@ var ToggleGroup = _styledComponents["default"].div(_templateObject(), function (
|
|
|
189
189
|
var ToggleGroupContainer = _styledComponents["default"].div(_templateObject2());
|
|
190
190
|
|
|
191
191
|
var ToggleContainer = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
192
|
-
return "\n background-color: ".concat(props.selected ? props.disabled ? props.theme.disabledSelectedBackgroundColor : props.theme.selectedBackgroundColor : props.disabled ? props.theme.disabledUnselectedBackgroundColor : props.theme.unselectedBackgroundColor, ";\n &:focus {\n outline: ").concat(props.theme.focusColor, " auto 1px;\n }\n border-radius: ").concat(props.isFirst ? "4px 0 0 4px" : props.isLast ? "0 4px 4px 0" : "0", ";\n color: ").concat(props.selected ? props.theme.selectedFontColor : props.theme.unselectedFontColor, ";\n padding: ").concat(props.isIcon ? "".concat(props.theme.iconPaddingTop, " ").concat(props.theme.iconPaddingRight, " ").concat(props.theme.iconPaddingBottom, " ").concat(props.theme.iconPaddingLeft) : "".concat(props.theme.labelPaddingTop, " ").concat(props.theme.labelPaddingRight, " ").concat(props.theme.labelPaddingBottom, " ").concat(props.theme.labelPaddingLeft), ";\n ").concat(!props.disabled ? "&:hover {\n background-color: ".concat(props.selected ? props.theme.
|
|
192
|
+
return "\n background-color: ".concat(props.selected ? props.disabled ? props.theme.disabledSelectedBackgroundColor : props.theme.selectedBackgroundColor : props.disabled ? props.theme.disabledUnselectedBackgroundColor : props.theme.unselectedBackgroundColor, ";\n &:focus {\n outline: ").concat(props.theme.focusColor, " auto 1px;\n }\n border-radius: ").concat(props.isFirst ? "4px 0 0 4px" : props.isLast ? "0 4px 4px 0" : "0", ";\n color: ").concat(props.selected ? props.theme.selectedFontColor : props.theme.unselectedFontColor, ";\n padding: ").concat(props.isIcon ? "".concat(props.theme.iconPaddingTop, " ").concat(props.theme.iconPaddingRight, " ").concat(props.theme.iconPaddingBottom, " ").concat(props.theme.iconPaddingLeft) : "".concat(props.theme.labelPaddingTop, " ").concat(props.theme.labelPaddingRight, " ").concat(props.theme.labelPaddingBottom, " ").concat(props.theme.labelPaddingLeft), ";\n ").concat(!props.disabled ? "&:hover {\n background-color: ".concat(props.selected ? props.theme.selectedHoverBackgroundColor : props.theme.unselectedHoverBackgroundColor, ";\n color: ").concat(props.selected ? props.theme.selectedHoverFontColor : props.theme.unselectedHoverFontColor, " !important;\n }\n cursor: pointer;") : "color: ".concat(props.selected ? props.theme.disabledSelectedFontColor : props.theme.disabledUnselectedFontColor, " !important;\n cursor: not-allowed;"), "\n ");
|
|
193
193
|
});
|
|
194
194
|
|
|
195
195
|
var LabelContainer = _styledComponents["default"].span(_templateObject4(), function (props) {
|
|
@@ -25,6 +25,8 @@ var _dragDropIcon = _interopRequireDefault(require("./drag-drop-icon.svg"));
|
|
|
25
25
|
|
|
26
26
|
var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
|
|
27
27
|
|
|
28
|
+
var _BackgroundColorContext = require("../../BackgroundColorContext.js");
|
|
29
|
+
|
|
28
30
|
function _templateObject3() {
|
|
29
31
|
var data = (0, _taggedTemplateLiteral2["default"])(["\n background-color: ", ";\n mask: url(", ") no-repeat center;\n mask-size: ", ";\n height: ", ";\n width: ", ";\n margin-right: 5px;\n"]);
|
|
30
32
|
|
|
@@ -77,6 +79,8 @@ var DxcButtonsUpload = function DxcButtonsUpload(_ref) {
|
|
|
77
79
|
|
|
78
80
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
79
81
|
theme: colorsTheme.upload
|
|
82
|
+
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
83
|
+
color: colorsTheme.upload.backgroundColor
|
|
80
84
|
}, _react["default"].createElement(DXCButtonsUpload, null, _react["default"].createElement(DragAndDropLabel, null, _react["default"].createElement(DragAndDropIcon, null), "Drag and Drop area"), _react["default"].createElement(_Button["default"], {
|
|
81
85
|
margin: {
|
|
82
86
|
right: "small"
|
|
@@ -97,7 +101,7 @@ var DxcButtonsUpload = function DxcButtonsUpload(_ref) {
|
|
|
97
101
|
iconPosition: "after",
|
|
98
102
|
iconSrc: _uploadButton["default"],
|
|
99
103
|
onClick: onUpload
|
|
100
|
-
})));
|
|
104
|
+
}))));
|
|
101
105
|
};
|
|
102
106
|
|
|
103
107
|
DxcButtonsUpload.propTypes = {
|
|
@@ -29,6 +29,8 @@ var _Button = _interopRequireDefault(require("../../button/Button"));
|
|
|
29
29
|
|
|
30
30
|
var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
|
|
31
31
|
|
|
32
|
+
var _BackgroundColorContext = require("../../BackgroundColorContext.js");
|
|
33
|
+
|
|
32
34
|
function _templateObject11() {
|
|
33
35
|
var data = (0, _taggedTemplateLiteral2["default"])(["\n font-size: ", ";\n font-style: ", ";\n font-weight: ", ";\n text-transform: ", ";\n color: ", ";\n margin-bottom: 10px;\n"]);
|
|
34
36
|
|
|
@@ -206,6 +208,8 @@ var DxcDragAndDropArea = function DxcDragAndDropArea(_ref) {
|
|
|
206
208
|
|
|
207
209
|
return _react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
208
210
|
theme: colorsTheme.upload
|
|
211
|
+
}, _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
212
|
+
color: colorsTheme.upload.backgroundColor
|
|
209
213
|
}, _react["default"].createElement(DXCDragAndDrop, {
|
|
210
214
|
onDrop: handleDrop,
|
|
211
215
|
onDragEnter: handleDragIn,
|
|
@@ -237,7 +241,7 @@ var DxcDragAndDropArea = function DxcDragAndDropArea(_ref) {
|
|
|
237
241
|
style: {
|
|
238
242
|
display: "none"
|
|
239
243
|
}
|
|
240
|
-
})))), dragging && _react["default"].createElement(DragAndDropContentHover, null, _react["default"].createElement(DragAndDropTextHover, null, textHover), _react["default"].createElement(DragAndDropIconHover, null))));
|
|
244
|
+
})))), dragging && _react["default"].createElement(DragAndDropContentHover, null, _react["default"].createElement(DragAndDropTextHover, null, textHover), _react["default"].createElement(DragAndDropIconHover, null)))));
|
|
241
245
|
};
|
|
242
246
|
|
|
243
247
|
DxcDragAndDropArea.propTypes = {
|
|
@@ -288,15 +292,15 @@ var DragAndDropDescription = _styledComponents["default"].div(_templateObject7()
|
|
|
288
292
|
}, function (props) {
|
|
289
293
|
return props.theme.dragAndDropDescriptionFontWeight;
|
|
290
294
|
}, function (props) {
|
|
291
|
-
return props.theme.
|
|
295
|
+
return props.theme.dragAndDropDescriptionFontTextTransform;
|
|
292
296
|
}, function (props) {
|
|
293
|
-
return props.theme.
|
|
297
|
+
return props.theme.dragAndDropDescriptionFontColor;
|
|
294
298
|
});
|
|
295
299
|
|
|
296
300
|
var ButtonChooseFiles = _styledComponents["default"].div(_templateObject8());
|
|
297
301
|
|
|
298
302
|
var DragAndDropContentHover = _styledComponents["default"].div(_templateObject9(), function (props) {
|
|
299
|
-
return props.theme.
|
|
303
|
+
return props.theme.draggingStateBackgroundColor;
|
|
300
304
|
});
|
|
301
305
|
|
|
302
306
|
var DragAndDropIconHover = _styledComponents["default"].div(_templateObject10(), function (props) {
|
|
@@ -316,9 +320,9 @@ var DragAndDropTextHover = _styledComponents["default"].div(_templateObject11(),
|
|
|
316
320
|
}, function (props) {
|
|
317
321
|
return props.theme.dragAndDropDraggingStateFontWeight;
|
|
318
322
|
}, function (props) {
|
|
319
|
-
return props.theme.
|
|
323
|
+
return props.theme.dragAndDropDraggingStateFontTextTransform;
|
|
320
324
|
}, function (props) {
|
|
321
|
-
return props.theme.
|
|
325
|
+
return props.theme.dragAndDropDraggingStateFontColor;
|
|
322
326
|
});
|
|
323
327
|
|
|
324
328
|
var _default = DxcDragAndDropArea;
|
|
@@ -137,7 +137,7 @@ var DXCFileToUpload = _styledComponents["default"].div(_templateObject(), functi
|
|
|
137
137
|
}, function (props) {
|
|
138
138
|
return props.theme.fileUnderlineColor;
|
|
139
139
|
}, function (props) {
|
|
140
|
-
return props.theme.
|
|
140
|
+
return props.theme.hoverFileColor;
|
|
141
141
|
});
|
|
142
142
|
|
|
143
143
|
var FileContent = _styledComponents["default"].div(_templateObject2());
|
|
@@ -43,6 +43,8 @@ var _Spinner = _interopRequireDefault(require("../../spinner/Spinner"));
|
|
|
43
43
|
|
|
44
44
|
var _useTheme = _interopRequireDefault(require("../../useTheme.js"));
|
|
45
45
|
|
|
46
|
+
var _BackgroundColorContext = require("../../BackgroundColorContext.js");
|
|
47
|
+
|
|
46
48
|
function _templateObject5() {
|
|
47
49
|
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n width: 80%;\n"]);
|
|
48
50
|
|
|
@@ -113,11 +115,13 @@ var DxcTransaction = function DxcTransaction(_ref) {
|
|
|
113
115
|
}, _react["default"].createElement(FileImage, {
|
|
114
116
|
status: status,
|
|
115
117
|
img: icon
|
|
116
|
-
}), status === "processing" && _react["default"].createElement(
|
|
118
|
+
}), status === "processing" && _react["default"].createElement(FileData, null, _react["default"].createElement(FileName, null, name), _react["default"].createElement(_BackgroundColorContext.BackgroundColorProvider, {
|
|
119
|
+
color: colorsTheme.upload.backgroundColor
|
|
120
|
+
}, _react["default"].createElement(_Spinner["default"], {
|
|
117
121
|
mode: "small"
|
|
118
|
-
})) || status === "success" && _react["default"].createElement(
|
|
119
|
-
|
|
120
|
-
})) || status === "error" && _react["default"].createElement(
|
|
122
|
+
}))) || status === "success" && _react["default"].createElement(FileData, null, _react["default"].createElement(FileName, null, name), _react["default"].createElement(_Spinner["default"], {
|
|
123
|
+
mode: "small"
|
|
124
|
+
})) || status === "error" && _react["default"].createElement(FileData, null, _react["default"].createElement(_Tooltip["default"], {
|
|
121
125
|
title: message
|
|
122
126
|
}, _react["default"].createElement(FileName, null, name)), _react["default"].createElement(FileStatus, {
|
|
123
127
|
status: status
|
|
@@ -138,15 +142,15 @@ var DXCTransaction = _styledComponents["default"].div(_templateObject(), functio
|
|
|
138
142
|
});
|
|
139
143
|
|
|
140
144
|
var FileImage = _styledComponents["default"].div(_templateObject2(), function (props) {
|
|
141
|
-
return props.status === "error" && props.theme.errorColor || props.theme.
|
|
145
|
+
return props.status === "error" && props.theme.errorColor || props.theme.uploadedFileIconColor;
|
|
142
146
|
}, function (props) {
|
|
143
147
|
return props.img;
|
|
144
148
|
}, function (props) {
|
|
145
|
-
return "".concat(props.theme.
|
|
149
|
+
return "".concat(props.theme.uploadedFileIconSize, " ").concat(props.theme.uploadedFileIconSize);
|
|
146
150
|
}, function (props) {
|
|
147
|
-
return props.theme.
|
|
151
|
+
return props.theme.uploadedFileIconSize;
|
|
148
152
|
}, function (props) {
|
|
149
|
-
return props.theme.
|
|
153
|
+
return props.theme.uploadedFileIconSize;
|
|
150
154
|
});
|
|
151
155
|
|
|
152
156
|
var FileName = _styledComponents["default"].div(_templateObject3(), function (props) {
|
|
@@ -165,7 +169,7 @@ var FileStatus = _styledComponents["default"].div(_templateObject4(), function (
|
|
|
165
169
|
return props.status === "success" && "url('".concat(_successIcon["default"], "') no-repeat padding-box") || props.status === "error" && "url('".concat(_errorIcon["default"], "') no-repeat padding-box");
|
|
166
170
|
});
|
|
167
171
|
|
|
168
|
-
var
|
|
172
|
+
var FileData = _styledComponents["default"].div(_templateObject5());
|
|
169
173
|
|
|
170
174
|
var _default = DxcTransaction;
|
|
171
175
|
exports["default"] = _default;
|
|
@@ -107,31 +107,31 @@ var DXCTransactions = _styledComponents["default"].div(_templateObject(), functi
|
|
|
107
107
|
var TransactionsText = _styledComponents["default"].span(_templateObject2());
|
|
108
108
|
|
|
109
109
|
var TransactionsTitle = _styledComponents["default"].span(_templateObject3(), function (props) {
|
|
110
|
-
return props.theme.
|
|
110
|
+
return props.theme.uploadedFilesTitleFontSize;
|
|
111
111
|
}, function (props) {
|
|
112
|
-
return props.theme.
|
|
112
|
+
return props.theme.uploadedFilesTitleFontStyle;
|
|
113
113
|
}, function (props) {
|
|
114
|
-
return props.theme.
|
|
114
|
+
return props.theme.uploadedFilesTitleFontWeight;
|
|
115
115
|
}, function (props) {
|
|
116
|
-
return props.theme.
|
|
116
|
+
return props.theme.uploadedFilesTitleFontTextTransform;
|
|
117
117
|
}, function (props) {
|
|
118
|
-
return props.theme.
|
|
118
|
+
return props.theme.uploadedFilesTitleFontColor;
|
|
119
119
|
});
|
|
120
120
|
|
|
121
121
|
var TransactionsSubTitle = _styledComponents["default"].span(_templateObject4(), function (props) {
|
|
122
|
-
return props.theme.
|
|
122
|
+
return props.theme.uploadedFilesSubtitleFontSize;
|
|
123
123
|
}, function (props) {
|
|
124
|
-
return props.theme.
|
|
124
|
+
return props.theme.uploadedFilesSubtitleFontStyle;
|
|
125
125
|
}, function (props) {
|
|
126
|
-
return props.theme.
|
|
126
|
+
return props.theme.uploadedFilesSubtitleFontWeight;
|
|
127
127
|
}, function (props) {
|
|
128
|
-
return props.theme.
|
|
128
|
+
return props.theme.uploadedFilesSubtitleFontTextTransform;
|
|
129
129
|
}, function (props) {
|
|
130
|
-
return props.theme.
|
|
130
|
+
return props.theme.uploadedFilesSubtitleFontColor;
|
|
131
131
|
});
|
|
132
132
|
|
|
133
133
|
var TransactionsNumber = _styledComponents["default"].span(_templateObject5(), function (props) {
|
|
134
|
-
return props.theme.
|
|
134
|
+
return props.theme.uploadedFilesNumberFontWeight;
|
|
135
135
|
});
|
|
136
136
|
|
|
137
137
|
var _default = DxcTransactions;
|
package/dist/wizard/Wizard.js
CHANGED
|
@@ -238,10 +238,10 @@ var DxcWizard = function DxcWizard(_ref) {
|
|
|
238
238
|
src: _invalid_icon["default"]
|
|
239
239
|
}) : ""), step.label || step.description ? _react["default"].createElement(InfoContainer, null, step.label ? _react["default"].createElement(Label, {
|
|
240
240
|
disabled: step.disabled,
|
|
241
|
-
|
|
241
|
+
visited: i <= innerCurrent
|
|
242
242
|
}, step.label) : "", step.description ? _react["default"].createElement(Description, {
|
|
243
243
|
disabled: step.disabled,
|
|
244
|
-
|
|
244
|
+
visited: i <= innerCurrent
|
|
245
245
|
}, step.description) : "") : ""), i === steps.length - 1 ? "" : _react["default"].createElement(StepSeparator, {
|
|
246
246
|
mode: mode
|
|
247
247
|
}));
|
|
@@ -289,15 +289,15 @@ var Step = _styledComponents["default"].button(_templateObject3(), function (pro
|
|
|
289
289
|
var StepHeader = _styledComponents["default"].div(_templateObject4());
|
|
290
290
|
|
|
291
291
|
var IconContainer = _styledComponents["default"].div(_templateObject5(), function (props) {
|
|
292
|
-
return props.disabled ? props.theme.
|
|
292
|
+
return props.disabled ? props.theme.disabledCircleWidth : props.current ? props.theme.selectedCircleWidth : props.theme.circleWidth;
|
|
293
293
|
}, function (props) {
|
|
294
|
-
return props.disabled ? props.theme.
|
|
294
|
+
return props.disabled ? props.theme.disabledCircleHeight : props.current ? props.theme.selectedCircleHeight : props.theme.circleHeight;
|
|
295
295
|
}, function (props) {
|
|
296
|
-
return "\n ".concat(!props.current && !props.disabled ? "border: ".concat(props.theme.circleBorderThickness, " ").concat(props.theme.circleBorderStyle, " ").concat(props.theme.circleBorderColor, ";") : props.current ? "border: ".concat(props.theme.
|
|
296
|
+
return "\n ".concat(!props.current && !props.disabled ? "border: ".concat(props.theme.circleBorderThickness, " ").concat(props.theme.circleBorderStyle, " ").concat(props.theme.circleBorderColor, ";") : props.current ? "border: ".concat(props.theme.selectedCircleBorderThickness, " ").concat(props.theme.selectedCircleBorderStyle, " ").concat(props.theme.selectedCircleBorderColor, ";") : props.disabled ? "border: ".concat(props.theme.disabledCircleBorderThickness, " ").concat(props.theme.disabledCircleBorderStyle, " ").concat(props.theme.disabledCircleBorderColor, ";") : "", "\n background: ").concat(props.disabled ? "".concat(props.theme.disabledBackgroundColor) : props.current ? "".concat(props.theme.stepContainerSelectedBackgroundColor) : "".concat(props.theme.stepContainerBackgroundColor), ";\n ");
|
|
297
297
|
}, function (props) {
|
|
298
298
|
return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.current ? props.theme.stepContainerSelectedFontColor : props.theme.stepContainerFontColor, ";");
|
|
299
299
|
}, function (props) {
|
|
300
|
-
return !props.current && !props.disabled ? props.theme.circleBorderRadius : props.current ? props.theme.
|
|
300
|
+
return !props.current && !props.disabled ? props.theme.circleBorderRadius : props.current ? props.theme.selectedCircleBorderRadius : props.disabled ? props.theme.disabledCircleBorderRadius : "";
|
|
301
301
|
});
|
|
302
302
|
|
|
303
303
|
var Icon = _styledComponents["default"].img(_templateObject6(), function (props) {
|
|
@@ -354,7 +354,7 @@ var Label = _styledComponents["default"].p(_templateObject12(), function (props)
|
|
|
354
354
|
}, function (props) {
|
|
355
355
|
return props.theme.labelLetterSpacing;
|
|
356
356
|
}, function (props) {
|
|
357
|
-
return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.
|
|
357
|
+
return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.visited ? props.theme.visitedLabelFontColor : props.theme.labelFontColor, ";");
|
|
358
358
|
}, function (props) {
|
|
359
359
|
return props.theme.labelFontTextTransform;
|
|
360
360
|
});
|
|
@@ -374,7 +374,7 @@ var Description = _styledComponents["default"].p(_templateObject13(), function (
|
|
|
374
374
|
}, function (props) {
|
|
375
375
|
return props.theme.descriptionFontTextTransform;
|
|
376
376
|
}, function (props) {
|
|
377
|
-
return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.
|
|
377
|
+
return props.disabled ? "color: ".concat(props.theme.disabledFontColor, ";") : "color: ".concat(props.visited ? props.theme.visitedDescriptionFontColor : props.theme.descriptionFontColor, ";");
|
|
378
378
|
});
|
|
379
379
|
|
|
380
380
|
var StepSeparator = _styledComponents["default"].div(_templateObject14(), function (props) {
|
package/package.json
CHANGED
package/test/NewTextarea.test.js
CHANGED
package/test/Select.test.js
CHANGED
|
@@ -166,25 +166,22 @@ describe("Select component tests", () => {
|
|
|
166
166
|
act(() => {
|
|
167
167
|
userEvent.click(select);
|
|
168
168
|
});
|
|
169
|
-
const option1 = getByText("Amazon");
|
|
170
|
-
const option2 = getByText("Ebay");
|
|
171
|
-
const option3 = getByText("Apple");
|
|
172
169
|
act(() => {
|
|
173
|
-
userEvent.click(
|
|
170
|
+
userEvent.click(getByText("Amazon"));
|
|
174
171
|
});
|
|
175
172
|
expect(onChange).toHaveBeenCalledWith([1]);
|
|
176
173
|
act(() => {
|
|
177
|
-
userEvent.click(
|
|
174
|
+
userEvent.click(getByText("Ebay"));
|
|
178
175
|
});
|
|
179
176
|
expect(onChange).toHaveBeenCalledWith([1, 2]);
|
|
180
177
|
expect(getByText("Amazon, Ebay")).toBeTruthy();
|
|
181
178
|
act(() => {
|
|
182
|
-
userEvent.click(
|
|
179
|
+
userEvent.click(getByText("Apple"));
|
|
183
180
|
});
|
|
184
181
|
expect(onChange).toHaveBeenCalledWith([1, 2, 3]);
|
|
185
182
|
expect(getByText("Amazon, Ebay, Apple")).toBeTruthy();
|
|
186
183
|
act(() => {
|
|
187
|
-
userEvent.click(
|
|
184
|
+
userEvent.click(getByText("Amazon"));
|
|
188
185
|
});
|
|
189
186
|
expect(onChange).toHaveBeenCalledWith([2, 3]);
|
|
190
187
|
expect(getByText("Ebay, Apple")).toBeTruthy();
|