X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ui-react%2Fsrc%2Fcomponents%2Floop_viewer%2Flogs%2FLoopLogs.test.js;h=5c478f6a5119a9ba833a5d86d2535e745ef6f344;hb=233e3cdba0aec0f0c21cc5986654feb33cb7eb3d;hp=3c76405c4180d1b4853bda070cf6631a904ddb52;hpb=58c7c977bed829fe010849cdf1b3f654c3c8cc02;p=clamp.git diff --git a/ui-react/src/components/loop_viewer/logs/LoopLogs.test.js b/ui-react/src/components/loop_viewer/logs/LoopLogs.test.js index 3c76405c..5c478f6a 100644 --- a/ui-react/src/components/loop_viewer/logs/LoopLogs.test.js +++ b/ui-react/src/components/loop_viewer/logs/LoopLogs.test.js @@ -42,7 +42,29 @@ describe('Verify LoopLogs', () => { it('Test the render method', () => { const component = shallow() - expect(component).toMatchSnapshot(); + + const loopCacheUpdated = new LoopCache({ + "name": "LOOP_Jbv1z_v1_0_ResourceInstanceName1_tca", + "loopLogs": [ + { + "id": 1, + "logType": "INFO", + "logComponent": "CLAMP", + "message": "Operational and Guard policies UPDATED", + "logInstant": "2019-07-08T09:44:37Z" + }, + { + "id": 2, + "logType": "INFO", + "logComponent": "CLAMP", + "message": "Operational and Guard policies UPDATED", + "logInstant": "2019-07-08T09:44:50Z" + } + ] + }); + + component.setProps({ loopCache: loopCacheUpdated }); + expect(component.find('TableRow').length).toEqual(2); }); }); \ No newline at end of file