@bethinkpl/design-system 33.0.0 → 33.0.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.
|
@@ -423,17 +423,30 @@ describe('MenuItem', () => {
|
|
|
423
423
|
|
|
424
424
|
describe('Conditional rendering', () => {
|
|
425
425
|
it('does not render when no content is provided', () => {
|
|
426
|
-
const wrapper =
|
|
427
|
-
|
|
426
|
+
const wrapper = createComponent({
|
|
427
|
+
label: '',
|
|
428
|
+
additionalText: '',
|
|
429
|
+
index: null,
|
|
430
|
+
iconLeft: null,
|
|
431
|
+
});
|
|
432
|
+
|
|
433
|
+
expect(wrapper.find('.ds-menuItem').exists()).toBe(false);
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
it('does not render component but renders children slot if is provided', () => {
|
|
437
|
+
const wrapper = createComponent(
|
|
438
|
+
{
|
|
428
439
|
label: '',
|
|
429
|
-
additionalText: '',
|
|
430
|
-
index: null,
|
|
431
|
-
iconLeft: null,
|
|
432
|
-
isExpandable: false,
|
|
433
440
|
},
|
|
434
|
-
|
|
441
|
+
{
|
|
442
|
+
slots: {
|
|
443
|
+
children: '<strong data-test-id="children-identifier">children</strong>',
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
);
|
|
435
447
|
|
|
436
448
|
expect(wrapper.find('.ds-menuItem').exists()).toBe(false);
|
|
449
|
+
expect(wrapper.find('[data-test-id="children-identifier"]').exists()).toBe(true);
|
|
437
450
|
});
|
|
438
451
|
|
|
439
452
|
it('renders when label is provided', () => {
|