@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
|
+
`;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// import React from 'react';
|
|
2
|
+
// import Button from '../Button';
|
|
3
|
+
// import {render} from "@testing-library/react"
|
|
4
|
+
// describe('Button component', () => {
|
|
5
|
+
// test('Should be render with the basic set of default props', () => {
|
|
6
|
+
// const { asFragment } = render(<Button />);
|
|
7
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
8
|
+
// });
|
|
9
|
+
// const palette = ['plainPrimary', 'plainSecondary', 'primary', 'primaryFilled', 'dangerFilled', 'secondary', 'secondaryFilled', 'successFilled', 'info', 'tertiaryFilled'];
|
|
10
|
+
// test.each(palette)('Should render palette of buttons - %s', (palette) => {
|
|
11
|
+
// const { asFragment } = render(<Button palette={palette} />);
|
|
12
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
13
|
+
// });
|
|
14
|
+
// const size = ['small', 'medium', 'large', 'xlarge'];
|
|
15
|
+
// test.each(size)('Should render Sizes of buttons - %s', (size) => {
|
|
16
|
+
// const { asFragment } = render(<Button size={size} />);
|
|
17
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
18
|
+
// });
|
|
19
|
+
// const status = ['loading', 'success', 'none'];
|
|
20
|
+
// test.each(status)('Should render Status of buttons - %s', (status) => {
|
|
21
|
+
// const { asFragment } = render(<Button status={status} />);
|
|
22
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
23
|
+
// });
|
|
24
|
+
// const customStatus = ['loading', 'success'];
|
|
25
|
+
// test.each(customStatus)('Should render CustomStatusclassname of buttons - %s', (customStatus) => {
|
|
26
|
+
// const { asFragment } = render(<Button status={customStatus} customClass={{customStatus:"customStautusClassName"}} />);
|
|
27
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
28
|
+
// });
|
|
29
|
+
// test('Should be render with the basic set of default props with disabled is true', () => {
|
|
30
|
+
// const { asFragment } = render(<Button disabled />);
|
|
31
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
32
|
+
// });
|
|
33
|
+
// test('Should be render with the basic set of default props with isBold is false', () => {
|
|
34
|
+
// const { asFragment } = render(<Button isBold={false} />);
|
|
35
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
36
|
+
// });
|
|
37
|
+
// test('Should be render with the basic set of default props with rounded is true', () => {
|
|
38
|
+
// const { asFragment } = render(<Button rounded />);
|
|
39
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
40
|
+
// });
|
|
41
|
+
// test('Should be render with the basic set of default props with needAppearance is false', () => {
|
|
42
|
+
// const { asFragment } = render(<Button needAppearance={false} />);
|
|
43
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
44
|
+
// });
|
|
45
|
+
// test('Should be render with the basic set customButtonclass with buttonClass ', () => {
|
|
46
|
+
// const { asFragment } = render(<Button customClass={{customButton:"customButtonClass"}} />);
|
|
47
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
48
|
+
// });
|
|
49
|
+
// test('Should be render with the basic set customstatusSize props with buttonClass ', () => {
|
|
50
|
+
// const { asFragment } = render(<Button customClass={{customStatusSize:"customButtonClass"}} />);
|
|
51
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
52
|
+
// });
|
|
53
|
+
// test('Should be render with the basic set customstyle ', () => {
|
|
54
|
+
// const { asFragment } = render(<Button customStyle={{bold: "buttonBold"}} />);
|
|
55
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
56
|
+
// });
|
|
57
|
+
// test('Should be render with the customstyle with medium ', () => {
|
|
58
|
+
// const { asFragment } = render(<Button customStyle={{$medium: "buttonMedium"}} />);
|
|
59
|
+
// expect(asFragment()).toMatchSnapshot();
|
|
60
|
+
// });
|
|
61
|
+
// });
|
|
62
|
+
"use strict";
|