@zohodesk/dot 1.0.0-temp-210.1 → 1.0.0-temp-211

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.
Files changed (55) hide show
  1. package/.cli/propValidation_report.html +1 -1
  2. package/README.md +5 -0
  3. package/es/ActionButton/__tests__/ActionButton.spec.js +353 -2
  4. package/es/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +2633 -1
  5. package/es/Drawer/Drawer.js +2 -10
  6. package/es/Drawer/__tests__/Content.spec.js +24 -0
  7. package/es/Drawer/__tests__/Drawer.spec.js +130 -4
  8. package/es/Drawer/__tests__/Footer.spec.js +34 -0
  9. package/es/Drawer/__tests__/Header.spec.js +173 -0
  10. package/es/Drawer/__tests__/__snapshots__/Content.spec.js.snap +127 -0
  11. package/es/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +535 -2
  12. package/es/Drawer/__tests__/__snapshots__/Footer.spec.js.snap +1233 -0
  13. package/es/Drawer/__tests__/__snapshots__/Header.spec.js.snap +782 -0
  14. package/es/Drawer/props/defaultProps.js +1 -5
  15. package/es/Drawer/props/propTypes.js +1 -5
  16. package/es/FlipCard/__tests__/FlipCard.spec.js +606 -2
  17. package/es/FlipCard/__tests__/__snapshots__/FlipCard.spec.js.snap +6626 -1
  18. package/es/FreezeLayer/FreezeLayer.js +3 -11
  19. package/es/FreezeLayer/props/defaultProps.js +1 -5
  20. package/es/FreezeLayer/props/propTypes.js +1 -5
  21. package/es/Link/__tests__/Link.spec.js +123 -3
  22. package/es/Link/__tests__/__snapshots__/Link.spec.js.snap +142 -2
  23. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +8 -2
  24. package/es/list/ListStencils/ListStencils.js +7 -2
  25. package/es/list/ListStencils/__tests__/ListStencils.spec.js +9 -0
  26. package/es/list/ListStencils/__tests__/__snapshots__/ListStencils.spec.js.snap +46 -0
  27. package/es/list/ListStencils/props/propTypes.js +3 -1
  28. package/lib/ActionButton/__tests__/ActionButton.spec.js +354 -1
  29. package/lib/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +2633 -1
  30. package/lib/Drawer/Drawer.js +2 -10
  31. package/lib/Drawer/__tests__/Content.spec.js +35 -0
  32. package/lib/Drawer/__tests__/Drawer.spec.js +132 -5
  33. package/lib/Drawer/__tests__/Footer.spec.js +41 -0
  34. package/lib/Drawer/__tests__/Header.spec.js +192 -0
  35. package/lib/Drawer/__tests__/__snapshots__/Content.spec.js.snap +127 -0
  36. package/lib/Drawer/__tests__/__snapshots__/Drawer.spec.js.snap +535 -2
  37. package/lib/Drawer/__tests__/__snapshots__/Footer.spec.js.snap +1233 -0
  38. package/lib/Drawer/__tests__/__snapshots__/Header.spec.js.snap +782 -0
  39. package/lib/Drawer/props/defaultProps.js +1 -5
  40. package/lib/Drawer/props/propTypes.js +1 -5
  41. package/lib/FlipCard/__tests__/FlipCard.spec.js +613 -1
  42. package/lib/FlipCard/__tests__/__snapshots__/FlipCard.spec.js.snap +6626 -1
  43. package/lib/FreezeLayer/FreezeLayer.js +3 -11
  44. package/lib/FreezeLayer/props/defaultProps.js +1 -5
  45. package/lib/FreezeLayer/props/propTypes.js +1 -5
  46. package/lib/Link/__tests__/Link.spec.js +130 -4
  47. package/lib/Link/__tests__/__snapshots__/Link.spec.js.snap +142 -2
  48. package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +12 -6
  49. package/lib/list/ListStencils/ListStencils.js +8 -2
  50. package/lib/list/ListStencils/__tests__/ListStencils.spec.js +9 -0
  51. package/lib/list/ListStencils/__tests__/__snapshots__/ListStencils.spec.js.snap +46 -0
  52. package/lib/list/ListStencils/props/propTypes.js +3 -1
  53. package/package.json +6 -6
  54. package/result.json +1 -0
  55. package/unittest/index.html +45 -0
