From 44fac5a66971a6013c429537ab2b509d1a1a8a91 Mon Sep 17 00:00:00 2001 From: sebdet Date: Wed, 28 Apr 2021 11:12:45 +0200 Subject: Add Tests on UI Add some test to UI and fix errors reported by JEST during Ui tests Issue-ID: POLICY-3200 Signed-off-by: sebdet Change-Id: I69e93ad1f1714fa60a0c7ea9b1f3fb691f089f8a Signed-off-by: sebdet --- ui-react/src/components/loop_viewer/status/LoopStatus.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ui-react/src/components/loop_viewer/status/LoopStatus.js') diff --git a/ui-react/src/components/loop_viewer/status/LoopStatus.js b/ui-react/src/components/loop_viewer/status/LoopStatus.js index d960c31e6..4b35b48e1 100644 --- a/ui-react/src/components/loop_viewer/status/LoopStatus.js +++ b/ui-react/src/components/loop_viewer/status/LoopStatus.js @@ -57,12 +57,13 @@ export default class LoopStatus extends React.Component { renderStatus() { - if (this.state.loopCache.getComponentStates() != null) { - return Object.keys(this.state.loopCache.getComponentStates()).map((key) => { + let componentStates = this.state.loopCache.getComponentStates(); + if (componentStates != null) { + return Object.keys(componentStates).map((key) => { console.debug("Adding status for: ",key); var res={} res[key]=this.state.loopCache.getComponentStates()[key]; - return () + return () }) } -- cgit