aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/loop_viewer/logs/LoopLogs.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui-react/src/components/loop_viewer/logs/LoopLogs.test.js')
-rw-r--r--ui-react/src/components/loop_viewer/logs/LoopLogs.test.js24
1 files changed, 23 insertions, 1 deletions
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(<LoopLogs loopCache={loopCache}/>)
-
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