diff options
author | jingjincs <jinjingcs@gmail.com> | 2020-03-04 09:11:10 +0100 |
---|---|---|
committer | xuegao <xg353y@intl.att.com> | 2020-04-01 09:47:58 +0200 |
commit | 3173d554371bae1eefafc69b2bc9da5543510dd5 (patch) | |
tree | 94c862eb0e3b19d884d31c8824c7544bc75322ac /ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js | |
parent | fe947238182cc1f0c962dc21938325a50a741c10 (diff) |
Update template menu UI
Modify View Templates Menu to adopt changes from get template CL API
Issue-ID: CLAMP-589
Change-Id: I54d059620e91d0da70e85c62dbb932ee58dd99ab
Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js')
-rw-r--r-- | ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js b/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js index 208c947c3..f362cfaa6 100644 --- a/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js +++ b/ui-react/src/components/dialogs/Loop/OpenLoopModal.test.js @@ -28,12 +28,12 @@ describe('Verify OpenLoopModal', () => { beforeEach(() => { fetch.resetMocks(); - fetch.mockResponseOnce(JSON.stringify([ + fetch.mockResponse(JSON.stringify([ "LOOP_gmtAS_v1_0_ResourceInstanceName1_tca", "LOOP_gmtAS_v1_0_ResourceInstanceName1_tca_3", "LOOP_gmtAS_v1_0_ResourceInstanceName2_tca_2" ])); - }) + }); it('Test the render method', () => { @@ -44,12 +44,12 @@ describe('Verify OpenLoopModal', () => { it('Onchange event', () => { const event = {value: 'LOOP_gmtAS_v1_0_ResourceInstanceName1_tca_3'}; const component = shallow(<OpenLoopModal/>); - component.find('StateManager').simulate('change', event); component.update(); expect(component.state('chosenLoopName')).toEqual("LOOP_gmtAS_v1_0_ResourceInstanceName1_tca_3"); }); + it('Test handleClose', () => { const historyMock = { push: jest.fn() }; const handleClose = jest.spyOn(OpenLoopModal.prototype,'handleClose'); |