@@ -20,9 +20,5 @@ export const Drawer_defaultProps = {
20
20
  onBodyClick: () => {},
21
21
  needFocusScope: false,
22
22
  customProps: {},
23
- a11y: {},
24
- onParentAnimateComplete: () => {},
25
- onChildAnimateComplete: () => {},
26
- postAnimateParentStyles: {},
27
- postAnimateChildStyles: {}
23
+ a11y: {}
28
24
  };
@@ -50,9 +50,5 @@ export const Drawer_propTypes = {
50
50
  needFocusScope: PropTypes.bool,
51
51
  customProps: PropTypes.object,
52
52
  innerPortalName: PropTypes.string,
53
- a11y: PropTypes.object,
54
- onParentAnimateComplete: PropTypes.func,
55
- onChildAnimateComplete: PropTypes.func,
56
- postAnimateParentStyles: PropTypes.object,
57
- postAnimateChildStyles: PropTypes.object
53
+ a11y: PropTypes.object
58
54
  };
@@ -1,11 +1,615 @@
1
1
  import React from 'react';
2
- import { render } from '@testing-library/react';
2
+ import { render, fireEvent } from '@testing-library/react';
3
3
  import FlipCard from "../FlipCard";
4
4
  describe('FlipCard', () => {
5
- test('rendering the defult props', () => {
5
+ const palettes = ['primary', 'secondary', 'info', 'default'];
6
+ const textPalettes = ['white', 'black'];
7
+ const sizes = ['small', 'medium', 'large'];
8
+ test('renders with default props', () => {
6
9
  const {
7
10
  asFragment
8
11
  } = render( /*#__PURE__*/React.createElement(FlipCard, null));
9
12
  expect(asFragment()).toMatchSnapshot();
10
13
  });
14
+ test('renders with id', () => {
15
+ const {
16
+ asFragment
17
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
18
+ id: "unique-id"
19
+ }));
20
+ expect(asFragment()).toMatchSnapshot();
21
+ });
22
+ test('renders with action', () => {
23
+ const {
24
+ asFragment
25
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
26
+ action: "incoming"
27
+ }));
28
+ expect(asFragment()).toMatchSnapshot();
29
+ });
30
+ test('renders with name', () => {
31
+ const {
32
+ asFragment
33
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
34
+ name: "Test Name"
35
+ }));
36
+ expect(asFragment()).toMatchSnapshot();
37
+ });
38
+ test('renders with initial', () => {
39
+ const {
40
+ asFragment
41
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
42
+ initial: "T"
43
+ }));
44
+ expect(asFragment()).toMatchSnapshot();
45
+ });
46
+ test('renders with isChecked - true', () => {
47
+ const {
48
+ asFragment
49
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
50
+ isChecked: true
51
+ }));
52
+ expect(asFragment()).toMatchSnapshot();
53
+ });
54
+ test('renders with noNeedFlip - true', () => {
55
+ const {
56
+ asFragment
57
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
58
+ noNeedFlip: true
59
+ }));
60
+ expect(asFragment()).toMatchSnapshot();
61
+ });
62
+ test('renders with noNeedFlip set to false', () => {
63
+ const {
64
+ asFragment
65
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
66
+ noNeedFlip: false
67
+ }));
68
+ expect(asFragment()).toMatchSnapshot();
69
+ });
70
+ test('renders with noNeedFlip set to true and isChecked set to true', () => {
71
+ const {
72
+ asFragment
73
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
74
+ noNeedFlip: true,
75
+ isChecked: true
76
+ }));
77
+ expect(asFragment()).toMatchSnapshot();
78
+ });
79
+ test('renders with noNeedFlip set to false and isChecked set to true', () => {
80
+ const {
81
+ asFragment
82
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
83
+ noNeedFlip: false,
84
+ isChecked: true
85
+ }));
86
+ expect(asFragment()).toMatchSnapshot();
87
+ });
88
+ test('renders with noNeedFlip set to true and size variations', () => {
89
+ sizes.forEach(size => {
90
+ const {
91
+ asFragment
92
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
93
+ noNeedFlip: true,
94
+ size: size
95
+ }));
96
+ expect(asFragment()).toMatchSnapshot();
97
+ });
98
+ });
99
+ test('renders with noNeedFlip set to false and size variations', () => {
100
+ sizes.forEach(size => {
101
+ const {
102
+ asFragment
103
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
104
+ noNeedFlip: false,
105
+ size: size
106
+ }));
107
+ expect(asFragment()).toMatchSnapshot();
108
+ });
109
+ });
110
+ test('renders with noNeedFlip set to true and custom props', () => {
111
+ const customProps = {
112
+ CheckBoxProps: {
113
+ checked: true
114
+ },
115
+ ChannelIconProps: {
116
+ name: 'email'
117
+ },
118
+ AvatarIconProps: {
119
+ name: 'user-icon'
120
+ },
121
+ AvatarUserProps: {
122
+ isPaid: true
123
+ }
124
+ };
125
+ const {
126
+ asFragment
127
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
128
+ noNeedFlip: true,
129
+ customProps: customProps
130
+ }));
131
+ expect(asFragment()).toMatchSnapshot();
132
+ });
133
+ test('renders with noNeedFlip set to false and custom props', () => {
134
+ const customProps = {
135
+ CheckBoxProps: {
136
+ checked: true
137
+ },
138
+ ChannelIconProps: {
139
+ name: 'chat'
140
+ },
141
+ AvatarIconProps: {
142
+ name: 'user-icon'
143
+ },
144
+ AvatarUserProps: {
145
+ isPaid: false
146
+ }
147
+ };
148
+ const {
149
+ asFragment
150
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
151
+ noNeedFlip: false,
152
+ customProps: customProps
153
+ }));
154
+ expect(asFragment()).toMatchSnapshot();
155
+ });
156
+ test.each(sizes)('renders with size - %s', size => {
157
+ const {
158
+ asFragment
159
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
160
+ size: size
161
+ }));
162
+ expect(asFragment()).toMatchSnapshot();
163
+ });
164
+ test('renders with channel', () => {
165
+ const {
166
+ asFragment
167
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
168
+ channel: "Test Channel"
169
+ }));
170
+ expect(asFragment()).toMatchSnapshot();
171
+ });
172
+ test('renders with isPaidUser - true', () => {
173
+ const {
174
+ asFragment
175
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
176
+ isPaidUser: true
177
+ }));
178
+ expect(asFragment()).toMatchSnapshot();
179
+ });
180
+ test('renders with isPortalUser - true', () => {
181
+ const {
182
+ asFragment
183
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
184
+ isPortalUser: true
185
+ }));
186
+ expect(asFragment()).toMatchSnapshot();
187
+ });
188
+ test('renders with src', () => {
189
+ const {
190
+ asFragment
191
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
192
+ src: "https://www.zoho.com/"
193
+ }));
194
+ expect(asFragment()).toMatchSnapshot();
195
+ });
196
+ test('renders with icon', () => {
197
+ const {
198
+ asFragment
199
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
200
+ icon: "ZD-chEmail"
201
+ }));
202
+ expect(asFragment()).toMatchSnapshot();
203
+ });
204
+ test('renders with iconSize', () => {
205
+ const {
206
+ asFragment
207
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
208
+ iconSize: "medium"
209
+ }));
210
+ expect(asFragment()).toMatchSnapshot();
211
+ });
212
+ test('renders with iconClass', () => {
213
+ const {
214
+ asFragment
215
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
216
+ iconClass: "icon-class"
217
+ }));
218
+ expect(asFragment()).toMatchSnapshot();
219
+ });
220
+ test('renders with ticListContainer', () => {
221
+ const {
222
+ asFragment
223
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
224
+ ticListContainer: "container-id"
225
+ }));
226
+ expect(asFragment()).toMatchSnapshot();
227
+ });
228
+ test('renders with ticList', () => {
229
+ const {
230
+ asFragment
231
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
232
+ ticList: "tic-list-id"
233
+ }));
234
+ expect(asFragment()).toMatchSnapshot();
235
+ });
236
+ test('renders with dataId', () => {
237
+ const {
238
+ asFragment
239
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
240
+ dataId: "data-id-123"
241
+ }));
242
+ expect(asFragment()).toMatchSnapshot();
243
+ });
244
+ test('renders with className', () => {
245
+ const {
246
+ asFragment
247
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
248
+ className: "custom-class"
249
+ }));
250
+ expect(asFragment()).toMatchSnapshot();
251
+ });
252
+ test.each(palettes)('renders with palette - %s', palette => {
253
+ const {
254
+ asFragment
255
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
256
+ palette: palette
257
+ }));
258
+ expect(asFragment()).toMatchSnapshot();
259
+ });
260
+ test.each(textPalettes)('renders with textPalette - %s', textPalette => {
261
+ const {
262
+ asFragment
263
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
264
+ textPalette: textPalette
265
+ }));
266
+ expect(asFragment()).toMatchSnapshot();
267
+ });
268
+ test('renders with customTextClass', () => {
269
+ const {
270
+ asFragment
271
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
272
+ customTextClass: "custom-text-class"
273
+ }));
274
+ expect(asFragment()).toMatchSnapshot();
275
+ });
276
+ test('renders with frontClass', () => {
277
+ const {
278
+ asFragment
279
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
280
+ frontClass: "front-class"
281
+ }));
282
+ expect(asFragment()).toMatchSnapshot();
283
+ });
284
+ test('renders with needTitle - true', () => {
285
+ const {
286
+ asFragment
287
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
288
+ needTitle: true,
289
+ name: "channel"
290
+ }));
291
+ expect(asFragment()).toMatchSnapshot();
292
+ });
293
+ test('renders with iconColor', () => {
294
+ const {
295
+ asFragment
296
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
297
+ iconColor: "primary"
298
+ }));
299
+ expect(asFragment()).toMatchSnapshot();
300
+ });
301
+ test('renders with tourId', () => {
302
+ const {
303
+ asFragment
304
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
305
+ tourId: "tour-123"
306
+ }));
307
+ expect(asFragment()).toMatchSnapshot();
308
+ });
309
+ test('renders with isFilledCheckbox - true', () => {
310
+ const {
311
+ asFragment
312
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
313
+ isFilledCheckbox: true
314
+ }));
315
+ expect(asFragment()).toMatchSnapshot();
316
+ });
317
+ test('renders with channelTitle', () => {
318
+ const {
319
+ asFragment
320
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
321
+ channelTitle: "Test Channel Title"
322
+ }));
323
+ expect(asFragment()).toMatchSnapshot();
324
+ });
325
+ test('renders with customProps', () => {
326
+ const customProps = {
327
+ CheckBoxProps: {
328
+ checked: "isChecked"
329
+ },
330
+ ChannelIconProps: {
331
+ name: "channel"
332
+ },
333
+ AvatarIconProps: {
334
+ name: "icon"
335
+ },
336
+ AvatarUserProps: {
337
+ isPaid: "isPaidUser"
338
+ }
339
+ };
340
+ const {
341
+ asFragment
342
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
343
+ customProps: customProps
344
+ }));
345
+ expect(asFragment()).toMatchSnapshot();
346
+ });
347
+ test('renders correctly with customProps for CheckBoxProps', () => {
348
+ const customProps = {
349
+ CheckBoxProps: {
350
+ checked: true
351
+ }
352
+ };
353
+ const {
354
+ asFragment
355
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
356
+ customProps: customProps
357
+ }));
358
+ expect(asFragment()).toMatchSnapshot();
359
+ });
360
+ test('renders correctly with customProps for ChannelIconProps', () => {
361
+ const customProps = {
362
+ ChannelIconProps: {
363
+ name: "email"
364
+ }
365
+ };
366
+ const {
367
+ asFragment
368
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
369
+ customProps: customProps
370
+ }));
371
+ expect(asFragment()).toMatchSnapshot();
372
+ });
373
+ test('renders correctly with customProps for AvatarIconProps', () => {
374
+ const customProps = {
375
+ AvatarIconProps: {
376
+ name: "user-icon"
377
+ }
378
+ };
379
+ const {
380
+ asFragment
381
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
382
+ customProps: customProps
383
+ }));
384
+ expect(asFragment()).toMatchSnapshot();
385
+ });
386
+ test('renders correctly with customProps for AvatarUserProps', () => {
387
+ const customProps = {
388
+ AvatarUserProps: {
389
+ isPaid: true
390
+ }
391
+ };
392
+ const {
393
+ asFragment
394
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
395
+ customProps: customProps
396
+ }));
397
+ expect(asFragment()).toMatchSnapshot();
398
+ });
399
+ test('renders correctly with customProps for multiple props', () => {
400
+ const customProps = {
401
+ CheckBoxProps: {
402
+ checked: true
403
+ },
404
+ ChannelIconProps: {
405
+ name: "chat"
406
+ },
407
+ AvatarIconProps: {
408
+ name: "user-icon"
409
+ },
410
+ AvatarUserProps: {
411
+ isPaid: false
412
+ }
413
+ };
414
+ const {
415
+ asFragment
416
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
417
+ customProps: customProps
418
+ }));
419
+ expect(asFragment()).toMatchSnapshot();
420
+ });
421
+ test('renders correctly with channel: email and action: incoming', () => {
422
+ const {
423
+ asFragment
424
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
425
+ channel: "email",
426
+ action: "incoming"
427
+ }));
428
+ expect(asFragment()).toMatchSnapshot();
429
+ });
430
+ test('renders correctly with channel: chat and action: outgoing', () => {
431
+ const {
432
+ asFragment
433
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
434
+ channel: "chat",
435
+ action: "outgoing"
436
+ }));
437
+ expect(asFragment()).toMatchSnapshot();
438
+ });
439
+ test('renders correctly with channel: call and action: missed', () => {
440
+ const {
441
+ asFragment
442
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
443
+ channel: "call",
444
+ action: "missed"
445
+ }));
446
+ expect(asFragment()).toMatchSnapshot();
447
+ });
448
+ test('renders correctly with channel: social and action: incoming', () => {
449
+ const {
450
+ asFragment
451
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
452
+ channel: "social",
453
+ action: "incoming"
454
+ }));
455
+ expect(asFragment()).toMatchSnapshot();
456
+ });
457
+ test('renders correctly with channel: sms and action: outgoing', () => {
458
+ const {
459
+ asFragment
460
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
461
+ channel: "sms",
462
+ action: "outgoing"
463
+ }));
464
+ expect(asFragment()).toMatchSnapshot();
465
+ });
466
+ test('renders correctly with name and icon', () => {
467
+ const {
468
+ asFragment
469
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
470
+ name: "Test Name",
471
+ icon: "ZD-icon"
472
+ }));
473
+ expect(asFragment()).toMatchSnapshot();
474
+ });
475
+ test('renders correctly with name but without icon', () => {
476
+ const {
477
+ asFragment
478
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
479
+ name: "Test Name"
480
+ }));
481
+ expect(asFragment()).toMatchSnapshot();
482
+ });
483
+ test('renders correctly with needTitle set to true and name', () => {
484
+ const {
485
+ asFragment
486
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
487
+ needTitle: true,
488
+ name: "Test Name"
489
+ }));
490
+ expect(asFragment()).toMatchSnapshot();
491
+ });
492
+ test('renders correctly with needTitle set to false and name', () => {
493
+ const {
494
+ asFragment
495
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
496
+ needTitle: false,
497
+ name: "Test Name"
498
+ }));
499
+ expect(asFragment()).toMatchSnapshot();
500
+ });
501
+ test('renders correctly with needTitle set to true, icon, and name', () => {
502
+ const {
503
+ asFragment
504
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
505
+ needTitle: true,
506
+ icon: "ZD-icon",
507
+ name: "Test Name"
508
+ }));
509
+ expect(asFragment()).toMatchSnapshot();
510
+ });
511
+ test('renders correctly with needTitle set to false, icon, and name', () => {
512
+ const {
513
+ asFragment
514
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
515
+ needTitle: false,
516
+ icon: "ZD-icon",
517
+ name: "Test Name"
518
+ }));
519
+ expect(asFragment()).toMatchSnapshot();
520
+ });
521
+ test.each(sizes)('renders correctly with size: %s and icon', size => {
522
+ const {
523
+ asFragment
524
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
525
+ size: size,
526
+ icon: "ZD-icon"
527
+ }));
528
+ expect(asFragment()).toMatchSnapshot();
529
+ });
530
+ test.each(sizes)('renders correctly with size: %s and initial', size => {
531
+ const {
532
+ asFragment
533
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
534
+ size: size,
535
+ initial: "T"
536
+ }));
537
+ expect(asFragment()).toMatchSnapshot();
538
+ });
539
+ test.each(sizes)('renders correctly with size: %s and src', size => {
540
+ const {
541
+ asFragment
542
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
543
+ size: size,
544
+ src: "https://www.zoho.com/"
545
+ }));
546
+ expect(asFragment()).toMatchSnapshot();
547
+ });
548
+ test.each(sizes)('renders correctly with size: %s and name', size => {
549
+ const {
550
+ asFragment
551
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
552
+ size: size,
553
+ name: "Test Name"
554
+ }));
555
+ expect(asFragment()).toMatchSnapshot();
556
+ });
557
+ test('renders correctly with iconSize as a number', () => {
558
+ const {
559
+ asFragment
560
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
561
+ iconSize: 24
562
+ }));
563
+ expect(asFragment()).toMatchSnapshot();
564
+ });
565
+ test('renders correctly with iconSize as a number and channel & action', () => {
566
+ const {
567
+ asFragment
568
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
569
+ iconSize: 32,
570
+ channel: "email",
571
+ action: "incoming"
572
+ }));
573
+ expect(asFragment()).toMatchSnapshot();
574
+ });
575
+ test('renders correctly with className, channel, and action', () => {
576
+ const {
577
+ asFragment
578
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
579
+ className: "custom-class",
580
+ channel: "email",
581
+ action: "incoming"
582
+ }));
583
+ expect(asFragment()).toMatchSnapshot();
584
+ });
585
+ test('renders correctly with palette, channel, and action', () => {
586
+ const {
587
+ asFragment
588
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
589
+ palette: "primary",
590
+ channel: "chat",
591
+ action: "outgoing"
592
+ }));
593
+ expect(asFragment()).toMatchSnapshot();
594
+ });
595
+ test('renders correctly with textPalette, channel, and action', () => {
596
+ const {
597
+ asFragment
598
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
599
+ textPalette: "white",
600
+ channel: "call",
601
+ action: "missed"
602
+ }));
603
+ expect(asFragment()).toMatchSnapshot();
604
+ });
605
+ test('renders correctly with customTextClass, channel, and action', () => {
606
+ const {
607
+ asFragment
608
+ } = render( /*#__PURE__*/React.createElement(FlipCard, {
609
+ customTextClass: "custom-text-class",
610
+ channel: "social",
611
+ action: "incoming"
612
+ }));
613
+ expect(asFragment()).toMatchSnapshot();
614
+ });
11
615
  });