aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/loop_viewer/status/LoopStatus.test.js
diff options
context:
space:
mode:
authorSébastien Determe <sebastien.determe@intl.att.com>2019-10-01 13:59:50 +0000
committerGerrit Code Review <gerrit@onap.org>2019-10-01 13:59:50 +0000
commitedec26efea06ee9a9d1e0f2d29fe4b26e62d8dfb (patch)
tree0b666bc51a3c1b6175c4509f28ca4a14c6741dc2 /ui-react/src/components/loop_viewer/status/LoopStatus.test.js
parent6ea539c92788cce0e2caf1fdf16bd0dd0914de69 (diff)
parent233e3cdba0aec0f0c21cc5986654feb33cb7eb3d (diff)
Merge "Add react ui tests"
Diffstat (limited to 'ui-react/src/components/loop_viewer/status/LoopStatus.test.js')
-rw-r--r--ui-react/src/components/loop_viewer/status/LoopStatus.test.js24
1 files changed, 24 insertions, 0 deletions
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(<LoopStatus loopCache={loopCache}/>)
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