aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/test/javascript/demo.test.js53
-rw-r--r--src/test/javascript/propertyController.test.js33
2 files changed, 0 insertions, 86 deletions
diff --git a/src/test/javascript/demo.test.js b/src/test/javascript/demo.test.js
deleted file mode 100644
index c088957f9..000000000
--- a/src/test/javascript/demo.test.js
+++ /dev/null
@@ -1,53 +0,0 @@
-require('jquery/dist/jquery.min.js');
-require('angular/angular.min.js');
-require('angular-mocks/angular-mocks.js');
-require('angular-route/angular-route.min.js');
-require('angular-resource/angular-resource.min.js');
-require('angular-cookies/angular-cookies.min.js');
-require('angular-animate/angular-animate.min.js');
-require('angular-sanitize/angular-sanitize.min.js');
-require('angular-touch/angular-touch.min.js');
-require('popper.js/dist/umd/popper.min.js');
-require('bootstrap/dist/js/bootstrap.min.js');
-require('angular-ui-bootstrap/dist/ui-bootstrap-tpls.js');
-require('angular-loading-bar/src/loading-bar.js');
-require('angular-dialog-service/dist/dialogs.js');
-require('scripts/app.js');
-require('scripts/DashboardCtrl.js');
-
-
-describe('Dashboard ctrl tests', function() {
-
- beforeEach(angular.mock.module('clds-app'));
-
- var $controllerService;
-
- beforeEach(angular.mock.inject(function(_$controller_) {
- $controllerService = _$controller_;
- }));
-
- describe('$scope.showPalette', function() {
-
- it('test showPalette', function() {
-
- var $scopeTest = {};
- var $rootScopeTest = {};
- var $resourceTest = {};
- var $httpTest = {};
- var $timeoutTest = {};
- var $locationTest = {};
- var $intervalTest = function(){};
- var $controllerDashboard = $controllerService('DashboardCtrl', {
- '$scope' : $scopeTest,
- '$rootScope' : $rootScopeTest,
- '$resource' : $resourceTest,
- '$http' : $httpTest,
- '$timeout' : $timeoutTest,
- '$location' : $locationTest,
- '$interval' : $intervalTest
- });
- $scopeTest.showPalette();
- expect($rootScopeTest.isModel).toEqual(true);
- });
- });
-}); \ No newline at end of file
diff --git a/src/test/javascript/propertyController.test.js b/src/test/javascript/propertyController.test.js
deleted file mode 100644
index e71999669..000000000
--- a/src/test/javascript/propertyController.test.js
+++ /dev/null
@@ -1,33 +0,0 @@
-
-describe('Property controller tests', function() {
- var clModel = '{"name": "ClosedLoopTest","dcaeDeploymentId":"testId","dcaeDeploymentStatusUrl":"testUrl","lastComputedState":"DESIGN","svgRepresentation": "representation","globalPropertiesJson": [{"name":"deployParameters","value":{"location_id":"","service_id":"","policy_id":"AUTO_GENERATED_POLICY_ID_AT_SUBMIT"}}], "blueprint": "yaml","lastComputedState": "DESIGN","operationalPolicies": [ {"name": "OpPolicyTest", "configurationsJson": { "policy1": [{"name": "pname","value": "policy1"}]}}],"microServicePolicies": [{"name": "tca","properties": "", "shared": true,"policyTosca": "tosca","jsonRepresentation": {"schema":{"title":"DCAE TCA Config","type":"object","required":["name"],"properties":{"name":{"propertyOrder":101,"title":"Name","type":"string"}}}}}],"loopLogs": [{ } ] }';
- cl_props = JSON.parse(clModel);
- var propertyController = require('scripts/propertyController.js');
-
- test('getOperationalPolicyProperty', () => {
- var policyProp = '{"policy1": [{"name": "pname","value": "policy1"}]}';
- expect(propertyController.getOperationalPolicyProperty()).toEqual(JSON.parse(policyProp));
- });
-
- test('getGlobalProperty', () => {
- var globalProp = '[{"name":"deployParameters","value":{"location_id":"","service_id":"","policy_id":"AUTO_GENERATED_POLICY_ID_AT_SUBMIT"}}]';
- expect(propertyController.getGlobalProperty()).toEqual(JSON.parse(globalProp));
- });
-
- test('getMsPropertyTca', () => {
- expect(propertyController.getMsProperty("tca")).toEqual('');
- });
-
- test('getMsUITca', () => {
- var msUI = '{"schema":{"title":"DCAE TCA Config","type":"object","required":["name"],"properties":{"name":{"propertyOrder":101,"title":"Name","type":"string"}}}}';
- expect(propertyController.getMsUI("tca")).toEqual(JSON.parse(msUI));
- });
-
- test('getMsPropertyNotExist', () => {
- expect(propertyController.getMsProperty("test")).toEqual(null);
- });
-
- test('getMsUINotExist', () => {
- expect(propertyController.getMsUI("test")).toEqual(null);
- });
-}); \ No newline at end of file
: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */