X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ui-react%2Fsrc%2Fcomponents%2Floop_viewer%2Fstatus%2FLoopStatus.test.js;h=8d044879652363de7da00fa2dd5a2d6fa381035c;hb=233e3cdba0aec0f0c21cc5986654feb33cb7eb3d;hp=2be825edcf215c8288724ce657e6030e50207c3e;hpb=58c7c977bed829fe010849cdf1b3f654c3c8cc02;p=clamp.git diff --git a/ui-react/src/components/loop_viewer/status/LoopStatus.test.js b/ui-react/src/components/loop_viewer/status/LoopStatus.test.js index 2be825ed..8d044879 100644 --- a/ui-react/src/components/loop_viewer/status/LoopStatus.test.js +++ b/ui-react/src/components/loop_viewer/status/LoopStatus.test.js @@ -50,5 +50,29 @@ describe('Verify LoopStatus', () => { const component = shallow() expect(component).toMatchSnapshot(); + + const loopCacheUpdated = new LoopCache({ + "name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca", + "lastComputedState": "SUBMIT", + "components": { + "POLICY": { + "componentState": { + "stateName": "SENT", + "description": "The policies defined have NOT yet been created on the policy engine" + } + }, + "DCAE": { + "componentState": { + "stateName": "BLUEPRINT_DEPLOYED", + "description": "The DCAE blueprint has been found in the DCAE inventory but not yet instancianted for this loop" + } + } + } + }); + component.setProps({ loopCache: loopCacheUpdated }); + + const forms = component.find('TableRow'); + expect(forms.get(0).props.statusRow.stateName).toEqual("SENT"); + expect(component.find('label').text()).toContain('SUBMIT'); }); }); \ No newline at end of file