X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ui-react%2Fsrc%2Fcomponents%2Fdialogs%2FOpenLoop%2FOpenLoopModal.test.js;fp=ui-react%2Fsrc%2F__test__%2FOpenLoopModal.test.js;h=6ba8f40a5a67abfba926bcc051c6de5ce8e3a5b7;hb=101193d07d757ce299c34fc61ea37b416138bf85;hp=044eeda891f7a35f194bc6ca821271e3e1aaf181;hpb=3c86358f306e61bcc7d8f3143977a55faa0f4e62;p=clamp.git diff --git a/ui-react/src/__test__/OpenLoopModal.test.js b/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js similarity index 80% rename from ui-react/src/__test__/OpenLoopModal.test.js rename to ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js index 044eeda8..6ba8f40a 100644 --- a/ui-react/src/__test__/OpenLoopModal.test.js +++ b/ui-react/src/components/dialogs/OpenLoop/OpenLoopModal.test.js @@ -22,11 +22,21 @@ */ import React from 'react'; import { shallow } from 'enzyme'; -import OpenLoopModal from '../components/dialogs/OpenLoop/OpenLoopModal'; +import OpenLoopModal from './OpenLoopModal'; describe('Verify OpenLoopModal', () => { + beforeEach(() => { + fetch.resetMocks() + }) + it('Test the render method', () => { + fetch.mockResponseOnce(JSON.stringify([ + "LOOP_gmtAS_v1_0_ResourceInstanceName1_tca", + "LOOP_gmtAS_v1_0_ResourceInstanceName1_tca_3", + "LOOP_gmtAS_v1_0_ResourceInstanceName2_tca_2" + ])) + const component = shallow(); expect(component).toMatchSnapshot(); });