diff options
author | Sébastien Determe <sebastien.determe@intl.att.com> | 2019-10-04 14:17:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-10-04 14:17:32 +0000 |
commit | d58ae1b2ca0819924d4c6df78a0613441398befb (patch) | |
tree | 629fa3690fccd01049bbac5bce6af8c51e24c9a0 /ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js | |
parent | fd200512af757af56b106e158b58f4877a6bd08f (diff) | |
parent | 564fdb0c2e601df73813a4e9d080bd1666befce4 (diff) |
Merge "Add react ui test"
Diffstat (limited to 'ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js')
-rw-r--r-- | ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js b/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js index 5153de956..208c947c3 100644 --- a/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js +++ b/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js @@ -34,9 +34,9 @@ describe('Verify OpenLoopModal', () => { "LOOP_gmtAS_v1_0_ResourceInstanceName2_tca_2" ])); }) - + it('Test the render method', () => { - + const component = shallow(<OpenLoopModal/>); expect(component).toMatchSnapshot(); }); @@ -44,7 +44,6 @@ describe('Verify OpenLoopModal', () => { it('Onchange event', () => { const event = {value: 'LOOP_gmtAS_v1_0_ResourceInstanceName1_tca_3'}; const component = shallow(<OpenLoopModal/>); - const forms = component.find('StateManager'); component.find('StateManager').simulate('change', event); component.update(); @@ -60,7 +59,7 @@ describe('Verify OpenLoopModal', () => { expect(handleClose).toHaveBeenCalledTimes(1); expect(component.state('show')).toEqual(false); - expect(historyMock.push.mock.calls[0]).toEqual([ '/', ]); + expect(historyMock.push.mock.calls[0]).toEqual([ '/']); handleClose.mockClear(); }); @@ -75,8 +74,8 @@ describe('Verify OpenLoopModal', () => { expect(handleOpen).toHaveBeenCalledTimes(1); expect(component.state('show')).toEqual(false); - expect(historyMock.push.mock.calls[0]).toEqual([ '/', ]); - + expect(historyMock.push.mock.calls[0]).toEqual([ '/']); + handleOpen.mockClear(); }); |