@zohodesk/components 1.1.0 → 1.1.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/README.md +5 -1
- package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/es/Button/__tests__/Button.spec.js +61 -0
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
- package/lib/Button/__tests__/Button.spec.js +62 -0
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
- package/package.json +12 -7
- package/result.json +1 -0
- package/es/Accordion/__tests__/Accordion.spec.js +0 -79
- package/es/Animation/__tests__/Animation.spec.js +0 -17
- package/es/Avatar/__tests__/Avatar.spec.js +0 -161
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -288
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -76
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -226
- package/es/Buttongroup/__test__/Buttongroup.spec.js +0 -73
- package/es/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
- package/es/Card/__tests__/Card.spec.js +0 -36
- package/es/CheckBox/__tests__/CheckBox.spec.js +0 -12
- package/es/DateTime/__tests__/CalendarView.spec.js +0 -33
- package/es/DateTime/__tests__/DateTime.spec.js +0 -115
- package/es/DateTime/__tests__/DateWidget.spec.js +0 -75
- package/es/DropBox/__tests__/DropBox.spec.js +0 -81
- package/es/DropDown/__tests__/DropDown.spec.js +0 -44
- package/es/DropDown/__tests__/DropDownItem.spec.js +0 -45
- package/es/DropDown/__tests__/DropDownSearch.spec.js +0 -11
- package/es/Label/__tests__/Label.spec.js +0 -120
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -101
- package/es/Layout/__tests__/Box.spec.js +0 -114
- package/es/Layout/__tests__/Container.spec.js +0 -120
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -160
- package/es/PopOver/__tests__/PopOver.spec.js +0 -14
- package/es/Popup/__tests__/Popup.spec.js +0 -134
- package/es/Radio/__tests__/Radiospec.js +0 -23
- package/es/Ribbon/__tests__/Ribbon.spec.js +0 -168
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -163
- package/es/Select/__tests__/Select.spec.js +0 -345
- package/es/Stencils/__tests__/Stencils.spec.js +0 -69
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -49
- package/es/Tab/__tests__/Tab.spec.js +0 -117
- package/es/Tab/__tests__/TabContent.spec.js +0 -16
- package/es/Tab/__tests__/TabContentWrapper.spec.js +0 -50
- package/es/Tab/__tests__/TabWrapper.spec.js +0 -86
- package/es/Tab/__tests__/Tabs.spec.js +0 -115
- package/es/Tag/__tests__/Tag.spec.js +0 -28
- package/es/TextBox/__tests__/TextBox.spec.js +0 -189
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -212
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
- package/es/Textarea/__tests__/Textarea.spec.js +0 -171
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
- package/es/Tooltip/__tests__/Tooltip.spec.js +0 -52
- package/es/utils/__tests__/constructFullName.spec.js +0 -9
- package/es/utils/__tests__/debounce.spec.js +0 -37
- package/es/utils/__tests__/getInitial.spec.js +0 -23
- package/lib/Accordion/__tests__/Accordion.spec.js +0 -85
- package/lib/Animation/__tests__/Animation.spec.js +0 -23
- package/lib/Avatar/__tests__/Avatar.spec.js +0 -208
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -288
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -92
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -226
- package/lib/Buttongroup/__test__/Buttongroup.spec.js +0 -86
- package/lib/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
- package/lib/Card/__tests__/Card.spec.js +0 -56
- package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -18
- package/lib/DateTime/__tests__/CalendarView.spec.js +0 -45
- package/lib/DateTime/__tests__/DateTime.spec.js +0 -127
- package/lib/DateTime/__tests__/DateWidget.spec.js +0 -81
- package/lib/DropBox/__tests__/DropBox.spec.js +0 -87
- package/lib/DropDown/__tests__/DropDown.spec.js +0 -50
- package/lib/DropDown/__tests__/DropDownItem.spec.js +0 -51
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -17
- package/lib/Label/__tests__/Label.spec.js +0 -137
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -101
- package/lib/Layout/__tests__/Box.spec.js +0 -121
- package/lib/Layout/__tests__/Container.spec.js +0 -127
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -170
- package/lib/PopOver/__tests__/PopOver.spec.js +0 -20
- package/lib/Popup/__tests__/Popup.spec.js +0 -192
- package/lib/Radio/__tests__/Radiospec.js +0 -29
- package/lib/Ribbon/__tests__/Ribbon.spec.js +0 -193
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -163
- package/lib/Select/__tests__/Select.spec.js +0 -383
- package/lib/Stencils/__tests__/Stencils.spec.js +0 -84
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -49
- package/lib/Tab/__tests__/Tab.spec.js +0 -123
- package/lib/Tab/__tests__/TabContent.spec.js +0 -22
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +0 -59
- package/lib/Tab/__tests__/TabWrapper.spec.js +0 -100
- package/lib/Tab/__tests__/Tabs.spec.js +0 -123
- package/lib/Tag/__tests__/Tag.spec.js +0 -35
- package/lib/TextBox/__tests__/TextBox.spec.js +0 -205
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -228
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
- package/lib/Textarea/__tests__/Textarea.spec.js +0 -186
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
- package/lib/Tooltip/__tests__/Tooltip.spec.js +0 -98
- package/lib/utils/__tests__/constructFullName.spec.js +0 -12
- package/lib/utils/__tests__/debounce.spec.js +0 -40
- package/lib/utils/__tests__/getInitial.spec.js +0 -26
|
@@ -0,0 +1,440 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Button component Should be render with the basic set customButtonclass with buttonClass 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<button
|
|
6
|
+
class="customButtonClass bold primary medium"
|
|
7
|
+
data-id="buttonComp"
|
|
8
|
+
data-selector-id="button"
|
|
9
|
+
data-test-id="buttonComp"
|
|
10
|
+
type="button"
|
|
11
|
+
>
|
|
12
|
+
Button
|
|
13
|
+
</button>
|
|
14
|
+
</DocumentFragment>
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
exports[`Button component Should be render with the basic set customstatusSize props with buttonClass 1`] = `
|
|
18
|
+
<DocumentFragment>
|
|
19
|
+
<button
|
|
20
|
+
class="bold primary medium"
|
|
21
|
+
data-id="buttonComp"
|
|
22
|
+
data-selector-id="button"
|
|
23
|
+
data-test-id="buttonComp"
|
|
24
|
+
type="button"
|
|
25
|
+
>
|
|
26
|
+
Button
|
|
27
|
+
</button>
|
|
28
|
+
</DocumentFragment>
|
|
29
|
+
`;
|
|
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
|
+
exports[`Button component Should be render with the basic set of default props 1`] = `
|
|
46
|
+
<DocumentFragment>
|
|
47
|
+
<button
|
|
48
|
+
class="bold primary medium"
|
|
49
|
+
data-id="buttonComp"
|
|
50
|
+
data-selector-id="button"
|
|
51
|
+
data-test-id="buttonComp"
|
|
52
|
+
type="button"
|
|
53
|
+
>
|
|
54
|
+
Button
|
|
55
|
+
</button>
|
|
56
|
+
</DocumentFragment>
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
exports[`Button component Should be render with the basic set of default props with disabled is true 1`] = `
|
|
60
|
+
<DocumentFragment>
|
|
61
|
+
<button
|
|
62
|
+
class="bold primary medium"
|
|
63
|
+
data-id="buttonComp_disabled"
|
|
64
|
+
data-selector-id="button"
|
|
65
|
+
data-test-id="buttonComp_disabled"
|
|
66
|
+
disabled=""
|
|
67
|
+
type="button"
|
|
68
|
+
>
|
|
69
|
+
Button
|
|
70
|
+
</button>
|
|
71
|
+
</DocumentFragment>
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
exports[`Button component Should be render with the basic set of default props with isBold is false 1`] = `
|
|
75
|
+
<DocumentFragment>
|
|
76
|
+
<button
|
|
77
|
+
class="primary medium"
|
|
78
|
+
data-id="buttonComp"
|
|
79
|
+
data-selector-id="button"
|
|
80
|
+
data-test-id="buttonComp"
|
|
81
|
+
type="button"
|
|
82
|
+
>
|
|
83
|
+
Button
|
|
84
|
+
</button>
|
|
85
|
+
</DocumentFragment>
|
|
86
|
+
`;
|
|
87
|
+
|
|
88
|
+
exports[`Button component Should be render with the basic set of default props with needAppearance is false 1`] = `
|
|
89
|
+
<DocumentFragment>
|
|
90
|
+
<button
|
|
91
|
+
class="bold"
|
|
92
|
+
data-id="buttonComp"
|
|
93
|
+
data-selector-id="button"
|
|
94
|
+
data-test-id="buttonComp"
|
|
95
|
+
type="button"
|
|
96
|
+
>
|
|
97
|
+
Button
|
|
98
|
+
</button>
|
|
99
|
+
</DocumentFragment>
|
|
100
|
+
`;
|
|
101
|
+
|
|
102
|
+
exports[`Button component Should be render with the basic set of default props with rounded is true 1`] = `
|
|
103
|
+
<DocumentFragment>
|
|
104
|
+
<button
|
|
105
|
+
class="bold primary rounded medium"
|
|
106
|
+
data-id="buttonComp"
|
|
107
|
+
data-selector-id="button"
|
|
108
|
+
data-test-id="buttonComp"
|
|
109
|
+
type="button"
|
|
110
|
+
>
|
|
111
|
+
Button
|
|
112
|
+
</button>
|
|
113
|
+
</DocumentFragment>
|
|
114
|
+
`;
|
|
115
|
+
|
|
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
|
+
exports[`Button component Should render CustomStatusclassname of buttons - loading 1`] = `
|
|
131
|
+
<DocumentFragment>
|
|
132
|
+
<button
|
|
133
|
+
class="bold primary medium loader"
|
|
134
|
+
data-id="buttonComp"
|
|
135
|
+
data-selector-id="button"
|
|
136
|
+
data-test-id="buttonComp"
|
|
137
|
+
disabled=""
|
|
138
|
+
type="button"
|
|
139
|
+
>
|
|
140
|
+
Button
|
|
141
|
+
<div
|
|
142
|
+
class="overlay"
|
|
143
|
+
>
|
|
144
|
+
<div
|
|
145
|
+
class="loading mediumloading"
|
|
146
|
+
>
|
|
147
|
+
<div
|
|
148
|
+
class="customStautusClassName loadingelement primaryelement"
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</button>
|
|
153
|
+
</DocumentFragment>
|
|
154
|
+
`;
|
|
155
|
+
|
|
156
|
+
exports[`Button component Should render CustomStatusclassname of buttons - success 1`] = `
|
|
157
|
+
<DocumentFragment>
|
|
158
|
+
<button
|
|
159
|
+
class="bold primary medium loader"
|
|
160
|
+
data-id="buttonComp"
|
|
161
|
+
data-selector-id="button"
|
|
162
|
+
data-test-id="buttonComp"
|
|
163
|
+
type="button"
|
|
164
|
+
>
|
|
165
|
+
Button
|
|
166
|
+
<div
|
|
167
|
+
class="overlay"
|
|
168
|
+
>
|
|
169
|
+
<div
|
|
170
|
+
class="success"
|
|
171
|
+
>
|
|
172
|
+
<div
|
|
173
|
+
class="customStautusClassName successelement primarysuccess"
|
|
174
|
+
/>
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
</button>
|
|
178
|
+
</DocumentFragment>
|
|
179
|
+
`;
|
|
180
|
+
|
|
181
|
+
exports[`Button component Should render Sizes of buttons - large 1`] = `
|
|
182
|
+
<DocumentFragment>
|
|
183
|
+
<button
|
|
184
|
+
class="bold primary large"
|
|
185
|
+
data-id="buttonComp"
|
|
186
|
+
data-selector-id="button"
|
|
187
|
+
data-test-id="buttonComp"
|
|
188
|
+
type="button"
|
|
189
|
+
>
|
|
190
|
+
Button
|
|
191
|
+
</button>
|
|
192
|
+
</DocumentFragment>
|
|
193
|
+
`;
|
|
194
|
+
|
|
195
|
+
exports[`Button component Should render Sizes of buttons - medium 1`] = `
|
|
196
|
+
<DocumentFragment>
|
|
197
|
+
<button
|
|
198
|
+
class="bold primary medium"
|
|
199
|
+
data-id="buttonComp"
|
|
200
|
+
data-selector-id="button"
|
|
201
|
+
data-test-id="buttonComp"
|
|
202
|
+
type="button"
|
|
203
|
+
>
|
|
204
|
+
Button
|
|
205
|
+
</button>
|
|
206
|
+
</DocumentFragment>
|
|
207
|
+
`;
|
|
208
|
+
|
|
209
|
+
exports[`Button component Should render Sizes of buttons - small 1`] = `
|
|
210
|
+
<DocumentFragment>
|
|
211
|
+
<button
|
|
212
|
+
class="bold primary small"
|
|
213
|
+
data-id="buttonComp"
|
|
214
|
+
data-selector-id="button"
|
|
215
|
+
data-test-id="buttonComp"
|
|
216
|
+
type="button"
|
|
217
|
+
>
|
|
218
|
+
Button
|
|
219
|
+
</button>
|
|
220
|
+
</DocumentFragment>
|
|
221
|
+
`;
|
|
222
|
+
|
|
223
|
+
exports[`Button component Should render Sizes of buttons - xlarge 1`] = `
|
|
224
|
+
<DocumentFragment>
|
|
225
|
+
<button
|
|
226
|
+
class="bold primary xlarge"
|
|
227
|
+
data-id="buttonComp"
|
|
228
|
+
data-selector-id="button"
|
|
229
|
+
data-test-id="buttonComp"
|
|
230
|
+
type="button"
|
|
231
|
+
>
|
|
232
|
+
Button
|
|
233
|
+
</button>
|
|
234
|
+
</DocumentFragment>
|
|
235
|
+
`;
|
|
236
|
+
|
|
237
|
+
exports[`Button component Should render Status of buttons - loading 1`] = `
|
|
238
|
+
<DocumentFragment>
|
|
239
|
+
<button
|
|
240
|
+
class="bold primary medium loader"
|
|
241
|
+
data-id="buttonComp"
|
|
242
|
+
data-selector-id="button"
|
|
243
|
+
data-test-id="buttonComp"
|
|
244
|
+
disabled=""
|
|
245
|
+
type="button"
|
|
246
|
+
>
|
|
247
|
+
Button
|
|
248
|
+
<div
|
|
249
|
+
class="overlay"
|
|
250
|
+
>
|
|
251
|
+
<div
|
|
252
|
+
class="loading mediumloading"
|
|
253
|
+
>
|
|
254
|
+
<div
|
|
255
|
+
class="loadingelement primaryelement"
|
|
256
|
+
/>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
</button>
|
|
260
|
+
</DocumentFragment>
|
|
261
|
+
`;
|
|
262
|
+
|
|
263
|
+
exports[`Button component Should render Status of buttons - none 1`] = `
|
|
264
|
+
<DocumentFragment>
|
|
265
|
+
<button
|
|
266
|
+
class="bold primary medium"
|
|
267
|
+
data-id="buttonComp"
|
|
268
|
+
data-selector-id="button"
|
|
269
|
+
data-test-id="buttonComp"
|
|
270
|
+
type="button"
|
|
271
|
+
>
|
|
272
|
+
Button
|
|
273
|
+
</button>
|
|
274
|
+
</DocumentFragment>
|
|
275
|
+
`;
|
|
276
|
+
|
|
277
|
+
exports[`Button component Should render Status of buttons - success 1`] = `
|
|
278
|
+
<DocumentFragment>
|
|
279
|
+
<button
|
|
280
|
+
class="bold primary medium loader"
|
|
281
|
+
data-id="buttonComp"
|
|
282
|
+
data-selector-id="button"
|
|
283
|
+
data-test-id="buttonComp"
|
|
284
|
+
type="button"
|
|
285
|
+
>
|
|
286
|
+
Button
|
|
287
|
+
<div
|
|
288
|
+
class="overlay"
|
|
289
|
+
>
|
|
290
|
+
<div
|
|
291
|
+
class="success"
|
|
292
|
+
>
|
|
293
|
+
<div
|
|
294
|
+
class="successelement primarysuccess"
|
|
295
|
+
/>
|
|
296
|
+
</div>
|
|
297
|
+
</div>
|
|
298
|
+
</button>
|
|
299
|
+
</DocumentFragment>
|
|
300
|
+
`;
|
|
301
|
+
|
|
302
|
+
exports[`Button component Should render palette of buttons - dangerFilled 1`] = `
|
|
303
|
+
<DocumentFragment>
|
|
304
|
+
<button
|
|
305
|
+
class="bold dangerfilled medium"
|
|
306
|
+
data-id="buttonComp"
|
|
307
|
+
data-selector-id="button"
|
|
308
|
+
data-test-id="buttonComp"
|
|
309
|
+
type="button"
|
|
310
|
+
>
|
|
311
|
+
Button
|
|
312
|
+
</button>
|
|
313
|
+
</DocumentFragment>
|
|
314
|
+
`;
|
|
315
|
+
|
|
316
|
+
exports[`Button component Should render palette of buttons - info 1`] = `
|
|
317
|
+
<DocumentFragment>
|
|
318
|
+
<button
|
|
319
|
+
class="bold medium"
|
|
320
|
+
data-id="buttonComp"
|
|
321
|
+
data-selector-id="button"
|
|
322
|
+
data-test-id="buttonComp"
|
|
323
|
+
type="button"
|
|
324
|
+
>
|
|
325
|
+
Button
|
|
326
|
+
</button>
|
|
327
|
+
</DocumentFragment>
|
|
328
|
+
`;
|
|
329
|
+
|
|
330
|
+
exports[`Button component Should render palette of buttons - plainPrimary 1`] = `
|
|
331
|
+
<DocumentFragment>
|
|
332
|
+
<button
|
|
333
|
+
class="bold plainprimary medium"
|
|
334
|
+
data-id="buttonComp"
|
|
335
|
+
data-selector-id="button"
|
|
336
|
+
data-test-id="buttonComp"
|
|
337
|
+
type="button"
|
|
338
|
+
>
|
|
339
|
+
Button
|
|
340
|
+
</button>
|
|
341
|
+
</DocumentFragment>
|
|
342
|
+
`;
|
|
343
|
+
|
|
344
|
+
exports[`Button component Should render palette of buttons - plainSecondary 1`] = `
|
|
345
|
+
<DocumentFragment>
|
|
346
|
+
<button
|
|
347
|
+
class="bold plainsecondary medium"
|
|
348
|
+
data-id="buttonComp"
|
|
349
|
+
data-selector-id="button"
|
|
350
|
+
data-test-id="buttonComp"
|
|
351
|
+
type="button"
|
|
352
|
+
>
|
|
353
|
+
Button
|
|
354
|
+
</button>
|
|
355
|
+
</DocumentFragment>
|
|
356
|
+
`;
|
|
357
|
+
|
|
358
|
+
exports[`Button component Should render palette of buttons - primary 1`] = `
|
|
359
|
+
<DocumentFragment>
|
|
360
|
+
<button
|
|
361
|
+
class="bold primary medium"
|
|
362
|
+
data-id="buttonComp"
|
|
363
|
+
data-selector-id="button"
|
|
364
|
+
data-test-id="buttonComp"
|
|
365
|
+
type="button"
|
|
366
|
+
>
|
|
367
|
+
Button
|
|
368
|
+
</button>
|
|
369
|
+
</DocumentFragment>
|
|
370
|
+
`;
|
|
371
|
+
|
|
372
|
+
exports[`Button component Should render palette of buttons - primaryFilled 1`] = `
|
|
373
|
+
<DocumentFragment>
|
|
374
|
+
<button
|
|
375
|
+
class="bold primaryfilled medium"
|
|
376
|
+
data-id="buttonComp"
|
|
377
|
+
data-selector-id="button"
|
|
378
|
+
data-test-id="buttonComp"
|
|
379
|
+
type="button"
|
|
380
|
+
>
|
|
381
|
+
Button
|
|
382
|
+
</button>
|
|
383
|
+
</DocumentFragment>
|
|
384
|
+
`;
|
|
385
|
+
|
|
386
|
+
exports[`Button component Should render palette of buttons - secondary 1`] = `
|
|
387
|
+
<DocumentFragment>
|
|
388
|
+
<button
|
|
389
|
+
class="bold secondary medium"
|
|
390
|
+
data-id="buttonComp"
|
|
391
|
+
data-selector-id="button"
|
|
392
|
+
data-test-id="buttonComp"
|
|
393
|
+
type="button"
|
|
394
|
+
>
|
|
395
|
+
Button
|
|
396
|
+
</button>
|
|
397
|
+
</DocumentFragment>
|
|
398
|
+
`;
|
|
399
|
+
|
|
400
|
+
exports[`Button component Should render palette of buttons - secondaryFilled 1`] = `
|
|
401
|
+
<DocumentFragment>
|
|
402
|
+
<button
|
|
403
|
+
class="bold secondaryfilled medium"
|
|
404
|
+
data-id="buttonComp"
|
|
405
|
+
data-selector-id="button"
|
|
406
|
+
data-test-id="buttonComp"
|
|
407
|
+
type="button"
|
|
408
|
+
>
|
|
409
|
+
Button
|
|
410
|
+
</button>
|
|
411
|
+
</DocumentFragment>
|
|
412
|
+
`;
|
|
413
|
+
|
|
414
|
+
exports[`Button component Should render palette of buttons - successFilled 1`] = `
|
|
415
|
+
<DocumentFragment>
|
|
416
|
+
<button
|
|
417
|
+
class="bold successfilled medium"
|
|
418
|
+
data-id="buttonComp"
|
|
419
|
+
data-selector-id="button"
|
|
420
|
+
data-test-id="buttonComp"
|
|
421
|
+
type="button"
|
|
422
|
+
>
|
|
423
|
+
Button
|
|
424
|
+
</button>
|
|
425
|
+
</DocumentFragment>
|
|
426
|
+
`;
|
|
427
|
+
|
|
428
|
+
exports[`Button component Should render palette of buttons - tertiaryFilled 1`] = `
|
|
429
|
+
<DocumentFragment>
|
|
430
|
+
<button
|
|
431
|
+
class="bold tertiaryfilled medium"
|
|
432
|
+
data-id="buttonComp"
|
|
433
|
+
data-selector-id="button"
|
|
434
|
+
data-test-id="buttonComp"
|
|
435
|
+
type="button"
|
|
436
|
+
>
|
|
437
|
+
Button
|
|
438
|
+
</button>
|
|
439
|
+
</DocumentFragment>
|
|
440
|
+
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -37,10 +37,11 @@
|
|
|
37
37
|
"rtl:watch": "react-cli rtl ./src ./es -w",
|
|
38
38
|
"build:css:umd": "npm run clean && npm run init && react-cli build:css:umd",
|
|
39
39
|
"coverage": "react-cli coverage",
|
|
40
|
-
"prepare": "
|
|
40
|
+
"prepare": "npm run init && npm run build && npm run rtl && npm run cssVariableConvert ",
|
|
41
|
+
"prepublishOnly": "node prePublish.js && npm run test",
|
|
41
42
|
"postpublish": "node postPublish.js",
|
|
42
43
|
"report": "react-cli publish:report",
|
|
43
|
-
"
|
|
44
|
+
"snap-update": "npm run test -- -u",
|
|
44
45
|
"sstest": "npm run init && react-cli sstest",
|
|
45
46
|
"build:external": "npm run clean && npm run init && npm run docsjs:build && npm run build:externalDocCopy && react-cli build:component:umd && npm run externalDocHTMLChange",
|
|
46
47
|
"download": "react-cli clean ./node_modules ./package-lock.json && npm install",
|
|
@@ -49,17 +50,21 @@
|
|
|
49
50
|
"variable:addignore": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableIgnore.js ./src",
|
|
50
51
|
"variable:convert": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/pxParserPostcss.js ./src",
|
|
51
52
|
"variable:check": "node ./node_modules/@zohodesk-private/css-variable-migrator/es/variableErrorCheck.js ./src ./node_modules/@zohodesk-private/css-variable-migrator/es/config/cssVariableReplacementOptions.json",
|
|
52
|
-
"review:props": "node ./node_modules/@zohodesk-private/react-prop-validator/es/propValidation.js ./src/ ./.cli "
|
|
53
|
+
"review:props": "node ./node_modules/@zohodesk-private/react-prop-validator/es/propValidation.js ./src/ ./.cli ./.cli devMode "
|
|
53
54
|
},
|
|
54
55
|
"devDependencies": {
|
|
55
|
-
"@
|
|
56
|
+
"@testing-library/jest-dom": "^5.11.9",
|
|
57
|
+
"@testing-library/react": "^11.2.5",
|
|
58
|
+
"@testing-library/react-hooks": "^7.0.2",
|
|
59
|
+
"@testing-library/user-event": "^13.0.10",
|
|
60
|
+
"@zohodesk-private/color-variable-preprocessor": "1.0.6",
|
|
56
61
|
"@zohodesk-private/react-prop-validator": "0.0.4",
|
|
57
62
|
"@zohodesk-private/css-variable-migrator": "^1.0.5",
|
|
58
63
|
"@zohodesk/a11y": "2.0.0",
|
|
59
64
|
"@zohodesk-private/node-plugins": "^1.0.0",
|
|
60
65
|
"@zohodesk/docstool": "1.0.0-alpha-2",
|
|
61
66
|
"@zohodesk/icons": "1.0.0",
|
|
62
|
-
"@zohodesk/svg": "1.1.
|
|
67
|
+
"@zohodesk/svg": "1.1.1",
|
|
63
68
|
"@zohodesk/variables": "1.0.0",
|
|
64
69
|
"@zohodesk/virtualizer": "1.0.3",
|
|
65
70
|
"react-sortable-hoc": "^0.8.3",
|
|
@@ -74,7 +79,7 @@
|
|
|
74
79
|
"peerDependencies": {
|
|
75
80
|
"@zohodesk/icons": "1.0.0",
|
|
76
81
|
"@zohodesk/variables": "1.0.0",
|
|
77
|
-
"@zohodesk/svg": "1.1.
|
|
82
|
+
"@zohodesk/svg": "1.1.1",
|
|
78
83
|
"@zohodesk/virtualizer": "1.0.3",
|
|
79
84
|
"velocity-react": "1.4.3",
|
|
80
85
|
"react-sortable-hoc": "^0.8.3",
|
package/result.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"jobDetails":{"isRunByLocal":true,"hostName":"karuppiah-zt111","platForm":"Windows_NT","branchName":"KaruppiahRK"},"tests":{"unitCase":{"isExecuted":"Yes","numberOfSuccess":0,"numberOfFails":0,"numberOfCases":0,"numberOfSuites":1,"endTime":1691156768195,"startTime":1691156764695,"coverageDetail":{"codeCoveragePercentage":null,"fileCoveragePercentage":0},"fileDetails":[{"fileName":"D:\\git\\client\\desklibrary\\KaruppiahRK\\jsapps\\dot\\components\\src\\Button\\__tests__\\Button.spec.js","CaseList":{"passedCaseList":[],"failedCaseList":[]}},{"fileName":"D:\\git\\client\\desklibrary\\KaruppiahRK\\jsapps\\dot\\components\\src\\Button\\__tests__\\Button.spec.js","CaseList":{"passedCaseList":[],"failedCaseList":[]}},{"fileName":"D:\\git\\client\\desklibrary\\KaruppiahRK\\jsapps\\dot\\components\\src\\Button\\__tests__\\Button.spec.js","CaseList":{"passedCaseList":[],"failedCaseList":[]}}]}}}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Accordion, AccordionItem } from '../index';
|
|
3
|
-
describe('Accordion component specification', () => {
|
|
4
|
-
it('open accordion item id 1 ', () => {
|
|
5
|
-
let renderedDOM = TestUtils.renderIntoDocument( /*#__PURE__*/React.createElement(Accordion, {
|
|
6
|
-
selectedItem: "1",
|
|
7
|
-
height: "100px",
|
|
8
|
-
maxheight: "100px"
|
|
9
|
-
}, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
10
|
-
id: "1"
|
|
11
|
-
}, /*#__PURE__*/React.createElement("div", null, "Acc-1"), /*#__PURE__*/React.createElement("div", {
|
|
12
|
-
"data-id": "data"
|
|
13
|
-
}, "Data1")), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
14
|
-
id: "2"
|
|
15
|
-
}, /*#__PURE__*/React.createElement("div", null, "Acc-2"), /*#__PURE__*/React.createElement("div", {
|
|
16
|
-
"data-id": "data"
|
|
17
|
-
}, "Data2"))));
|
|
18
|
-
expect(TestUtils.findRenderedComponentsWithTestid(renderedDOM, 'data').textContent.contains('Data1')).toBe(true);
|
|
19
|
-
});
|
|
20
|
-
it('open accordion item id 1 ', () => {
|
|
21
|
-
let renderedDOM = TestUtils.renderIntoDocument( /*#__PURE__*/React.createElement(Accordion, {
|
|
22
|
-
selectedItem: "2",
|
|
23
|
-
height: "100px",
|
|
24
|
-
maxheight: "100px"
|
|
25
|
-
}, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
26
|
-
id: "1"
|
|
27
|
-
}, /*#__PURE__*/React.createElement("div", null, "Acc-1"), /*#__PURE__*/React.createElement("div", {
|
|
28
|
-
"data-id": "data"
|
|
29
|
-
}, "Data1")), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
30
|
-
id: "2"
|
|
31
|
-
}, /*#__PURE__*/React.createElement("div", null, "Acc-2"), /*#__PURE__*/React.createElement("div", {
|
|
32
|
-
"data-id": "data"
|
|
33
|
-
}, "Data2"))));
|
|
34
|
-
expect(TestUtils.findRenderedComponentsWithTestid(renderedDOM, 'data').textContent.contains('Data2')).toBe(true);
|
|
35
|
-
});
|
|
36
|
-
it('accordion item 2 click check', () => {
|
|
37
|
-
let renderedDOM = TestUtils.renderIntoDocument( /*#__PURE__*/React.createElement(Accordion, {
|
|
38
|
-
selectedItem: "1",
|
|
39
|
-
height: "100px",
|
|
40
|
-
maxheight: "100px"
|
|
41
|
-
}, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
42
|
-
id: "1"
|
|
43
|
-
}, /*#__PURE__*/React.createElement("div", null, "Acc-1"), /*#__PURE__*/React.createElement("div", {
|
|
44
|
-
"data-id": "data"
|
|
45
|
-
}, "Data1")), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
46
|
-
id: "2"
|
|
47
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
"data-id": "ah2"
|
|
49
|
-
}, "Acc-2"), /*#__PURE__*/React.createElement("div", {
|
|
50
|
-
"data-id": "data1"
|
|
51
|
-
}, "Data2"))));
|
|
52
|
-
let acc2 = TestUtils.findRenderedComponentsWithTestid(renderedDOM, 'ah2');
|
|
53
|
-
expect(TestUtils.findRenderedComponentsWithTestid(renderedDOM, 'data').textContent.contains('Data1')).toBe(true);
|
|
54
|
-
TestUtils.Simulate.click(acc2);
|
|
55
|
-
expect(TestUtils.findRenderedComponentsWithTestid(renderedDOM, 'data1').textContent.contains('Data2')).toBe(true);
|
|
56
|
-
});
|
|
57
|
-
it('accordion click callback check ', () => {
|
|
58
|
-
let mockfn = jest.fn();
|
|
59
|
-
let renderedDOM = TestUtils.renderIntoDocument( /*#__PURE__*/React.createElement(Accordion, {
|
|
60
|
-
selectedItem: "1",
|
|
61
|
-
height: "100px",
|
|
62
|
-
maxheight: "100px",
|
|
63
|
-
onSelect: mockfn
|
|
64
|
-
}, /*#__PURE__*/React.createElement(AccordionItem, {
|
|
65
|
-
id: "1"
|
|
66
|
-
}, /*#__PURE__*/React.createElement("div", null, "Acc-1"), /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
"data-id": "data"
|
|
68
|
-
}, "Data1")), /*#__PURE__*/React.createElement(AccordionItem, {
|
|
69
|
-
id: "2"
|
|
70
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
71
|
-
"data-id": "ah2"
|
|
72
|
-
}, "Acc-2"), /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
"data-id": "data"
|
|
74
|
-
}, "Data2"))));
|
|
75
|
-
let acc2 = TestUtils.findRenderedComponentsWithTestid(renderedDOM, 'ah2');
|
|
76
|
-
TestUtils.Simulate.click(acc2);
|
|
77
|
-
expect(mockfn.mock.calls.length).toBe(1);
|
|
78
|
-
});
|
|
79
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import Animation from '../Animation';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
describe('Animation Component Test Cases', () => {
|
|
4
|
-
it('Animation component mount testcases', () => {
|
|
5
|
-
const {
|
|
6
|
-
props,
|
|
7
|
-
renderedDOM
|
|
8
|
-
} = setup(Animation, {
|
|
9
|
-
children: /*#__PURE__*/React.createElement("div", {
|
|
10
|
-
"data-id": "animation"
|
|
11
|
-
}, "Hi all"),
|
|
12
|
-
isActive: true
|
|
13
|
-
});
|
|
14
|
-
let component = TestUtils.findRenderedComponentsWithTestid(renderedDOM, 'animation');
|
|
15
|
-
expect(component.getAttribute('data-id')).toBe('animation');
|
|
16
|
-
});
|
|
17
|
-
});
|