aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/loop_viewer/status
diff options
context:
space:
mode:
authorxuegao <xg353y@intl.att.com>2019-10-01 15:34:53 +0200
committerxuegao <xg353y@intl.att.com>2019-10-01 15:34:53 +0200
commit233e3cdba0aec0f0c21cc5986654feb33cb7eb3d (patch)
tree686fa173440210eb34555f458d37c3518a7c4125 /ui-react/src/components/loop_viewer/status
parent58c7c977bed829fe010849cdf1b3f654c3c8cc02 (diff)
Add react ui tests
Add more tests for react UI. Issue-ID: CLAMP-509 Change-Id: I58f6408bcd8667fa8b16b0b2f31f8287bdfac8c9 Signed-off-by: xuegao <xg353y@intl.att.com>
Diffstat (limited to 'ui-react/src/components/loop_viewer/status')
-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 2be825edc..8d0448796 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