|
| 1 | +import React from 'react'; |
| 2 | +import { mount } from 'enzyme'; |
| 3 | +import { NotificationDrawer } from './index'; |
| 4 | + |
| 5 | +test('NotificationDrawer is working properly', () => { |
| 6 | + const component = mount( |
| 7 | + <NotificationDrawer> |
| 8 | + <div>Child</div> |
| 9 | + </NotificationDrawer> |
| 10 | + ); |
| 11 | + |
| 12 | + expect(component.render()).toMatchSnapshot(); |
| 13 | +}); |
| 14 | + |
| 15 | +test('NotificationDrawer Title is working properly', () => { |
| 16 | + const component = mount(<NotificationDrawer.Title />); |
| 17 | + |
| 18 | + expect(component.render()).toMatchSnapshot(); |
| 19 | +}); |
| 20 | + |
| 21 | +test('NotificationDrawer Accordion is working properly', () => { |
| 22 | + const component = mount( |
| 23 | + <NotificationDrawer.Accordion> |
| 24 | + <div>Child</div> |
| 25 | + </NotificationDrawer.Accordion> |
| 26 | + ); |
| 27 | + |
| 28 | + expect(component.render()).toMatchSnapshot(); |
| 29 | +}); |
| 30 | + |
| 31 | +test('NotificationDrawer Toggle is working properly', () => { |
| 32 | + const component = mount(<NotificationDrawer.Toggle />); |
| 33 | + |
| 34 | + expect(component.render()).toMatchSnapshot(); |
| 35 | +}); |
| 36 | + |
| 37 | +test('NotificationDrawer Dropdown is working properly', () => { |
| 38 | + const component = mount( |
| 39 | + <NotificationDrawer.Dropdown id="1"> |
| 40 | + <div>Child</div> |
| 41 | + </NotificationDrawer.Dropdown> |
| 42 | + ); |
| 43 | + |
| 44 | + expect(component.render()).toMatchSnapshot(); |
| 45 | +}); |
| 46 | + |
| 47 | +test('NotificationDrawer Panel is working properly', () => { |
| 48 | + const component = mount( |
| 49 | + <NotificationDrawer.Panel expanded> |
| 50 | + <div>Child</div> |
| 51 | + </NotificationDrawer.Panel> |
| 52 | + ); |
| 53 | + |
| 54 | + expect(component.render()).toMatchSnapshot(); |
| 55 | +}); |
| 56 | + |
| 57 | +test('NotificationDrawer Panel Action and Link is working properly', () => { |
| 58 | + const component = mount( |
| 59 | + <NotificationDrawer.PanelAction> |
| 60 | + <NotificationDrawer.PanelActionLink> |
| 61 | + <div>Child</div> |
| 62 | + </NotificationDrawer.PanelActionLink> |
| 63 | + </NotificationDrawer.PanelAction> |
| 64 | + ); |
| 65 | + |
| 66 | + expect(component.render()).toMatchSnapshot(); |
| 67 | +}); |
| 68 | + |
| 69 | +test('NotificationDrawer Panel Body is working properly', () => { |
| 70 | + const component = mount( |
| 71 | + <NotificationDrawer.PanelBody maxHeight={350}> |
| 72 | + <div>Child</div> |
| 73 | + </NotificationDrawer.PanelBody> |
| 74 | + ); |
| 75 | + |
| 76 | + expect(component.render()).toMatchSnapshot(); |
| 77 | +}); |
| 78 | + |
| 79 | +test('NotificationDrawer Panel Collapse is working properly', () => { |
| 80 | + const component = mount( |
| 81 | + <NotificationDrawer.PanelCollapse collapseIn> |
| 82 | + <div>Child</div> |
| 83 | + </NotificationDrawer.PanelCollapse> |
| 84 | + ); |
| 85 | + |
| 86 | + expect(component.render()).toMatchSnapshot(); |
| 87 | +}); |
| 88 | + |
| 89 | +test('NotificationDrawer Panel Counter is working properly', () => { |
| 90 | + const component = mount( |
| 91 | + <NotificationDrawer.PanelCounter> |
| 92 | + <div>Child</div> |
| 93 | + </NotificationDrawer.PanelCounter> |
| 94 | + ); |
| 95 | + |
| 96 | + expect(component.render()).toMatchSnapshot(); |
| 97 | +}); |
| 98 | + |
| 99 | +test('NotificationDrawer Panel Heading is working properly', () => { |
| 100 | + const component = mount( |
| 101 | + <NotificationDrawer.PanelHeading> |
| 102 | + <div>Child</div> |
| 103 | + </NotificationDrawer.PanelHeading> |
| 104 | + ); |
| 105 | + |
| 106 | + expect(component.render()).toMatchSnapshot(); |
| 107 | +}); |
| 108 | + |
| 109 | +test('NotificationDrawer Panel Title is working properly', () => { |
| 110 | + const component = mount(<NotificationDrawer.PanelTitle />); |
| 111 | + |
| 112 | + expect(component.render()).toMatchSnapshot(); |
| 113 | +}); |
0 commit comments