@zohodesk/components 1.2.32 → 1.2.34
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/.cli/propValidation_report.html +1 -1
- package/README.md +8 -0
- package/es/AppContainer/__tests__/AppContainer.spec.js +82 -0
- package/es/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +201 -0
- package/es/Button/__tests__/Button.spec.js +8 -21
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
- package/es/CheckBox/__tests__/CheckBox.spec.js +240 -0
- package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +1878 -0
- package/es/MultiSelect/AdvancedMultiSelect.js +6 -2
- package/es/MultiSelect/props/defaultProps.js +2 -1
- package/es/MultiSelect/props/propTypes.js +2 -1
- package/es/Radio/__tests__/Radio.spec.js +6 -9
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +128 -49
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +1 -1
- package/es/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +0 -10
- package/es/Select/GroupSelect.js +2 -2
- package/es/Tag/__tests__/Tag.spec.js +235 -0
- package/es/Tag/__tests__/__snapshots__/Tag.spec.js.snap +3054 -0
- package/es/TextBox/__tests__/TextBox.spec.js +327 -0
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +615 -0
- package/es/TextBox/props/propTypes.js +0 -3
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +268 -0
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +1784 -0
- package/es/TextBoxIcon/props/propTypes.js +1 -1
- package/es/Textarea/__tests__/Textarea.spec.js +228 -0
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +476 -0
- package/es/utils/dropDownUtils.js +4 -1
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +6 -2
- package/es/v1/MultiSelect/props/defaultProps.js +2 -1
- package/es/v1/MultiSelect/props/propTypes.js +2 -1
- package/es/v1/Select/GroupSelect.js +2 -2
- package/lib/AppContainer/__tests__/AppContainer.spec.js +90 -0
- package/lib/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +201 -0
- package/lib/Button/__tests__/Button.spec.js +8 -21
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -28
- package/lib/CheckBox/__tests__/CheckBox.spec.js +248 -0
- package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +1878 -0
- package/lib/MultiSelect/AdvancedMultiSelect.js +5 -2
- package/lib/MultiSelect/props/defaultProps.js +2 -1
- package/lib/MultiSelect/props/propTypes.js +2 -1
- package/lib/Radio/__tests__/Radio.spec.js +9 -13
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +128 -49
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +1 -1
- package/lib/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +0 -10
- package/lib/Select/GroupSelect.js +12 -12
- package/lib/Tag/__tests__/Tag.spec.js +252 -0
- package/lib/Tag/__tests__/__snapshots__/Tag.spec.js.snap +3054 -0
- package/lib/TextBox/__tests__/TextBox.spec.js +334 -0
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +615 -0
- package/lib/TextBox/props/propTypes.js +53 -51
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +279 -0
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +1784 -0
- package/lib/TextBoxIcon/props/propTypes.js +1 -1
- package/lib/Textarea/__tests__/Textarea.spec.js +235 -0
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +476 -0
- package/lib/utils/dropDownUtils.js +14 -2
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +5 -2
- package/lib/v1/MultiSelect/props/defaultProps.js +2 -1
- package/lib/v1/MultiSelect/props/propTypes.js +2 -1
- package/lib/v1/Select/GroupSelect.js +12 -12
- package/package.json +1 -1
- package/result.json +1 -1
|
@@ -104,6 +104,7 @@ export const extractOptionId = id => {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
|
+
export const extractOptionIdFromJson = (id, localData) => localData[id] || {};
|
|
107
108
|
export const makeFormatOptions = () => createSelector([getOptions, getValueField, getTextField, getImageField, getPrefixText, getIconName, getIconSize, getOptionType, getDisabledOptions, getListItemProps], (options, valueField, textField, imageField, prefixText, iconName, iconSize, optionType, disabledOptions, listItemProps) => {
|
|
108
109
|
const revampOptions = [];
|
|
109
110
|
const remvampOptionIds = [];
|
|
@@ -156,7 +157,9 @@ export const makeFormatOptions = () => createSelector([getOptions, getValueField
|
|
|
156
157
|
}
|
|
157
158
|
|
|
158
159
|
normalizedFormatOptions[id] = optionDetails;
|
|
159
|
-
normalizedAllOptions[id] = option
|
|
160
|
+
normalizedAllOptions[id] = { ...option,
|
|
161
|
+
groupId: prefixText
|
|
162
|
+
};
|
|
160
163
|
revampOptions.push(optionDetails);
|
|
161
164
|
}
|
|
162
165
|
}
|
|
@@ -367,12 +367,16 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
367
367
|
needEffect,
|
|
368
368
|
disabledOptions,
|
|
369
369
|
isLoading,
|
|
370
|
-
dataSelectorId
|
|
370
|
+
dataSelectorId,
|
|
371
|
+
customClass
|
|
371
372
|
} = this.props;
|
|
372
373
|
let {
|
|
373
374
|
SuggestionsProps = {},
|
|
374
375
|
DropBoxProps = {}
|
|
375
376
|
} = customProps;
|
|
377
|
+
let {
|
|
378
|
+
containerClass = ''
|
|
379
|
+
} = customClass;
|
|
376
380
|
const {
|
|
377
381
|
clearText = 'Clear all'
|
|
378
382
|
} = i18nKeys;
|
|
@@ -407,7 +411,7 @@ export class AdvancedMultiSelectComponent extends MultiSelectComponent {
|
|
|
407
411
|
});
|
|
408
412
|
let isShowClearIcon = !isReadOnly && !isDisabled && isShowClear;
|
|
409
413
|
return /*#__PURE__*/React.createElement("div", {
|
|
410
|
-
className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''}`,
|
|
414
|
+
className: `${style.wrapper} ${isDisabled ? style.disabled : ''} ${borderColor === 'transparent' ? style.transparentContainer : ''} ${needEffect && !(isDisabled || isReadOnly) ? style.effect : ''} ${containerClass}`,
|
|
411
415
|
"data-id": dataIdMultiSelectComp,
|
|
412
416
|
"data-test-id": dataIdMultiSelectComp,
|
|
413
417
|
"data-title": isDisabled ? title : null,
|
|
@@ -66,7 +66,8 @@ export const AdvancedMultiSelect_defaultProps = {
|
|
|
66
66
|
customProps: {},
|
|
67
67
|
needEffect: true,
|
|
68
68
|
isLoading: false,
|
|
69
|
-
dataSelectorId: 'advancedMultiSelect'
|
|
69
|
+
dataSelectorId: 'advancedMultiSelect',
|
|
70
|
+
customClass: {}
|
|
70
71
|
};
|
|
71
72
|
export const EmptyState_defaultProps = {
|
|
72
73
|
dataId: 'empty',
|
|
@@ -308,5 +308,6 @@ export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
|
308
308
|
DropBoxProps: PropTypes.object
|
|
309
309
|
}),
|
|
310
310
|
isLoading: PropTypes.bool,
|
|
311
|
-
dataSelectorId: PropTypes.string
|
|
311
|
+
dataSelectorId: PropTypes.string,
|
|
312
|
+
customClass: PropTypes.object
|
|
312
313
|
};
|
|
@@ -20,7 +20,7 @@ import { ResponsiveReceiver } from '../../Responsive/CustomResponsive';
|
|
|
20
20
|
import style from '../../Select/Select.module.css';
|
|
21
21
|
/**** Methods ****/
|
|
22
22
|
|
|
23
|
-
import { makeGetGroupSelectOptions, optionIdGrouping, makeGetGroupSelectFilterSuggestions, extractOptionId } from '../../utils/dropDownUtils';
|
|
23
|
+
import { makeGetGroupSelectOptions, optionIdGrouping, makeGetGroupSelectFilterSuggestions, extractOptionId, extractOptionIdFromJson } from '../../utils/dropDownUtils';
|
|
24
24
|
import { getIsEmptyValue, scrollTo, debounce, getSearchString, findScrollEnd, getKeyValue } from '../../utils/Common';
|
|
25
25
|
/* eslint-disable react/no-unused-prop-types */
|
|
26
26
|
|
|
@@ -359,7 +359,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
359
359
|
let {
|
|
360
360
|
id: selected,
|
|
361
361
|
groupId
|
|
362
|
-
} = extractOptionId(id);
|
|
362
|
+
} = extractOptionId(id) || extractOptionIdFromJson(id, normalizedAllOptions);
|
|
363
363
|
|
|
364
364
|
if (!getIsEmptyValue(id) && !isReadOnly) {
|
|
365
365
|
onChange && onChange({
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _react = _interopRequireDefault(require("react"));
|
|
4
|
+
|
|
5
|
+
var _react2 = require("@testing-library/react");
|
|
6
|
+
|
|
7
|
+
var _AppContainer = _interopRequireDefault(require("../AppContainer.js"));
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
|
|
11
|
+
describe('AppContainer', function () {
|
|
12
|
+
test('rendering the defult props', function () {
|
|
13
|
+
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AppContainer["default"], null)),
|
|
14
|
+
asFragment = _render.asFragment;
|
|
15
|
+
|
|
16
|
+
expect(asFragment()).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
test('rendering the customClass', function () {
|
|
19
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AppContainer["default"], {
|
|
20
|
+
className: "AppcontainerClass"
|
|
21
|
+
})),
|
|
22
|
+
asFragment = _render2.asFragment;
|
|
23
|
+
|
|
24
|
+
expect(asFragment()).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
test('rendering the needTooltip is false', function () {
|
|
27
|
+
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AppContainer["default"], {
|
|
28
|
+
needTooltip: false
|
|
29
|
+
})),
|
|
30
|
+
asFragment = _render3.asFragment;
|
|
31
|
+
|
|
32
|
+
expect(asFragment()).toMatchSnapshot();
|
|
33
|
+
});
|
|
34
|
+
test('rendering the tooltipClass', function () {
|
|
35
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AppContainer["default"], {
|
|
36
|
+
tooltipClass: "customTooltipClass"
|
|
37
|
+
})),
|
|
38
|
+
asFragment = _render4.asFragment;
|
|
39
|
+
|
|
40
|
+
expect(asFragment()).toMatchSnapshot();
|
|
41
|
+
});
|
|
42
|
+
test('rendering the tooltipParentClass', function () {
|
|
43
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AppContainer["default"], {
|
|
44
|
+
tooltipParentClass: "tooltipParentClass"
|
|
45
|
+
})),
|
|
46
|
+
asFragment = _render5.asFragment;
|
|
47
|
+
|
|
48
|
+
expect(asFragment()).toMatchSnapshot();
|
|
49
|
+
});
|
|
50
|
+
test('rendering the Custom props', function () {
|
|
51
|
+
var _render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AppContainer["default"], {
|
|
52
|
+
customProps: {
|
|
53
|
+
ExtraProps: {
|
|
54
|
+
'data-props': true
|
|
55
|
+
},
|
|
56
|
+
ContainerProps: {
|
|
57
|
+
'data-container': true
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
})),
|
|
61
|
+
asFragment = _render6.asFragment;
|
|
62
|
+
|
|
63
|
+
expect(asFragment()).toMatchSnapshot();
|
|
64
|
+
});
|
|
65
|
+
test('eleRef prop is a function', function () {
|
|
66
|
+
var mockEleRef = jest.fn();
|
|
67
|
+
(0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AppContainer["default"], {
|
|
68
|
+
eleRef: mockEleRef
|
|
69
|
+
}));
|
|
70
|
+
expect(mockEleRef).toHaveBeenCalled();
|
|
71
|
+
});
|
|
72
|
+
test('rendering the childern as element', function () {
|
|
73
|
+
var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AppContainer["default"], null, /*#__PURE__*/_react["default"].createElement("div", null, "Children"))),
|
|
74
|
+
asFragment = _render7.asFragment;
|
|
75
|
+
|
|
76
|
+
expect(asFragment()).toMatchSnapshot();
|
|
77
|
+
});
|
|
78
|
+
test('rendering the childern as element in array', function () {
|
|
79
|
+
var children = [/*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
key: "child1"
|
|
81
|
+
}, "Child 1"), /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
|
+
key: "child2"
|
|
83
|
+
}, "Child 2")];
|
|
84
|
+
|
|
85
|
+
var _render8 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AppContainer["default"], null, children)),
|
|
86
|
+
asFragment = _render8.asFragment;
|
|
87
|
+
|
|
88
|
+
expect(asFragment()).toMatchSnapshot();
|
|
89
|
+
});
|
|
90
|
+
});
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`AppContainer rendering the Custom props 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="container flex cover coldir"
|
|
7
|
+
data-container="true"
|
|
8
|
+
data-id="AppContainer"
|
|
9
|
+
data-props="true"
|
|
10
|
+
data-selector-id="appContainer"
|
|
11
|
+
data-test-id="AppContainer"
|
|
12
|
+
>
|
|
13
|
+
<div
|
|
14
|
+
class="grow basis shrinkOff"
|
|
15
|
+
data-id="boxComponent"
|
|
16
|
+
data-selector-id="box"
|
|
17
|
+
data-test-id="boxComponent"
|
|
18
|
+
/>
|
|
19
|
+
</div>
|
|
20
|
+
<div
|
|
21
|
+
class="container tooltip "
|
|
22
|
+
data-id="AppContainer_tooltip"
|
|
23
|
+
data-props="true"
|
|
24
|
+
data-selector-id="appContainer_tooltip"
|
|
25
|
+
data-test-id="AppContainer_tooltip"
|
|
26
|
+
/>
|
|
27
|
+
</DocumentFragment>
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
exports[`AppContainer rendering the childern as element 1`] = `
|
|
31
|
+
<DocumentFragment>
|
|
32
|
+
<div
|
|
33
|
+
class="container flex cover coldir"
|
|
34
|
+
data-id="AppContainer"
|
|
35
|
+
data-selector-id="appContainer"
|
|
36
|
+
data-test-id="AppContainer"
|
|
37
|
+
>
|
|
38
|
+
<div
|
|
39
|
+
class="grow basis shrinkOff"
|
|
40
|
+
data-id="boxComponent"
|
|
41
|
+
data-selector-id="box"
|
|
42
|
+
data-test-id="boxComponent"
|
|
43
|
+
>
|
|
44
|
+
<div>
|
|
45
|
+
Children
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<div
|
|
50
|
+
class="container tooltip "
|
|
51
|
+
data-id="AppContainer_tooltip"
|
|
52
|
+
data-selector-id="appContainer_tooltip"
|
|
53
|
+
data-test-id="AppContainer_tooltip"
|
|
54
|
+
/>
|
|
55
|
+
</DocumentFragment>
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
exports[`AppContainer rendering the childern as element in array 1`] = `
|
|
59
|
+
<DocumentFragment>
|
|
60
|
+
<div
|
|
61
|
+
class="container flex cover coldir"
|
|
62
|
+
data-id="AppContainer"
|
|
63
|
+
data-selector-id="appContainer"
|
|
64
|
+
data-test-id="AppContainer"
|
|
65
|
+
>
|
|
66
|
+
<div
|
|
67
|
+
class="grow basis shrinkOff"
|
|
68
|
+
data-id="boxComponent"
|
|
69
|
+
data-selector-id="box"
|
|
70
|
+
data-test-id="boxComponent"
|
|
71
|
+
>
|
|
72
|
+
<div>
|
|
73
|
+
Child 1
|
|
74
|
+
</div>
|
|
75
|
+
<span>
|
|
76
|
+
Child 2
|
|
77
|
+
</span>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div
|
|
81
|
+
class="container tooltip "
|
|
82
|
+
data-id="AppContainer_tooltip"
|
|
83
|
+
data-selector-id="appContainer_tooltip"
|
|
84
|
+
data-test-id="AppContainer_tooltip"
|
|
85
|
+
/>
|
|
86
|
+
</DocumentFragment>
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
exports[`AppContainer rendering the customClass 1`] = `
|
|
90
|
+
<DocumentFragment>
|
|
91
|
+
<div
|
|
92
|
+
class="container AppcontainerClass flex cover coldir"
|
|
93
|
+
data-id="AppContainer"
|
|
94
|
+
data-selector-id="appContainer"
|
|
95
|
+
data-test-id="AppContainer"
|
|
96
|
+
>
|
|
97
|
+
<div
|
|
98
|
+
class="grow basis shrinkOff"
|
|
99
|
+
data-id="boxComponent"
|
|
100
|
+
data-selector-id="box"
|
|
101
|
+
data-test-id="boxComponent"
|
|
102
|
+
/>
|
|
103
|
+
</div>
|
|
104
|
+
<div
|
|
105
|
+
class="container tooltip "
|
|
106
|
+
data-id="AppContainer_tooltip"
|
|
107
|
+
data-selector-id="appContainer_tooltip"
|
|
108
|
+
data-test-id="AppContainer_tooltip"
|
|
109
|
+
/>
|
|
110
|
+
</DocumentFragment>
|
|
111
|
+
`;
|
|
112
|
+
|
|
113
|
+
exports[`AppContainer rendering the defult props 1`] = `
|
|
114
|
+
<DocumentFragment>
|
|
115
|
+
<div
|
|
116
|
+
class="container flex cover coldir"
|
|
117
|
+
data-id="AppContainer"
|
|
118
|
+
data-selector-id="appContainer"
|
|
119
|
+
data-test-id="AppContainer"
|
|
120
|
+
>
|
|
121
|
+
<div
|
|
122
|
+
class="grow basis shrinkOff"
|
|
123
|
+
data-id="boxComponent"
|
|
124
|
+
data-selector-id="box"
|
|
125
|
+
data-test-id="boxComponent"
|
|
126
|
+
/>
|
|
127
|
+
</div>
|
|
128
|
+
<div
|
|
129
|
+
class="container tooltip "
|
|
130
|
+
data-id="AppContainer_tooltip"
|
|
131
|
+
data-selector-id="appContainer_tooltip"
|
|
132
|
+
data-test-id="AppContainer_tooltip"
|
|
133
|
+
/>
|
|
134
|
+
</DocumentFragment>
|
|
135
|
+
`;
|
|
136
|
+
|
|
137
|
+
exports[`AppContainer rendering the needTooltip is false 1`] = `
|
|
138
|
+
<DocumentFragment>
|
|
139
|
+
<div
|
|
140
|
+
class="container flex cover coldir"
|
|
141
|
+
data-id="AppContainer"
|
|
142
|
+
data-selector-id="appContainer"
|
|
143
|
+
data-test-id="AppContainer"
|
|
144
|
+
>
|
|
145
|
+
<div
|
|
146
|
+
class="grow basis shrinkOff"
|
|
147
|
+
data-id="boxComponent"
|
|
148
|
+
data-selector-id="box"
|
|
149
|
+
data-test-id="boxComponent"
|
|
150
|
+
/>
|
|
151
|
+
</div>
|
|
152
|
+
</DocumentFragment>
|
|
153
|
+
`;
|
|
154
|
+
|
|
155
|
+
exports[`AppContainer rendering the tooltipClass 1`] = `
|
|
156
|
+
<DocumentFragment>
|
|
157
|
+
<div
|
|
158
|
+
class="container flex cover coldir"
|
|
159
|
+
data-id="AppContainer"
|
|
160
|
+
data-selector-id="appContainer"
|
|
161
|
+
data-test-id="AppContainer"
|
|
162
|
+
>
|
|
163
|
+
<div
|
|
164
|
+
class="grow basis shrinkOff"
|
|
165
|
+
data-id="boxComponent"
|
|
166
|
+
data-selector-id="box"
|
|
167
|
+
data-test-id="boxComponent"
|
|
168
|
+
/>
|
|
169
|
+
</div>
|
|
170
|
+
<div
|
|
171
|
+
class="container tooltip "
|
|
172
|
+
data-id="AppContainer_tooltip"
|
|
173
|
+
data-selector-id="appContainer_tooltip"
|
|
174
|
+
data-test-id="AppContainer_tooltip"
|
|
175
|
+
/>
|
|
176
|
+
</DocumentFragment>
|
|
177
|
+
`;
|
|
178
|
+
|
|
179
|
+
exports[`AppContainer rendering the tooltipParentClass 1`] = `
|
|
180
|
+
<DocumentFragment>
|
|
181
|
+
<div
|
|
182
|
+
class="container flex cover coldir"
|
|
183
|
+
data-id="AppContainer"
|
|
184
|
+
data-selector-id="appContainer"
|
|
185
|
+
data-test-id="AppContainer"
|
|
186
|
+
>
|
|
187
|
+
<div
|
|
188
|
+
class="grow basis shrinkOff"
|
|
189
|
+
data-id="boxComponent"
|
|
190
|
+
data-selector-id="box"
|
|
191
|
+
data-test-id="boxComponent"
|
|
192
|
+
/>
|
|
193
|
+
</div>
|
|
194
|
+
<div
|
|
195
|
+
class="container tooltip tooltipParentClass"
|
|
196
|
+
data-id="AppContainer_tooltip"
|
|
197
|
+
data-selector-id="appContainer_tooltip"
|
|
198
|
+
data-test-id="AppContainer_tooltip"
|
|
199
|
+
/>
|
|
200
|
+
</DocumentFragment>
|
|
201
|
+
`;
|
|
@@ -105,25 +105,12 @@ describe('Button component', function () {
|
|
|
105
105
|
asFragment = _render11.asFragment;
|
|
106
106
|
|
|
107
107
|
expect(asFragment()).toMatchSnapshot();
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
expect(asFragment()).toMatchSnapshot();
|
|
118
|
-
});
|
|
119
|
-
test('Should be render with the customstyle with medium ', function () {
|
|
120
|
-
var _render13 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
121
|
-
customStyle: {
|
|
122
|
-
$medium: "buttonMedium"
|
|
123
|
-
}
|
|
124
|
-
})),
|
|
125
|
-
asFragment = _render13.asFragment;
|
|
126
|
-
|
|
127
|
-
expect(asFragment()).toMatchSnapshot();
|
|
128
|
-
});
|
|
108
|
+
}); // test('Should be render with the basic set customstyle ', () => {
|
|
109
|
+
// const { asFragment } = render(<Button customStyle={{bold: "buttonBold"}} />);
|
|
110
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
111
|
+
// });
|
|
112
|
+
// test('Should be render with the customstyle with medium ', () => {
|
|
113
|
+
// const { asFragment } = render(<Button customStyle={{$medium: "buttonMedium"}} />);
|
|
114
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
115
|
+
// });
|
|
129
116
|
});
|
|
@@ -28,20 +28,6 @@ exports[`Button component Should be render with the basic set customstatusSize p
|
|
|
28
28
|
</DocumentFragment>
|
|
29
29
|
`;
|
|
30
30
|
|
|
31
|
-
exports[`Button component Should be render with the basic set customstyle 1`] = `
|
|
32
|
-
<DocumentFragment>
|
|
33
|
-
<button
|
|
34
|
-
class="bold buttonBold primary medium"
|
|
35
|
-
data-id="buttonComp"
|
|
36
|
-
data-selector-id="button"
|
|
37
|
-
data-test-id="buttonComp"
|
|
38
|
-
type="button"
|
|
39
|
-
>
|
|
40
|
-
Button
|
|
41
|
-
</button>
|
|
42
|
-
</DocumentFragment>
|
|
43
|
-
`;
|
|
44
|
-
|
|
45
31
|
exports[`Button component Should be render with the basic set of default props 1`] = `
|
|
46
32
|
<DocumentFragment>
|
|
47
33
|
<button
|
|
@@ -113,20 +99,6 @@ exports[`Button component Should be render with the basic set of default props w
|
|
|
113
99
|
</DocumentFragment>
|
|
114
100
|
`;
|
|
115
101
|
|
|
116
|
-
exports[`Button component Should be render with the customstyle with medium 1`] = `
|
|
117
|
-
<DocumentFragment>
|
|
118
|
-
<button
|
|
119
|
-
class="bold primary buttonMedium"
|
|
120
|
-
data-id="buttonComp"
|
|
121
|
-
data-selector-id="button"
|
|
122
|
-
data-test-id="buttonComp"
|
|
123
|
-
type="button"
|
|
124
|
-
>
|
|
125
|
-
Button
|
|
126
|
-
</button>
|
|
127
|
-
</DocumentFragment>
|
|
128
|
-
`;
|
|
129
|
-
|
|
130
102
|
exports[`Button component Should render CustomStatusclassname of buttons - loading 1`] = `
|
|
131
103
|
<DocumentFragment>
|
|
132
104
|
<button
|