From 4549fd92024cdadf3277d7cc364f33109ca22b59 Mon Sep 17 00:00:00 2001 From: xg353y Date: Tue, 12 Mar 2019 13:07:46 +0100 Subject: Add UI tests Add test cases for propertyController.js Issue-ID: CLAMP-310 Change-Id: I7ae2cc425d9a7343791bae9ab7704e09389f270a Signed-off-by: xg353y --- .../resources/designer/scripts/propertyController.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/main') diff --git a/src/main/resources/META-INF/resources/designer/scripts/propertyController.js b/src/main/resources/META-INF/resources/designer/scripts/propertyController.js index d47956507..c3f1aaf13 100644 --- a/src/main/resources/META-INF/resources/designer/scripts/propertyController.js +++ b/src/main/resources/META-INF/resources/designer/scripts/propertyController.js @@ -20,9 +20,9 @@ * =================================================================== * */ - function saveMsProperties(type, form) { + +function saveMsProperties(type, form) { var newMsProperties = cl_props["microServicePolicies"]; - for (p in newMsProperties) { if (newMsProperties[p]["name"] == type) { newMsProperties[p]["properties"] = form; @@ -40,9 +40,9 @@ def.resolve(data); }).error(function(data) { def.reject("Save Model not successful"); - return def.promise; - }; + }); cl_props["microServicePolicies"] = newMsProperties; + return def.promise; } function saveGlobalProperties(form) { @@ -57,9 +57,9 @@ function saveGlobalProperties(form) { def.resolve(data); }).error(function(data) { def.reject("Save Model not successful"); - return def.promise; - }; + }); cl_props["globalPropertiesJson"] = form; + return def.promise; } function saveOpPolicyProperties(form) { @@ -77,10 +77,10 @@ function saveOpPolicyProperties(form) { def.resolve(data); }).error(function(data) { def.reject("Save Model not successful"); - return def.promise; - }; + }); - cl_props["operationalPolicies"] = newOpProperties; + cl_props["operationalPolicies"] = newOpProperties; + return def.promise; } function getOperationalPolicyProperty() { @@ -122,3 +122,4 @@ function getDeploymentID() { function getDeploymentStatusURL() { return cl_props["dcaeDeploymentStatusUrl"]; } +module.exports = { getOperationalPolicyProperty,getGlobalProperty,getMsProperty,getMsUI,getStatus,getDeploymentID,getDeploymentStatusURL }; \ No newline at end of file -- cgit 1.2.3-korg