summaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js')
-rw-r--r--ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js87
1 files changed, 44 insertions, 43 deletions
diff --git a/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js b/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js
index 1445e8863..952e88867 100644
--- a/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js
+++ b/ui-react/src/components/dialogs/Tosca/ViewToscaPolicyModal.test.js
@@ -2,7 +2,7 @@
* ============LICENSE_START=======================================================
* ONAP CLAMP
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights
+ * Copyright (C) 2020 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -39,12 +39,12 @@ describe('Verify ViewToscaPolicyModal', () => {
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
@@ -60,11 +60,12 @@ describe('Verify ViewToscaPolicyModal', () => {
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
@@ -95,12 +96,12 @@ describe('Verify ViewToscaPolicyModal', () => {
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
@@ -108,12 +109,12 @@ describe('Verify ViewToscaPolicyModal', () => {
const component = shallow(<ViewToscaPolicyModal/>);
component.setState({ toscaNames: {
"index": "1",
- "toscaModelYaml": "MTCA",
- "toscaModelName": "DCAE_MTCAConfig",
- "version" : "16",
- "userId" : "aj928f",
- "policyType" : "mtca",
- "lastUpdatedDate" : "05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
}
});
expect(component).toMatchSnapshot();
@@ -127,12 +128,12 @@ describe('Verify ViewToscaPolicyModal', () => {
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
@@ -149,17 +150,17 @@ describe('Verify ViewToscaPolicyModal', () => {
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym":"TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});
});
- const yamlContent = 'MTCA Tosca model details';
+ const yamlContent = 'TCA Tosca model details';
const component = shallow(<ViewToscaPolicyModal/>);
component.find('[value="Please select Tosca model to view the details"]').prop('onChange')({ target: { value: yamlContent }});
expect(component.state('content')).toEqual(yamlContent);
@@ -173,12 +174,12 @@ describe('Verify ViewToscaPolicyModal', () => {
json: () => {
return Promise.resolve({
"index": "1",
- "toscaModelYaml":"MTCA",
- "toscaModelName":"DCAE_MTCAConfig",
- "version":"16",
- "userId":"aj928f",
- "policyType":"mtca",
- "lastUpdatedDate":"05-07-2019 19:09:42"
+ "policyModelTosca":"TCA",
+ "policyModelType":"onap.policies.monitoring.cdap.tca.hi.lo.app",
+ "version":"1.0.0",
+ "policyAcronym": "TCA",
+ "updatedDate": "2020-01-31T20:49:48.658795600Z",
+ "updatedBy": "admin"
});
}
});