Kaynağa Gözat

AMBARI-14626. UI UT cleanup (onechiporenko)

Oleg Nechiporenko 9 yıl önce
ebeveyn
işleme
40aac602f6
100 değiştirilmiş dosya ile 470 ekleme ve 946 silme
  1. 3 3
      ambari-web/app/views/common/modal_popup.js
  2. 1 1
      ambari-web/test/aliases/computed/alias.js
  3. 1 1
      ambari-web/test/aliases/computed/firstNotBlank.js
  4. 0 1
      ambari-web/test/app_test.js
  5. 4 6
      ambari-web/test/controllers/experimental_test.js
  6. 2 2
      ambari-web/test/controllers/global/background_operations_test.js
  7. 6 6
      ambari-web/test/controllers/global/cluster_controller_test.js
  8. 3 4
      ambari-web/test/controllers/global/update_controller_test.js
  9. 4 4
      ambari-web/test/controllers/installer_test.js
  10. 3 3
      ambari-web/test/controllers/main/admin/highAvailability/nameNode/step3_controller_test.js
  11. 2 3
      ambari-web/test/controllers/main/admin/kerberos/step2_controller_test.js
  12. 54 53
      ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js
  13. 1 1
      ambari-web/test/controllers/main/admin/kerberos_test.js
  14. 3 1
      ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js
  15. 0 6
      ambari-web/test/controllers/main/alerts/definitions_details_controller_test.js
  16. 4 4
      ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js
  17. 1 1
      ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_test.js
  18. 3 3
      ambari-web/test/controllers/main/charts/heatmap_test.js
  19. 7 11
      ambari-web/test/controllers/main/host/details_test.js
  20. 0 1
      ambari-web/test/controllers/main/host_test.js
  21. 1 1
      ambari-web/test/controllers/main/service/add_controller_test.js
  22. 2 2
      ambari-web/test/controllers/main/service/info/config_test.js
  23. 5 5
      ambari-web/test/controllers/main/service/info/summary_test.js
  24. 8 91
      ambari-web/test/controllers/main/service/item_test.js
  25. 1 1
      ambari-web/test/controllers/main/service/manage_config_groups_controller_test.js
  26. 0 1
      ambari-web/test/controllers/main/service/reassign/step1_controller_test.js
  27. 0 3
      ambari-web/test/controllers/main/service/reassign/step2_controller_test.js
  28. 2 2
      ambari-web/test/controllers/main/service/reassign/step4_controller_test.js
  29. 1 1
      ambari-web/test/controllers/main/service/widgets/create/step2_controller_test.js
  30. 5 3
      ambari-web/test/controllers/main/service/widgets/create/wizard_controller_test.js
  31. 1 1
      ambari-web/test/controllers/main/service_test.js
  32. 5 6
      ambari-web/test/controllers/main_test.js
  33. 1 1
      ambari-web/test/controllers/wizard/step10_test.js
  34. 1 2
      ambari-web/test/controllers/wizard/step2_test.js
  35. 8 11
      ambari-web/test/controllers/wizard/step3_test.js
  36. 12 9
      ambari-web/test/controllers/wizard/step4_test.js
  37. 0 2
      ambari-web/test/controllers/wizard/step5_test.js
  38. 4 4
      ambari-web/test/controllers/wizard/step6_test.js
  39. 69 41
      ambari-web/test/controllers/wizard/step7_test.js
  40. 8 9
      ambari-web/test/controllers/wizard/step8_test.js
  41. 15 12
      ambari-web/test/controllers/wizard/step9_test.js
  42. 36 45
      ambari-web/test/controllers/wizard_test.js
  43. 4 5
      ambari-web/test/data/HDP2.2/site_properties_test.js
  44. 4 5
      ambari-web/test/data/HDP2.3/site_properties_test.js
  45. 2 3
      ambari-web/test/data/HDP2/secure_mapping_test.js
  46. 4 5
      ambari-web/test/data/HDP2/site_properties_test.js
  47. 2 3
      ambari-web/test/init_computed_aliases.js
  48. 3 3
      ambari-web/test/init_test.js
  49. 1 22
      ambari-web/test/login_test.js
  50. 3 3
      ambari-web/test/mappers/alert_definitions_mapper_test.js
  51. 5 6
      ambari-web/test/mappers/alert_groups_mapper_test.js
  52. 1 7
      ambari-web/test/mappers/alert_instances_mapper_test.js
  53. 0 1
      ambari-web/test/mappers/hosts_mapper_test.js
  54. 3 4
      ambari-web/test/mappers/server_data_mapper_test.js
  55. 0 1
      ambari-web/test/mappers/service_mapper_test.js
  56. 2 3
      ambari-web/test/mappers/stack_mapper_test.js
  57. 1 9
      ambari-web/test/mappers/status_mapper_test.js
  58. 0 1
      ambari-web/test/mappers/users_mapper_test.js
  59. 2 2
      ambari-web/test/mixins/common/configs/config_recommendations_test.js
  60. 1 1
      ambari-web/test/mixins/common/configs/configs_saver_test.js
  61. 1 2
      ambari-web/test/mixins/common/configs/toggle_isrequired_test.js
  62. 13 12
      ambari-web/test/mixins/common/kdc_credentials_controller_mixin_test.js
  63. 3 3
      ambari-web/test/mixins/common/serverValidator_test.js
  64. 23 23
      ambari-web/test/mixins/common/widget_mixin_test.js
  65. 0 24
      ambari-web/test/mixins/main/host/details/host_components/decommissionable_test.js
  66. 1 11
      ambari-web/test/mixins/main/service/configs/widget_popover_support_test.js
  67. 1 3
      ambari-web/test/mixins/wizard/wizardEnableDone_test.js
  68. 3 3
      ambari-web/test/mixins/wizard/wizardProgressPageController_test.js
  69. 3 3
      ambari-web/test/mock_data_setup/configs_mock_data.js
  70. 2 2
      ambari-web/test/models/authentication_test.js
  71. 2 51
      ambari-web/test/models/configs/objects/service_config_property_test.js
  72. 0 1
      ambari-web/test/models/configs/objects/service_config_test.js
  73. 0 5
      ambari-web/test/models/configs/theme/tab_test.js
  74. 2 0
      ambari-web/test/models/form_test.js
  75. 2 2
      ambari-web/test/models/host_component_test.js
  76. 2 1
      ambari-web/test/models/host_test.js
  77. 0 1
      ambari-web/test/models/service/hdfs_test.js
  78. 1 55
      ambari-web/test/models/service/yarn_test.js
  79. 0 66
      ambari-web/test/models/service_test.js
  80. 5 2
      ambari-web/test/models/stack_version/repository_version_test.js
  81. 0 1
      ambari-web/test/router_test.js
  82. 1 1
      ambari-web/test/routes/views_test.js
  83. 2 1
      ambari-web/test/utils/batch_scheduled_requests_test.js
  84. 2 2
      ambari-web/test/utils/blueprint_test.js
  85. 13 14
      ambari-web/test/utils/config_test.js
  86. 7 62
      ambari-web/test/utils/configs/config_initializer_test.js
  87. 0 1
      ambari-web/test/utils/configs/database_test.js
  88. 5 5
      ambari-web/test/utils/data_manipulation_test.js
  89. 2 11
      ambari-web/test/utils/date/date_test.js
  90. 14 17
      ambari-web/test/utils/helper_test.js
  91. 7 76
      ambari-web/test/utils/host_progress_popup_test.js
  92. 1 3
      ambari-web/test/utils/load_timer_test.js
  93. 1 1
      ambari-web/test/utils/misc_test.js
  94. 1 1
      ambari-web/test/utils/number_utils_test.js
  95. 11 11
      ambari-web/test/utils/string_utils_test.js
  96. 3 4
      ambari-web/test/utils/ui_effects_test.js
  97. 4 3
      ambari-web/test/utils/validator_test.js
  98. 5 5
      ambari-web/test/views/common/chart/linear_time_test.js
  99. 1 1
      ambari-web/test/views/common/configs/overriddenProperty_view_test.js
  100. 1 4
      ambari-web/test/views/common/configs/service_config_container_view_test.js

+ 3 - 3
ambari-web/app/views/common/modal_popup.js

@@ -68,7 +68,7 @@ App.ModalPopup = Ember.View.extend({
     if (this.autoHeight && !$.mocho) {
       var block = this.$().find('#modal > .modal-body').first();
       if(block.offset()) {
-        block.css('max-height', $(window).height() - block.offset().top  - this.marginBottom + $(window).scrollTop()); // fix popup height
+        block.css('max-height', $(window).height() - block.offset().top - this.marginBottom + $(window).scrollTop()); // fix popup height
       }
     }
     this.fitZIndex();
@@ -82,7 +82,7 @@ App.ModalPopup = Ember.View.extend({
    */
   fitZIndex: function () {
     var existedPopups = $('.modal-backdrop');
-    if (existedPopups) {
+    if (existedPopups && !$.mocho) {
       var maxZindex = 1;
       existedPopups.each(function(index, popup) {
         if ($(popup).css('z-index') > maxZindex) {
@@ -103,7 +103,7 @@ App.ModalPopup = Ember.View.extend({
     var block = this.$().find('#modal > .modal-body');
     var wh = $(window).height();
 
-    var top = wh * .05;
+    var top = wh * 0.05;
     popup.css({
       'top': top + 'px',
       'marginTop': 0

+ 1 - 1
ambari-web/test/aliases/computed/alias.js

@@ -40,7 +40,7 @@ App.TestAliases.testAsComputedAlias = function (context, propertyName, dependent
   }
   else {
    // all
-    testsCases = [].concat.call([], Object.keys(typesMap).map(function (key) {return typesMap[key]}));
+    testsCases = [].concat(Object.keys(typesMap).map(function (key) {return typesMap[key]}));
   }
 
   describe('#' + propertyName + ' as Em.computed.alias', function () {

+ 1 - 1
ambari-web/test/aliases/computed/firstNotBlank.js

@@ -21,7 +21,7 @@ var helpers = App.TestAliases.helpers;
 function prepareHash(dependentKeys, index) {
   var hash = {};
   dependentKeys.forEach(function (key, i) {
-    hash[key] =  i < index ? null : '' + i;
+    hash[key] = i < index ? null : '' + i;
   });
   return hash;
 }

+ 0 - 1
ambari-web/test/app_test.js

@@ -20,7 +20,6 @@ var App = require('app');
 require('views/common/quick_view_link_view');
 require('models/host_component');
 require('models/stack_service_component');
-var modelSetup = require('test/init_model_test');
 App.auth = ["AMBARI.ADD_DELETE_CLUSTERS", "AMBARI.ASSIGN_ROLES", "AMBARI.EDIT_STACK_REPOS", "AMBARI.MANAGE_GROUPS", "AMBARI.MANAGE_STACK_VERSIONS", "AMBARI.MANAGE_USERS", "AMBARI.MANAGE_VIEWS", "AMBARI.RENAME_CLUSTER", "AMBARI.SET_SERVICE_USERS_GROUPS", "CLUSTER.TOGGLE_ALERTS", "CLUSTER.TOGGLE_KERBEROS", "CLUSTER.UPGRADE_DOWNGRADE_STACK", "CLUSTER.VIEW_ALERTS", "CLUSTER.VIEW_CONFIGS", "CLUSTER.VIEW_METRICS", "CLUSTER.VIEW_STACK_DETAILS", "CLUSTER.VIEW_STATUS_INFO", "HOST.ADD_DELETE_COMPONENTS", "HOST.ADD_DELETE_HOSTS", "HOST.TOGGLE_MAINTENANCE", "HOST.VIEW_CONFIGS", "HOST.VIEW_METRICS", "HOST.VIEW_STATUS_INFO", "SERVICE.ADD_DELETE_SERVICES", "SERVICE.COMPARE_CONFIGS", "SERVICE.DECOMMISSION_RECOMMISSION", "SERVICE.ENABLE_HA", "SERVICE.MANAGE_CONFIG_GROUPS", "SERVICE.MODIFY_CONFIGS", "SERVICE.MOVE", "SERVICE.RUN_CUSTOM_COMMAND", "SERVICE.RUN_SERVICE_CHECK", "SERVICE.START_STOP", "SERVICE.TOGGLE_ALERTS", "SERVICE.TOGGLE_MAINTENANCE", "SERVICE.VIEW_ALERTS", "SERVICE.VIEW_CONFIGS", "SERVICE.VIEW_METRICS", "SERVICE.VIEW_STATUS_INFO", "VIEW.USE"];
 
 describe('App', function () {

+ 4 - 6
ambari-web/test/controllers/experimental_test.js

@@ -21,9 +21,7 @@ var App = require('app');
 require('controllers/experimental');
 
 var controller,
-  transition,
   supports = {},
-  transitionStubbed = false,
   controllerSupports = [
     Em.Object.create({
       name: 'sup0',
@@ -65,10 +63,10 @@ describe('App.ExperimentalController', function () {
   describe.skip('#doSave', function () {
     before(function () {
       sinon.stub(Ember, 'set', function (p, v) {
-        if (p.indexOf('App.supports.' != -1)) {
-          p = p.replace('App.supports.', '');
-          saveObject[p] = v;
-          return;
+        if (p.startsWith('App.supports.')) {
+          var key = p.replace('App.supports.', '');
+          saveObject[key] = v;
+          return v;
         }
         return Ember.set(p, v);
       });

+ 2 - 2
ambari-web/test/controllers/global/background_operations_test.js

@@ -660,7 +660,7 @@ describe('App.BackgroundOperationsController', function () {
       controller.set('services', [request]);
       controller.callBackFilteredByRequest(data);
       expect(request.get('previousTaskStatusMap')).to.eql({"1": "COMPLETED"});
-      expect(request.get('hostsMap')['host1'].logTasks.length).to.equal(1);
+      expect(request.get('hostsMap.host1.logTasks.length')).to.equal(1);
       expect(request.get('isRunning')).to.equal(false);
     });
 
@@ -694,7 +694,7 @@ describe('App.BackgroundOperationsController', function () {
       controller.set('services', [request]);
       controller.callBackFilteredByRequest(data);
       expect(request.get('previousTaskStatusMap')).to.eql({"1": "COMPLETED", "2": "IN_PROGRESS"});
-      expect(request.get('hostsMap')['host1'].logTasks.length).to.equal(2);
+      expect(request.get('hostsMap.host1.logTasks.length')).to.equal(2);
       expect(request.get('isRunning')).to.equal(true);
     });
   });

+ 6 - 6
ambari-web/test/controllers/global/cluster_controller_test.js

@@ -52,20 +52,20 @@ describe('App.clusterController', function () {
       expect(controller.get('clusterDataLoadedPercent')).to.equal('width:0');
     });
     it('when first item is loaded then isLoaded should be false', function () {
-      controller.updateLoadStatus.call(controller, 'item1');
+      controller.updateLoadStatus('item1');
       expect(controller.get('isLoaded')).to.equal(false);
     });
     it('when first item is loaded then width should be "width:50%"', function () {
-      controller.updateLoadStatus.call(controller, 'item1');
+      controller.updateLoadStatus('item1');
       expect(controller.get('clusterDataLoadedPercent')).to.equal('width:50%');
     });
 
     it('when all items are loaded then isLoaded should be true', function () {
-      controller.updateLoadStatus.call(controller, 'item2');
+      controller.updateLoadStatus('item2');
       expect(controller.get('isLoaded')).to.equal(true);
     });
     it('when all items are loaded then width should be "width:100%"', function () {
-      controller.updateLoadStatus.call(controller, 'item2');
+      controller.updateLoadStatus('item2');
       expect(controller.get('clusterDataLoadedPercent')).to.equal('width:100%');
     });
   });
@@ -115,7 +115,7 @@ describe('App.clusterController', function () {
   });
 
   describe('#reloadSuccessCallback', function () {
-    var test_data = {
+    var testData = {
       "items": [
         {
           "Clusters": {
@@ -126,7 +126,7 @@ describe('App.clusterController', function () {
       ]
     };
     it('Check cluster', function () {
-      controller.reloadSuccessCallback(test_data);
+      controller.reloadSuccessCallback(testData);
       expect(App.get('clusterName')).to.equal('tdk');
       expect(App.get('currentStackVersion')).to.equal('HDP-1.3.0');
     });

+ 3 - 4
ambari-web/test/controllers/global/update_controller_test.js

@@ -195,7 +195,7 @@ describe('App.UpdateController', function () {
     });
     testCases.forEach(function (test) {
       it(test.title, function () {
-        App.cache['services'] = test.services;
+        App.cache.services = test.services;
         this.mock.withArgs('router.clusterController.isServiceMetricsLoaded').returns(true);
         expect(controller.getConditionalFields()).to.eql(test.result);
       });
@@ -203,7 +203,7 @@ describe('App.UpdateController', function () {
 
     testCasesByStackVersion.forEach(function (test) {
       it(test.title, function () {
-        App.cache['services'] = test.services;
+        App.cache.services = test.services;
         this.mock.withArgs('currentStackVersionNumber').returns(test.stackVersionNumber);
         this.mock.withArgs('router.clusterController.isServiceMetricsLoaded').returns(true);
         expect(controller.getConditionalFields()).to.eql(test.result);
@@ -211,7 +211,7 @@ describe('App.UpdateController', function () {
     });
 
     it('FLUME service, first load', function () {
-      App.cache['services'] = [
+      App.cache.services = [
         {
           ServiceInfo: {
             service_name: 'FLUME'
@@ -410,7 +410,6 @@ describe('App.UpdateController', function () {
           };
         }
       },
-      mainAdminStackAndUpgradeController = App.get('router.mainAdminStackAndUpgradeController'),
       appGetMock;
 
     beforeEach(function () {

+ 4 - 4
ambari-web/test/controllers/installer_test.js

@@ -194,6 +194,7 @@ describe('App.InstallerController', function () {
         ])
       })
     ]);
+    var resolve = false;
     var data = {
       osId: 1,
       repoId: 11,
@@ -203,7 +204,6 @@ describe('App.InstallerController', function () {
         }
       }
     };
-    var resolve = false;
     it ('Should check stacks for sucess', function() {
 
       installerController.set('content.stacks', stacks);
@@ -277,6 +277,7 @@ describe('App.InstallerController', function () {
         ])
       })
     ]);
+    var resolve = false;
     var data = {
       osId: 1,
       repoId: 11,
@@ -286,7 +287,6 @@ describe('App.InstallerController', function () {
         }
       }
     };
-    var resolve = false;
     it ('Should check stacks for error', function() {
 
       var req = {
@@ -962,7 +962,7 @@ describe('App.InstallerController', function () {
 
   describe('#loadMasterComponentHosts', function() {
     beforeEach(function () {
-      sinon.stub(installerController, 'getDBProperties', function(key) {
+      sinon.stub(installerController, 'getDBProperties', function() {
         return {
           masterComponentHosts: Em.A([
             {
@@ -1226,7 +1226,7 @@ describe('App.InstallerController', function () {
 
         var successCallback;
 
-        beforeEach(function ()  {
+        beforeEach(function () {
           sinon.stub(App.Stack, 'find').returns(test.stacks);
           sinon.stub(App.router, 'get').withArgs('clusterController.isCustomJDK').returns(test.isCustomJDK)
             .withArgs('clusterController.ambariProperties').returns(test.ambariProperties);

+ 3 - 3
ambari-web/test/controllers/main/admin/highAvailability/nameNode/step3_controller_test.js

@@ -189,12 +189,12 @@ describe('App.HighAvailabilityWizardStep3Controller', function() {
 
     tests.forEach(function(test) {
       it(test.m, function() {
-        var controller = App.HighAvailabilityWizardStep3Controller.create({
+        var _controller = App.HighAvailabilityWizardStep3Controller.create({
           configsToRemove: test.toRemove,
           serverConfigData: test.configs
         });
-        var result = controller.removeConfigs(test.toRemove, controller.get('serverConfigData'));
-        expect(JSON.stringify(controller.get('serverConfigData'))).to.equal(JSON.stringify(test.expected));
+        var result = _controller.removeConfigs(test.toRemove, _controller.get('serverConfigData'));
+        expect(JSON.stringify(_controller.get('serverConfigData'))).to.equal(JSON.stringify(test.expected));
         expect(JSON.stringify(result)).to.equal(JSON.stringify(test.expected));
       });
     });

+ 2 - 3
ambari-web/test/controllers/main/admin/kerberos/step2_controller_test.js

@@ -54,11 +54,10 @@ describe('App.KerberosWizardStep2Controller', function() {
           $.extend(true, {}, preDefProp, {
             value: value, filename: 'some-site.xml',
             'displayType': displayType,
-            isRequiredByAgent: preDefProp.isRequiredByAgent == undefined ? true : preDefProp.isRequiredByAgent
+            isRequiredByAgent: preDefProp.isRequiredByAgent === undefined ? true : preDefProp.isRequiredByAgent
           }));
-      } else {
-        return App.ServiceConfigProperty.create({name: name, value: value, isRequiredByAgent: true, filename: 'some-site.xml'});
       }
+      return App.ServiceConfigProperty.create({name: name, value: value, isRequiredByAgent: true, filename: 'some-site.xml'});
     };
 
     var tests = [

+ 54 - 53
ambari-web/test/controllers/main/admin/kerberos/step4_controller_test.js

@@ -17,7 +17,7 @@
  */
 
 var App = require('app');
-var c  = App.KerberosWizardStep4Controller.create({
+var c = App.KerberosWizardStep4Controller.create({
   wizardController: Em.Object.create({
     name: ''
   })
@@ -57,38 +57,6 @@ describe('App.KerberosWizardStep4Controller', function() {
 
   describe('#prepareConfigProperties', function() {
 
-    before(function() {
-      var controller = App.KerberosWizardStep4Controller.create({
-        wizardController: {
-          getDBProperty: function() {
-            return Em.A([
-              Em.Object.create({ name: 'realm', value: 'realm_value' })
-            ]);
-          },
-          loadCachedStepConfigValues: function() {
-            return null;
-          }
-        }
-      });
-      sinon.stub(App.Service, 'find').returns(Em.A([
-        { serviceName: 'HDFS' }
-      ]));
-      sinon.stub(App.configsCollection, 'getAll').returns([
-        {
-          name: 'hadoop.security.auth_to_local',
-          displayType: 'multiLine'
-        }
-      ]);
-      sinon.stub(App.router, 'get').withArgs('mainAdminKerberosController.isManualKerberos').returns(false);
-      this.result = controller.prepareConfigProperties(properties);
-    });
-
-    after(function() {
-      App.Service.find.restore();
-      App.configsCollection.getAll.restore();
-      App.router.get.restore();
-    });
-
     var properties = Em.A([
       Em.Object.create({ name: 'realm', value: '', serviceName: 'Cluster' }),
       Em.Object.create({ name: 'spnego_keytab', value: 'spnego_keytab_value', serviceName: 'Cluster' }),
@@ -98,7 +66,7 @@ describe('App.KerberosWizardStep4Controller', function() {
       Em.Object.create({ name: 'hdfs_principal', value: 'hdfs_principal_value', identityType: 'user', serviceName: 'HDFS' }),
       Em.Object.create({ name: 'hadoop.security.auth_to_local', serviceName: 'HDFS' })
     ]);
-    
+
     var propertyValidationCases = [
       {
         property: 'spnego_keytab',
@@ -129,9 +97,41 @@ describe('App.KerberosWizardStep4Controller', function() {
         ]
       }
     ];
-    
+
     var absentPropertiesTest = ['falcon_keytab', 'mapreduce_keytab'];
-    
+
+    before(function() {
+      var controller = App.KerberosWizardStep4Controller.create({
+        wizardController: {
+          getDBProperty: function() {
+            return Em.A([
+              Em.Object.create({ name: 'realm', value: 'realm_value' })
+            ]);
+          },
+          loadCachedStepConfigValues: function() {
+            return null;
+          }
+        }
+      });
+      sinon.stub(App.Service, 'find').returns(Em.A([
+        { serviceName: 'HDFS' }
+      ]));
+      sinon.stub(App.configsCollection, 'getAll').returns([
+        {
+          name: 'hadoop.security.auth_to_local',
+          displayType: 'multiLine'
+        }
+      ]);
+      sinon.stub(App.router, 'get').withArgs('mainAdminKerberosController.isManualKerberos').returns(false);
+      this.result = controller.prepareConfigProperties(properties);
+    });
+
+    after(function() {
+      App.Service.find.restore();
+      App.configsCollection.getAll.restore();
+      App.router.get.restore();
+    });
+
     it('should contains properties only for installed services', function() {
       expect(this.result.mapProperty('serviceName').uniq()).to.be.eql(['Cluster', 'HDFS']);
     });
@@ -160,6 +160,24 @@ describe('App.KerberosWizardStep4Controller', function() {
   
   describe('#setStepConfigs', function() {
     describe('Add Service Wizard', function() {
+
+      var properties = Em.A([
+        Em.Object.create({ name: 'realm', value: '', serviceName: 'Cluster' }),
+        Em.Object.create({ name: 'spnego_keytab', value: 'spnego_keytab_value', serviceName: 'Cluster', isEditable: true }),
+        Em.Object.create({ name: 'hdfs_keytab', value: '', serviceName: 'HDFS', observesValueFrom: 'spnego_keytab', isEditable: true }),
+        Em.Object.create({ name: 'falcon_keytab', value: 'falcon_keytab_value', serviceName: 'FALCON', isEditable: true }),
+        Em.Object.create({ name: 'mapreduce_keytab', value: 'mapreduce_keytab_value', serviceName: 'MAPREDUCE2', isEditable: true })
+      ]);
+
+      var propertiesEditableTests = [
+        { name: 'spnego_keytab', e: false },
+        { name: 'falcon_keytab', e: true },
+        { name: 'hdfs_keytab', e: false },
+        { name: 'mapreduce_keytab', e: true },
+        { name: 'admin_principal', e: true },
+        { name: 'admin_password', e: true }
+      ];
+
       var res;
       var controller;
       before(function() {
@@ -204,23 +222,6 @@ describe('App.KerberosWizardStep4Controller', function() {
         res = controller.get('stepConfigs')[0].get('configs').concat(controller.get('stepConfigs')[1].get('configs'));
       });
 
-      var properties = Em.A([
-        Em.Object.create({ name: 'realm', value: '', serviceName: 'Cluster' }),
-        Em.Object.create({ name: 'spnego_keytab', value: 'spnego_keytab_value', serviceName: 'Cluster', isEditable: true }),
-        Em.Object.create({ name: 'hdfs_keytab', value: '', serviceName: 'HDFS', observesValueFrom: 'spnego_keytab', isEditable: true }),
-        Em.Object.create({ name: 'falcon_keytab', value: 'falcon_keytab_value', serviceName: 'FALCON', isEditable: true }),
-        Em.Object.create({ name: 'mapreduce_keytab', value: 'mapreduce_keytab_value', serviceName: 'MAPREDUCE2', isEditable: true })
-      ]);
-
-      var propertiesEditableTests = [
-        { name: 'spnego_keytab', e: false },
-        { name: 'falcon_keytab', e: true },
-        { name: 'hdfs_keytab', e: false },
-        { name: 'mapreduce_keytab', e: true },
-        { name: 'admin_principal', e: true },
-        { name: 'admin_password', e: true }
-      ];
-      
       propertiesEditableTests.forEach(function(test) {
         it('Add Service: property `{0}` should be {1} editable'.format(test.name, !!test.e ? '' : 'not '), function() {
           expect(res.findProperty('name', test.name).get('isEditable')).to.eql(test.e);

+ 1 - 1
ambari-web/test/controllers/main/admin/kerberos_test.js

@@ -98,7 +98,7 @@ describe('App.MainAdminKerberosController', function() {
       controller.startKerberosWizard.restore();
     });
     it("shows popup", function () {
-      var check =  { items: [{
+      var check = { items: [{
         UpgradeChecks: {
           "check": "Work-preserving RM/NM restart is enabled in YARN configs",
           "status": "FAIL",

+ 3 - 1
ambari-web/test/controllers/main/admin/stack_and_upgrade_controller_test.js

@@ -466,7 +466,7 @@ describe('App.MainAdminStackAndUpgradeController', function() {
         );
         expect(controller.upgrade.callCount).to.equal(item.upgradeCalledCount);
         expect(App.showClusterCheckPopup.callCount).to.equal(item.showClusterCheckPopupCalledCount);
-        if (item.check.id == 'CONFIG_MERGE') {
+        if (item.check.id === 'CONFIG_MERGE') {
           expect(App.showClusterCheckPopup.firstCall.args[2]).to.eql(item.configs);
         }
       });
@@ -2125,6 +2125,7 @@ describe('App.MainAdminStackAndUpgradeController', function() {
     });
 
     it('new window content is valid', function () {
+      /*eslint-disable no-useless-concat */
       expect(mock.document.write.calledWith('<table style="text-align: left;"><thead><tr>' +
         '<th>' + Em.I18n.t('popup.clusterCheck.Upgrade.configsMerge.configType') + '</th>' +
         '<th>' + Em.I18n.t('popup.clusterCheck.Upgrade.configsMerge.propertyName') + '</th>' +
@@ -2146,6 +2147,7 @@ describe('App.MainAdminStackAndUpgradeController', function() {
         '<td>' + 'recommendedValue2' + '</td>' +
         '<td>' + 'resultingValue2' + '</td>' +
         '</tr></tbody></table>')).to.be.true;
+      /*eslint-enable no-useless-concat */
     });
 
     it('document.focus is called once', function () {

+ 0 - 6
ambari-web/test/controllers/main/alerts/definitions_details_controller_test.js

@@ -39,13 +39,7 @@ describe('App.MainAlertDefinitionDetailsController', function () {
   App.TestAliases.testAsComputedOr(getController(), 'isEditing', ['editing.label.isEditing', 'App.router.mainAlertDefinitionConfigsController.canEdit']);
 
   describe('#showSavePopup', function () {
-    var popup;
-    beforeEach(function () {
-      popup = getController().showSavePopup();
-    });
-
     App.TestAliases.testAsComputedOr(getController().showSavePopup(), 'disablePrimary', ['App.router.mainAlertDefinitionDetailsController.editing.label.isError', 'App.router.mainAlertDefinitionConfigsController.hasErrors']);
-
   });
 
   describe('#labelValidation()', function () {

+ 4 - 4
ambari-web/test/controllers/main/alerts/manage_alert_notifications_controller_test.js

@@ -942,13 +942,13 @@ describe('App.ManageAlertNotificationsController', function () {
       controller.set('inputFields.customProperties', []);
     });
 
+    /*eslint-disable mocha-cleanup/asserts-limit */
     it('should add custom Property to customProperties', function () {
-
       controller.set('newCustomProperty', {name: 'n1', value: 'v1'});
       controller.addCustomProperty();
       helpers.nestedExpect([{name: 'n1', value: 'v1', defaultValue: 'v1'}], controller.get('inputFields.customProperties'));
-
     });
+    /*eslint-enable mocha-cleanup/asserts-limit */
 
   });
 
@@ -964,8 +964,8 @@ describe('App.ManageAlertNotificationsController', function () {
       ]);
     });
 
+    /*eslint-disable mocha-cleanup/asserts-limit */
     it('should remove selected custom property', function () {
-
       controller.removeCustomPropertyHandler({context: c});
       helpers.nestedExpect(
         [
@@ -974,8 +974,8 @@ describe('App.ManageAlertNotificationsController', function () {
         ],
         controller.get('inputFields.customProperties')
       );
-
     });
+    /*eslint-enable mocha-cleanup/asserts-limit */
 
   });
 

+ 1 - 1
ambari-web/test/controllers/main/charts/heatmap_metrics/heatmap_metric_test.js

@@ -38,7 +38,7 @@ describe('MainChartHeatmapMetric', function () {
         expect(mainChartHeatmapMetric.formatLegendNumber(test.i)).to.equal(test.e);
       });
     });
-    it('NaN to NaN' + ' ', function () {
+    it('NaN to NaN', function () {
       expect(isNaN(mainChartHeatmapMetric.formatLegendNumber(NaN))).to.equal(true);
     });
   });

+ 3 - 3
ambari-web/test/controllers/main/charts/heatmap_test.js

@@ -366,9 +366,9 @@ describe('MainChartsHeatmapController', function () {
         {rack: 'r1'}
       ];
       var rackMap = controller.indexByRackId(hosts);
-      expect(rackMap['r1'].name).to.equal('r1');
-      expect(rackMap['r1'].rackId).to.equal('r1');
-      expect(rackMap['r1'].hosts).to.eql([{rack: 'r1'}, {rack: 'r1'}]);
+      expect(rackMap.r1.name).to.equal('r1');
+      expect(rackMap.r1.rackId).to.equal('r1');
+      expect(rackMap.r1.hosts).to.eql([{rack: 'r1'}, {rack: 'r1'}]);
     });
   });
 

+ 7 - 11
ambari-web/test/controllers/main/host/details_test.js

@@ -827,10 +827,7 @@ describe('App.MainHostDetailsController', function () {
 
   describe('#showAddComponentPopup()', function () {
 
-    var message = 'Comp1',
-      component = Em.Object.create({
-        componentName: ' Comp1'
-      });
+    var message = 'Comp1';
 
     beforeEach(function () {
       sinon.spy(App.ModalPopup, 'show');
@@ -857,7 +854,6 @@ describe('App.MainHostDetailsController', function () {
     });
 
     it('data is null', function () {
-      var data = {Requests: null};
       expect(controller.installNewComponentSuccessCallback(null, {}, {})).to.be.false;
       expect(controller.showBackgroundOperationsPopup.called).to.be.false;
     });
@@ -2152,7 +2148,7 @@ describe('App.MainHostDetailsController', function () {
       this.stub = sinon.stub(App.HostComponent, 'find').returns([{
         id: 'TASKTRACKER_host1',
         componentName: 'TASKTRACKER'
-      }]);;
+      }]);
     });
 
     afterEach(function () {
@@ -3065,7 +3061,7 @@ describe('App.MainHostDetailsController', function () {
       describe(item.title, function () {
 
         beforeEach(function () {
-          sinon.stub(controller, 'checkComponentDependencies', function (componentName, params) {
+          sinon.stub(controller, 'checkComponentDependencies', function (componentName) {
             return item.dependencies[componentName];
           });
           controller.installClients({
@@ -3578,7 +3574,7 @@ describe('App.MainHostDetailsController', function () {
   describe("#removeHostComponentModel()", function () {
 
     beforeEach(function () {
-      App.cache['services'] = [
+      App.cache.services = [
         {
           ServiceInfo: {
             service_name: 'S1'
@@ -3604,7 +3600,7 @@ describe('App.MainHostDetailsController', function () {
       App.serviceMapper.deleteRecord.restore();
     });
     it("App.cache is updated", function () {
-      expect(App.cache['services'][0].host_components).to.be.empty;
+      expect(App.cache.services[0].host_components).to.be.empty;
     });
     it('Record is deleted', function () {
       expect(App.serviceMapper.deleteRecord.calledOnce).to.be.true;
@@ -3823,8 +3819,8 @@ describe('App.MainHostDetailsController', function () {
 
     var makeHostComponentModel = function(componentName, hostNames) {
       if (Em.isArray(componentName)) {
-        return componentName.map(function(componentName, index) {
-          return makeHostComponentModel(componentName, hostNames[index]);
+        return componentName.map(function(cName, index) {
+          return makeHostComponentModel(cName, hostNames[index]);
         }).reduce(function(p,c) { return p.concat(c); }, []);
       }
       return hostNames.map(function(hostName) {

+ 0 - 1
ambari-web/test/controllers/main/host_test.js

@@ -17,7 +17,6 @@
  */
 
 var App = require('app');
-var validator = require('utils/validator');
 require('utils/batch_scheduled_requests');
 require('controllers/main/host');
 require('mappers/server_data_mapper');

+ 1 - 1
ambari-web/test/controllers/main/service/add_controller_test.js

@@ -381,7 +381,7 @@ describe('App.AddServiceController', function() {
       sinon.stub(this.controller, 'setDBProperty', function(key, value) {
         mock.db = value;
       });
-      this.mockStackService =  sinon.stub(App.StackService, 'find');
+      this.mockStackService = sinon.stub(App.StackService, 'find');
       this.mockService = sinon.stub(App.Service, 'find');
     });
 

+ 2 - 2
ambari-web/test/controllers/main/service/info/config_test.js

@@ -127,7 +127,7 @@ describe("App.MainServiceInfoConfigsController", function () {
         passwordConfigsAreChanged: false
       });
       sinon.stub(mainServiceInfoConfigsController, "get", function(key) {
-        return key == 'isSubmitDisabled' ?  false : Em.get(mainServiceInfoConfigsController, key);
+        return key === 'isSubmitDisabled' ? false : Em.get(mainServiceInfoConfigsController, key);
       });
       sinon.stub(mainServiceInfoConfigsController, "restartServicePopup", Em.K);
       sinon.stub(mainServiceInfoConfigsController, "getHash", function () {
@@ -340,7 +340,7 @@ describe("App.MainServiceInfoConfigsController", function () {
         mainServiceInfoConfigsController.set("content.displayName", t.displayName);
         mainServiceInfoConfigsController.set("content.passiveState", t.passiveState);
         mainServiceInfoConfigsController.rollingRestartStaleConfigSlaveComponents(t.componentName);
-        expect(batchUtils.launchHostComponentRollingRestart.calledWith(t.componentName.context, t.displayName, t.passiveState == "ON", true)).to.equal(true);
+        expect(batchUtils.launchHostComponentRollingRestart.calledWith(t.componentName.context, t.displayName, t.passiveState === "ON", true)).to.equal(true);
       });
     });
   });

+ 5 - 5
ambari-web/test/controllers/main/service/info/summary_test.js

@@ -288,11 +288,11 @@ App.TestAliases.testAsComputedOr(getController(), 'showTimeRangeControl', ['!isS
       App.ajax.send.restore();
     });
     it("make GET call", function () {
-      var controller = App.MainServiceInfoSummaryController.create({
+      var _controller = App.MainServiceInfoSummaryController.create({
         isServiceWithEnhancedWidgets: true,
         content: Em.Object.create({serviceName: 'HDFS'})
       });
-      controller.getActiveWidgetLayout();
+      _controller.getActiveWidgetLayout();
       expect(App.ajax.send.getCall(0).args[0].name).to.equal('widgets.layouts.active.get');
     });
   });
@@ -307,14 +307,14 @@ App.TestAliases.testAsComputedOr(getController(), 'showTimeRangeControl', ['!isS
       App.widgetMapper.map.restore();
     });
     it("isWidgetLayoutsLoaded should be set to true", function () {
-      var controller = App.MainServiceInfoSummaryController.create({
+      var _controller = App.MainServiceInfoSummaryController.create({
         isServiceWithEnhancedWidgets: true,
         content: Em.Object.create({serviceName: 'HDFS'})
       });
-      controller.getActiveWidgetLayoutSuccessCallback({items:[{
+      _controller.getActiveWidgetLayoutSuccessCallback({items:[{
         WidgetLayoutInfo: {}
       }]});
-      expect(controller.get('isWidgetsLoaded')).to.be.true;
+      expect(_controller.get('isWidgetsLoaded')).to.be.true;
     });
 
   });

+ 8 - 91
ambari-web/test/controllers/main/service/item_test.js

@@ -251,88 +251,6 @@ describe('App.MainServiceItemController', function () {
     });
   });
 
-  describe("#startStopPopupPrimary", function () {
-
-    var mainServiceItemController;
-    var tests = [
-      {
-        data: {
-          "serviceName": "HDFS",
-          "state": "STARTED",
-          "query": Em.Object.create({ServiceInfo: "FAIL"})
-        },
-        request: {
-          "RequestInfo": {
-            "context": "_PARSE_.START.HDFS"
-          },
-          "Body": {
-            "ServiceInfo": {
-              "state": "STARTED"
-            }
-          }
-        },
-        m: "Start HDFS"
-      },
-      {
-        data: {
-          "serviceName": "YARN",
-          "state": "STOPPED",
-          "query": Em.Object.create({ServiceInfo: "FAIL"})
-        },
-        request: {
-          "RequestInfo": {
-            "context": "_PARSE_.STOP.YARN"
-          },
-          "Body": {
-            "ServiceInfo": {
-              "state": "STOPPED"
-            }
-          }
-        },
-        m: "Stop YARN"
-      }
-    ];
-
-    beforeEach(function () {
-      sinon.spy($, 'ajax');
-    });
-
-    afterEach(function () {
-      $.ajax.restore();
-    });
-
-
-    tests.forEach(function (test, index) {
-
-      describe('case #' + (index + 1), function () {
-
-        beforeEach(function () {
-          mainServiceItemController = App.MainServiceItemController.create({content: {serviceName: test.data.serviceName}});
-          mainServiceItemController.startStopPopupPrimary(test.data.state, test.data.query);
-          this.data = JSON.parse($.ajax.args[0][0].data);
-        });
-
-        it('request is sent with valid data ' + (index + 1), function () {
-          expect($.ajax.calledOnce).to.equal(true);
-          expect(this.data.Body.ServiceInfo.state).to.equal(test.request.Body.ServiceInfo.state);
-          expect(this.data.RequestInfo.context).to.equal(test.request.RequestInfo.context);
-        });
-
-        it('isStopDisabled is true ' + (index + 1), function () {
-          expect(mainServiceItemController.get('isStopDisabled')).to.equal(true);
-        });
-
-        it('isStartDisabled is true ' + (index + 1), function () {
-          expect(mainServiceItemController.get('isStartDisabled')).to.equal(true);
-        });
-
-      });
-
-    });
-
-
-  });
-
   describe("#startService , #stopService", function () {
     var mainServiceItemController = App.MainServiceItemController.create({startStopPopup: Em.K});
     beforeEach(function () {
@@ -516,16 +434,15 @@ describe('App.MainServiceItemController', function () {
       });
       
       it ("should not display a dependent list if it is to start a service", function() {
-        var mainServiceItemController = App.MainServiceItemController.create(
+        var _mainServiceItemController = App.MainServiceItemController.create(
             {content: {serviceName: "HDFS", passiveState:'OFF'}});
-        mainServiceItemController.startStopPopup(event, "");
+        _mainServiceItemController.startStopPopup(event, "");
         expect(Em.I18n.t.calledWith('services.service.stop.warningMsg.dependent.services')).to.not.be.ok;
       });
       
       describe ("should display dependent list if other services depend on the one to be stopped", function() {
-        var mainServiceItemController;
         beforeEach(function () {
-          mainServiceItemController = App.MainServiceItemController.create(
+          var _mainServiceItemController = App.MainServiceItemController.create(
             {content: {
               serviceName: "HDFS",
               passiveState:'OFF',
@@ -535,10 +452,10 @@ describe('App.MainServiceItemController', function () {
               }]
             }}
           );
-          mainServiceItemController.startStopPopup(event, "INSTALLED");
+          _mainServiceItemController.startStopPopup(event, "INSTALLED");
           this.dependencies = Em.I18n.t('services.service.stop.warningMsg.dependent.services').format("HDFS", "HBase,YARN");
           this.msg = Em.I18n.t('services.service.stop.warningMsg.turnOnMM').format("HDFS");
-          this.fullMsg = mainServiceItemController.addAdditionalWarningMessage("INSTALLED", this.msg, "HDFS");
+          this.fullMsg = _mainServiceItemController.addAdditionalWarningMessage("INSTALLED", this.msg, "HDFS");
         });
 
         it('turnOnMM message is shown', function () {
@@ -555,12 +472,12 @@ describe('App.MainServiceItemController', function () {
       describe("should display the dependent service if another service depends on the one to be stopped", function() {
 
         beforeEach(function () {
-          var mainServiceItemController = App.MainServiceItemController.create(
+          var _mainServiceItemController = App.MainServiceItemController.create(
             {content: {serviceName: "HIVE", passiveState:'OFF'}});
-          mainServiceItemController.startStopPopup(event, "INSTALLED");
+          _mainServiceItemController.startStopPopup(event, "INSTALLED");
           this.dependencies = Em.I18n.t('services.service.stop.warningMsg.dependent.services').format("HIVE", "Spark");
           this.msg = Em.I18n.t('services.service.stop.warningMsg.turnOnMM').format("HIVE");
-          this.fullMsg = mainServiceItemController.addAdditionalWarningMessage("INSTALLED", this.msg, "HIVE");
+          this.fullMsg = _mainServiceItemController.addAdditionalWarningMessage("INSTALLED", this.msg, "HIVE");
         });
 
         it('message about dependent services is shown', function () {

+ 1 - 1
ambari-web/test/controllers/main/service/manage_config_groups_controller_test.js

@@ -194,7 +194,7 @@ describe('App.ManageConfigGroupsController', function() {
     var service = Em.Object.create({});
     manageConfigGroupsController.set('hostsModifiedConfigGroups', {});
     describe("#controller passed", function () {
-      var controller = Em.Object.create({
+      controller = Em.Object.create({
         content: Em.Object.create()
       });
       var popup = manageConfigGroupsController.manageConfigurationGroups(controller, service);

+ 0 - 1
ambari-web/test/controllers/main/service/reassign/step1_controller_test.js

@@ -92,7 +92,6 @@ describe('App.ReassignMasterWizardStep1Controller', function () {
 
   describe('#onLoadConfigs', function() {
 
-    var controller;
     var reassignCtrl;
 
     beforeEach(function() {

+ 0 - 3
ambari-web/test/controllers/main/service/reassign/step2_controller_test.js

@@ -35,7 +35,6 @@ describe('App.ReassignMasterWizardStep2Controller', function () {
 
   describe('#customClientSideValidation', function () {
     var hostComponents = [];
-    var isSubmitDisabled = false;
 
     beforeEach(function () {
       sinon.stub(App.HostComponent, 'find', function () {
@@ -89,8 +88,6 @@ describe('App.ReassignMasterWizardStep2Controller', function () {
     });
 
     it('submitDisabled is already true', function () {
-      isSubmitDisabled = true;
-
       expect(controller.customClientSideValidation()).to.be.false;
     });
   });

+ 2 - 2
ambari-web/test/controllers/main/service/reassign/step4_controller_test.js

@@ -549,7 +549,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
   });
 
   describe('#getConfigUrlParams()', function () {
-    var testCases  = [
+    var testCases = [
       {
         componentName: 'NAMENODE',
         result: [
@@ -1577,7 +1577,7 @@ describe('App.ReassignMasterWizardStep4Controller', function () {
 
   });
 
-  describe("#prepareDBCheckAction()", function() {
+  describe.skip("#prepareDBCheckAction()", function() {
     beforeEach(function () {
       sinon.stub(App.router, 'get').returns({
         'jdk_location': 'jdk_location',

+ 1 - 1
ambari-web/test/controllers/main/service/widgets/create/step2_controller_test.js

@@ -263,7 +263,7 @@ describe('App.WidgetWizardStep2Controller', function () {
     });
 
     it('check id', function () {
-      expect(controller.get('expressions').mapProperty('id')).to.eql([1, 2]);;
+      expect(controller.get('expressions').mapProperty('id')).to.eql([1, 2]);
     });
 
     it('check isRemovable', function () {

+ 5 - 3
ambari-web/test/controllers/main/service/widgets/create/wizard_controller_test.js

@@ -37,9 +37,11 @@ describe('App.WidgetWizardController', function () {
     beforeEach(function () {
       controller = App.WidgetWizardController.create();
       sinon.stub(App.YARNService, 'find', function (k) {
-        if ('YARN' === k) return Em.Object.create({
-          'allQueueNames': ["root", "root/queue1", "root/queue1/queue2", "root/queue1/queue3"]
-        });
+        if ('YARN' === k) {
+          return Em.Object.create({
+            'allQueueNames': ["root", "root/queue1", "root/queue1/queue2", "root/queue1/queue3"]
+          });
+        }
       });
     });
     afterEach(function () {

+ 1 - 1
ambari-web/test/controllers/main/service_test.js

@@ -110,7 +110,7 @@ describe('App.MainServiceController', function () {
 
   describe('#cluster', function() {
 
-    var tests = Em.A([
+    Em.A([
       {
         isLoaded: true,
         cluster: [],

+ 5 - 6
ambari-web/test/controllers/main_test.js

@@ -111,7 +111,6 @@ describe('App.MainController', function () {
   });
 
   describe('#checkServerClientVersion', function() {
-    var initialize = false;
     beforeEach(function () {
       sinon.stub(mainController, 'getServerVersion').returns({
         done: function(func) {
@@ -156,14 +155,14 @@ describe('App.MainController', function () {
     });
   });
 
-  describe('#updateTitle', function() {
+  describe.skip('#updateTitle', function() {
     beforeEach(function () {
       sinon.stub(App.router, 'get', function(message){
-        if (message == 'clusterController.clusterName') {
+        if (message === 'clusterController.clusterName') {
           return 'c1';
-        } else if (message == 'clusterInstallCompleted') {
+        } else if (message === 'clusterInstallCompleted') {
           return true;
-        } else if (message == 'clusterController') {
+        } else if (message === 'clusterController') {
           return {
             get: function() {
               return true;
@@ -175,7 +174,7 @@ describe('App.MainController', function () {
     afterEach(function () {
       App.router.get.restore();
     });
-    it ('Should update title', function() {
+    it('Should update title', function() {
       $('body').append('<title id="title-id">text</title>');
       mainController.updateTitle();
       expect($('title').text()).to.be.equal('Ambari - c1');

+ 1 - 1
ambari-web/test/controllers/wizard/step10_test.js

@@ -410,7 +410,7 @@ describe('App.WizardStep10Controller', function () {
     tests.forEach(function(test) {
       it('Install time' + test.installTime ? ' available' : ' not available', function() {
         controller.set('content', {cluster: {installTime: test.installTime}});
-        var r = controller.loadInstallTime();
+        controller.loadInstallTime();
         expect(controller.get('clusterInfo').mapProperty('id')).to.eql(test.e);
       });
     });

+ 1 - 2
ambari-web/test/controllers/wizard/step2_test.js

@@ -17,7 +17,6 @@
  */
 
 var App = require('app');
-var Ember = require('ember');
 require('controllers/wizard/step2_controller');
 require('models/host');
 require('models/host_component');
@@ -412,7 +411,7 @@ describe('App.WizardStep2Controller', function () {
       var result = true;
       var hosts = controller.get('hostNameArr');
       for (var i = 1; i<12; i++) {
-        var extra = (i.toString().length == 1) ? 0 : '';
+        var extra = i.toString().length === 1 ? 0 : '';
         if (hosts[i-1] !== 'host0' + extra + i) {
           result = false;
         }

+ 8 - 11
ambari-web/test/controllers/wizard/step3_test.js

@@ -73,7 +73,7 @@ describe('App.WizardStep3Controller', function () {
           Em.Object.create({name: 'wst3_host2'})
         ]
       });
-      var test_data = {
+      var testData = {
         items: [
           {
             Hosts: {
@@ -92,7 +92,7 @@ describe('App.WizardStep3Controller', function () {
           }
         ]
       };
-      c.getAllRegisteredHostsCallback(test_data);
+      c.getAllRegisteredHostsCallback(testData);
       expect(c.get('hasMoreRegisteredHosts')).to.equal(true);
       expect(c.get('registeredHosts').length).to.equal(1);
     });
@@ -107,7 +107,7 @@ describe('App.WizardStep3Controller', function () {
           {name: 'wst3_host4'}
         ]
       });
-      var test_data = {
+      var testData = {
         items: [
           {
             Hosts: {
@@ -121,7 +121,7 @@ describe('App.WizardStep3Controller', function () {
           }
         ]
       };
-      c.getAllRegisteredHostsCallback(test_data);
+      c.getAllRegisteredHostsCallback(testData);
       expect(c.get('hasMoreRegisteredHosts')).to.equal(false);
       expect(c.get('registeredHosts')).to.equal('');
     });
@@ -135,7 +135,7 @@ describe('App.WizardStep3Controller', function () {
           {name: 'wst3_host1'}
         ]
       });
-      var test_data = {
+      var testData = {
         items: [
           {
             Hosts: {
@@ -144,7 +144,7 @@ describe('App.WizardStep3Controller', function () {
           }
         ]
       };
-      c.getAllRegisteredHostsCallback(test_data);
+      c.getAllRegisteredHostsCallback(testData);
       expect(c.get('hasMoreRegisteredHosts')).to.equal(false);
       expect(c.get('registeredHosts')).to.equal('');
     });
@@ -2738,8 +2738,7 @@ describe('App.WizardStep3Controller', function () {
     it('should do request to ambari-server', function () {
 
       var data = null,
-        jdkRequestIndex = 'jdkRequestIndex',
-        url = '/requests/' + jdkRequestIndex + '?fields=*,tasks/Tasks/host_name,tasks/Tasks/status,tasks/Tasks/structured_out';
+        jdkRequestIndex = 'jdkRequestIndex';
       c.set('jdkRequestIndex', jdkRequestIndex);
       c.set('jdkCategoryWarnings', null);
       c.doCheckJDKsuccessCallback(data);
@@ -2751,11 +2750,9 @@ describe('App.WizardStep3Controller', function () {
   describe('#doCheckJDKerrorCallback', function () {
 
     it('should set isJDKWarningsLoaded to true', function () {
-
       c.set('isJDKWarningsLoaded', false);
       c.doCheckJDKerrorCallback();
-      c.set('isJDKWarningsLoaded', true);
-
+      expect(c.get('isJDKWarningsLoaded')).to.be.true;
     });
 
   });

+ 12 - 9
ambari-web/test/controllers/wizard/step4_test.js

@@ -40,7 +40,7 @@ describe('App.WizardStep4Controller', function () {
         'isSelected': false,
         'canBeSelected': true,
         'isInstalled': false,
-        isPrimaryDFS: serviceName == 'HDFS',
+        isPrimaryDFS: serviceName === 'HDFS',
         isDFS: ['HDFS','GLUSTERFS'].contains(serviceName),
         isMonitoringService: ['GANGLIA'].contains(serviceName),
         requiredServices: App.StackService.find(serviceName).get('requiredServices'),
@@ -58,7 +58,7 @@ describe('App.WizardStep4Controller', function () {
     return allServices;
   };
 
-  services.forEach(function(serviceName, index){
+  services.forEach(function(serviceName) {
     controller.pushObject(Ember.Object.create({
       'serviceName':serviceName, 'isSelected': true, 'isHiddenOnSelectServicePage': false, 'isInstalled': false, 'isDisabled': 'HDFS' === serviceName, isDFS: 'HDFS' === serviceName
     }));
@@ -164,22 +164,25 @@ describe('App.WizardStep4Controller', function () {
 
         beforeEach(function () {
           controller.clear();
-          for(var id in testCase.condition) {
+          Object.keys(testCase.condition).forEach(function (id) {
             controller.pushObject(Ember.Object.create({
-              'serviceName':id, 'isSelected': testCase.condition[id], 'canBeSelected': true, 'isInstalled': false,
+              serviceName: id,
+              isSelected: testCase.condition[id],
+              canBeSelected: true,
+              isInstalled: false,
               coSelectedServices: function() {
                 return App.StackService.coSelected[this.get('serviceName')] || [];
               }.property('serviceName')
             }));
-          }
+          });
           controller.setGroupedServices();
         });
 
-        for(var service in testCase.result) {
+        Object.keys(testCase.result).forEach(function (service) {
           it(service, function () {
             expect(controller.findProperty('serviceName', service).get('isSelected')).to.equal(testCase.result[service]);
           });
-        }
+        });
       });
     }, this);
   });
@@ -335,7 +338,7 @@ describe('App.WizardStep4Controller', function () {
     controllerNames.forEach(function (name) {
       tests.forEach(function(test) {
         var errorsExpected = test.errorsExpected;
-        if (name != 'installerController') {
+        if (name !== 'installerController') {
           errorsExpected = test.errorsExpected.without('ambariMetricsCheck');
         }
         var message = '{0}, {1} selected validation should be {2}, errors: {3}'
@@ -442,7 +445,7 @@ describe('App.WizardStep4Controller', function () {
             beforeEach(function () {
               currentErrorObject = c.get('errorStack').findProperty('isShown', false);
             });
-            test.errorsExpected.forEach(function(error, index, errors) {
+            test.errorsExpected.forEach(function(error) {
               it(error, function () {
                 // validate current error
                 if (currentErrorObject) {

+ 0 - 2
ambari-web/test/controllers/wizard/step5_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var Ember = require('ember');
 var App = require('app');
 require('controllers/wizard/step5_controller');
 var modelSetup = require('test/init_model_test');
@@ -30,7 +29,6 @@ describe('App.WizardStep5Controller', function () {
 
   var controller = App.WizardStep5Controller.create();
   controller.set('content', {});
-  var cpu = 2, memory = 4;
 
   controller.set('content', {});
 

+ 4 - 4
ambari-web/test/controllers/wizard/step6_test.js

@@ -90,13 +90,13 @@ describe('App.WizardStep6Controller', function () {
 
   describe('#installedServiceNames', function () {
     it(' should filter content.services by isInstalled property', function () {
-      var services = Em.A([]);
-      services.pushObjects(Em.A([{isInstalled: true, serviceName: "service1"},
+      var _services = Em.A([]);
+      _services.pushObjects(Em.A([{isInstalled: true, serviceName: "service1"},
                            {isInstalled: false, serviceName: "service2"},
                            {isInstalled: true, serviceName: "service3"},
                            {isInstalled: false, serviceName: "service4"},
                            {isInstalled: true, serviceName: "service5"}]));
-      controller.set('content.services', services);
+      controller.set('content.services', _services);
       expect(controller.get('installedServiceNames')).to.eql(["service1", "service3", "service5"]);
     });
   });
@@ -588,7 +588,7 @@ describe('App.WizardStep6Controller', function () {
 
     beforeEach(function () {
       sinon.stub(validationUtils, 'filterNotInstalledComponents', function () {
-        return  Em.A([Em.Object.create({
+        return Em.A([Em.Object.create({
               componentName: 'c0',
               isSlave: true,
               type: 'host-component',

+ 69 - 41
ambari-web/test/controllers/wizard/step7_test.js

@@ -262,7 +262,7 @@ describe('App.InstallerStep7Controller', function () {
 
   describe('#_createSiteToTagMap', function () {
     it('should return filtered map', function () {
-      var desired_configs = {
+      var desiredConfigs = {
         site1: {
           tag: "tag1"
         },
@@ -277,7 +277,7 @@ describe('App.InstallerStep7Controller', function () {
         site1: true,
         site3: true
       };
-      var siteToTagMap = installerStep7Controller._createSiteToTagMap(desired_configs,sites);
+      var siteToTagMap = installerStep7Controller._createSiteToTagMap(desiredConfigs,sites);
       expect(siteToTagMap).to.eql({
         site1: "tag1",
         site3: "tag3"
@@ -363,7 +363,7 @@ describe('App.InstallerStep7Controller', function () {
     });
 
     it('should return serviceConfigTags', function () {
-      var desired_configs = {
+      var desiredConfigs = {
         site1: {
           tag: "tag1"
         },
@@ -376,10 +376,10 @@ describe('App.InstallerStep7Controller', function () {
       };
       var data = {
         Clusters: {
-          desired_configs: desired_configs
+          desired_configs: desiredConfigs
         }
       };
-      var siteToTagMap = installerStep7Controller.getConfigTagsSuccess(data);
+      installerStep7Controller.getConfigTagsSuccess(data);
       expect(installerStep7Controller.get('serviceConfigTags')).to.eql([
         {
           "siteName": "site1",
@@ -541,8 +541,7 @@ describe('App.InstallerStep7Controller', function () {
           {isDefault: false, n: 'n1'},
           defaultGroup,
           {n: 'n3'}
-        ],
-        selectedConfigGroup = {};
+        ];
       installerStep7Controller.reopen({selectedService: {serviceName: 's1', configGroups: configGroups}});
       installerStep7Controller.selectedServiceObserver();
       expect(installerStep7Controller.get('configGroups').mapProperty('n')).to.eql(['n2', 'n1', 'n3']);
@@ -1517,7 +1516,7 @@ describe('App.InstallerStep7Controller', function () {
       });
       installerStep7Controller.set('wizardController', wizardController);
       installerStep7Controller.set('stepConfigs', Em.A([Em.Object.create({serviceName: 'OOZIE', configs: Em.A([]) })]));
-      var desired_configs = {
+      var desiredConfigs = {
         site1: {
           tag: "tag1"
         },
@@ -1543,7 +1542,7 @@ describe('App.InstallerStep7Controller', function () {
           })
         })]),
         Clusters: {
-          desired_configs: desired_configs
+          desired_configs: desiredConfigs
         }
       };
       installerStep7Controller.loadServiceTagsSuccess(data, {}, params);
@@ -1687,14 +1686,16 @@ describe('App.InstallerStep7Controller', function () {
         recommendedValue: 'c6402.ambari.apache.org:50070'
       }
     ];
+    var oldConfigs = configs.slice();
 
     it('should copy properties from hdfs-site to hdfs-client for HAWQ', function() {
-      var oldConfigs = configs.slice();
       installerStep7Controller.addHawqConfigsOnNnHa(configs);
       // ensure 6 new configs were added
       expect(configs.length - oldConfigs.length).to.be.eql(6);
-      oldConfigs.forEach(function(property){
-        // find the same property in hdfs-client for HAWQ and see if attribute value matches with the corresponding property's attribute value in hdfs-site
+    });
+
+    it('find the same property in hdfs-client for HAWQ and see if attribute value matches with the corresponding property\'s attribute value in hdfs-site', function () {
+      oldConfigs.forEach(function(property) {
         expect(configs.findProperty('id', property.name + '__hdfs-client').description).to.be.eql(property.description);
         expect(configs.findProperty('id', property.name + '__hdfs-client').displayName).to.be.eql(property.displayName);
         expect(configs.findProperty('id', property.name + '__hdfs-client').value).to.be.eql(property.value);
@@ -1719,26 +1720,32 @@ describe('App.InstallerStep7Controller', function () {
       }
     ];
 
-    it('should update properties in yarn-client for HAWQ if yarn ha is enabled', function() {
-      var inputConfigsCount = configs.length;
+    beforeEach(function () {
+      this.inputConfigsCount = configs.length;
       installerStep7Controller.addHawqConfigsOnRMHa(configs);
-      var yarnRmDetails = configs.findProperty('id', 'yarn.resourcemanager.ha__yarn-client');
-      var yarnRmSchedulerDetails = configs.findProperty('id', 'yarn.resourcemanager.scheduler.ha__yarn-client');
+      this.yarnRmDetails = configs.findProperty('id', 'yarn.resourcemanager.ha__yarn-client');
+      this.yarnRmSchedulerDetails = configs.findProperty('id', 'yarn.resourcemanager.scheduler.ha__yarn-client');
+    });
 
+    it('should update properties in yarn-client for HAWQ if yarn ha is enabled', function() {
+      var noOfConfigsAdded = 2;
+      expect(configs.length).to.be.equal(this.inputConfigsCount + noOfConfigsAdded);
+    });
+
+    it('yarn.resourcemanager.ha__yarn-client', function() {
       var expectedYarnRmHaValue = 'c6401.ambari.apache.org:8032,c6402.ambari.apache.org:8032';
-      expect(yarnRmDetails.value).to.be.eql(expectedYarnRmHaValue);
-      expect(yarnRmDetails.recommendedValue).to.be.eql(expectedYarnRmHaValue);
-      expect(yarnRmDetails.displayName).to.be.eql('yarn.resourcemanager.ha');
-      expect(yarnRmDetails.description).to.be.eql('Comma separated yarn resourcemanager host addresses with port');
+      expect(this.yarnRmDetails.value).to.be.equal(expectedYarnRmHaValue);
+      expect(this.yarnRmDetails.recommendedValue).to.be.equal(expectedYarnRmHaValue);
+      expect(this.yarnRmDetails.displayName).to.be.equal('yarn.resourcemanager.ha');
+      expect(this.yarnRmDetails.description).to.be.equal('Comma separated yarn resourcemanager host addresses with port');
+    });
 
+    it('yarn.resourcemanager.scheduler.ha__yarn-client', function() {
       var expectedYarnRmSchedulerValue = 'c6401.ambari.apache.org:8030,c6402.ambari.apache.org:8030';
-      expect(yarnRmSchedulerDetails.value).to.be.eql(expectedYarnRmSchedulerValue);
-      expect(yarnRmSchedulerDetails.recommendedValue).to.be.eql(expectedYarnRmSchedulerValue);
-      expect(yarnRmSchedulerDetails.displayName).to.be.eql('yarn.resourcemanager.scheduler.ha');
-      expect(yarnRmSchedulerDetails.description).to.be.eql('Comma separated yarn resourcemanager scheduler addresses with port');
-
-      var noOfConfigsAdded = 2;
-      expect(configs.length).to.be.eql(inputConfigsCount + noOfConfigsAdded) ;
+      expect(this.yarnRmSchedulerDetails.value).to.be.equal(expectedYarnRmSchedulerValue);
+      expect(this.yarnRmSchedulerDetails.recommendedValue).to.be.equal(expectedYarnRmSchedulerValue);
+      expect(this.yarnRmSchedulerDetails.displayName).to.be.equal('yarn.resourcemanager.scheduler.ha');
+      expect(this.yarnRmSchedulerDetails.description).to.be.equal('Comma separated yarn resourcemanager scheduler addresses with port');
     });
   });
 
@@ -1776,20 +1783,43 @@ describe('App.InstallerStep7Controller', function () {
         }
       ];
 
-    it('should add three security related configs for HAWQ if Kerberos is enabled', function () {
-      var originalConfigsLength = configs.length;
+    beforeEach(function () {
+      this.originalConfigsLength = configs.length;
       installerStep7Controller.addHawqConfigsOnKerberizedCluster(configs);
+    });
+
+    it('should add three security related configs for HAWQ if Kerberos is enabled', function () {
       // ensure 3 new configs are added
-      expect(configs.length - originalConfigsLength).to.be.eql(3);
-      // check if all three new properties were added
-      secureProperties.forEach(function (newProperty) {
-        var newPropertyAdded = configs.findProperty('id', newProperty.name + '__' + newProperty.file);
-        expect(newPropertyAdded.name).to.be.eql(newProperty.name);
-        expect(newPropertyAdded.displayName).to.be.eql(newProperty.name);
-        expect(newPropertyAdded.value).to.be.eql(newProperty.value);
-        expect(newPropertyAdded.recommendedValue).to.be.eql(newProperty.value);
-        expect(newPropertyAdded.isOverridable).to.be.eql(newProperty.isOverridable);
-        expect(newPropertyAdded.isReconfigurable).to.be.eql(newProperty.isReconfigurable);
+      expect(configs.length - this.originalConfigsLength).to.be.eql(3);
+    });
+
+    // check if all three new properties were added
+    secureProperties.forEach(function (newProperty) {
+      var id = newProperty.name + '__' + newProperty.file;
+      describe(id, function () {
+
+        beforeEach(function () {
+          this.newPropertyAdded = configs.findProperty('id', id);
+        });
+
+        it('#name', function () {
+          expect(this.newPropertyAdded.name).to.be.equal(newProperty.name);
+        });
+        it('#displayName', function () {
+          expect(this.newPropertyAdded.displayName).to.be.equal(newProperty.name);
+        });
+        it('#value', function () {
+          expect(this.newPropertyAdded.value).to.be.equal(newProperty.value);
+        });
+        it('#recommendedValue', function () {
+          expect(this.newPropertyAdded.recommendedValue).to.be.equal(newProperty.value);
+        });
+        it('#isOverridable', function () {
+          expect(this.newPropertyAdded.isOverridable).to.be.equal(newProperty.isOverridable);
+        });
+        it('#isReconfigurable', function () {
+          expect(this.newPropertyAdded.isReconfigurable).to.be.equal(newProperty.isReconfigurable);
+        });
       });
     });
   });
@@ -2320,8 +2350,6 @@ describe('App.InstallerStep7Controller', function () {
 
     describe('#addServiceController', function () {
 
-      var installedServices = [];
-
       beforeEach(function () {
         installerStep7Controller.set('wizardController', {name: 'addServiceController'});
         this.stub = sinon.stub(App.configsCollection, 'getConfigByName');

+ 8 - 9
ambari-web/test/controllers/wizard/step8_test.js

@@ -17,7 +17,6 @@
  */
 
 var App = require('app');
-var modelSetup = require('test/init_model_test');
 require('utils/ajax/ajax_queue');
 require('controllers/main/service/info/configs');
 require('controllers/wizard/step8_controller');
@@ -432,10 +431,10 @@ describe('App.WizardStep8Controller', function () {
           isNotDefaultValue: false
         })
       });
-      var configs = Em.A([Em.Object.create({
+      var _configs = Em.A([Em.Object.create({
         name: 'property'
       })]);
-      expect(installerStep8Controller.isConfigsChanged(properties,configs)).to.be.true;
+      expect(installerStep8Controller.isConfigsChanged(properties, _configs)).to.be.true;
     });
   });
 
@@ -1186,7 +1185,7 @@ describe('App.WizardStep8Controller', function () {
       installerStep8Controller.deleteClusters(clusterNames);
       expect(App.ajax.send.callCount).to.equal(clusterNames.length);
       clusterNames.forEach(function(n, i) {
-        expect(App.ajax.send.getCall(i).args[0].data).to.eql({name: n, isLast: i == clusterNames.length - 1});
+        expect(App.ajax.send.getCall(i).args[0].data).to.eql({name: n, isLast: i === clusterNames.length - 1});
       });
     });
 
@@ -1199,7 +1198,7 @@ describe('App.WizardStep8Controller', function () {
 
   describe('#createStormSiteObj', function() {
     it('should replace quote \'"\' to "\'" for some properties', function() {
-      var configs = [
+      var _configs = [
           {filename: 'storm-site.xml', value: ["a", "b"], name: 'storm.zookeeper.servers'}
         ],
         expected = {
@@ -1209,12 +1208,12 @@ describe('App.WizardStep8Controller', function () {
             'storm.zookeeper.servers': '[\'a\',\'b\']'
           }
         };
-      installerStep8Controller.reopen({configs: configs});
+      installerStep8Controller.reopen({configs: _configs});
       expect(installerStep8Controller.createStormSiteObj('version1')).to.eql(expected);
     });
 
     it('should not escape special characters', function() {
-      var configs = [
+      var _configs = [
           {filename: 'storm-site.xml', value: "abc\n\t", name: 'nimbus.childopts'},
           {filename: 'storm-site.xml', value: "a\nb", name: 'supervisor.childopts'},
           {filename: 'storm-site.xml', value: "a\t\tb", name: 'worker.childopts'}
@@ -1228,7 +1227,7 @@ describe('App.WizardStep8Controller', function () {
             'worker.childopts': 'a\t\tb'
           }
         };
-      installerStep8Controller.reopen({configs: configs});
+      installerStep8Controller.reopen({configs: _configs});
       expect(installerStep8Controller.createStormSiteObj('version1')).to.eql(expected);
     });
   });
@@ -1967,7 +1966,7 @@ describe('App.WizardStep8Controller', function () {
           expect(data.properties['ambari.dispatch.credential.password']).to.equal('pwd');
         });
         it('custom property is valid', function () {
-          expect(data.properties['some_p']).to.equal('some_v');
+          expect(data.properties.some_p).to.equal('some_v');
         });
 
       });

+ 15 - 12
ambari-web/test/controllers/wizard/step9_test.js

@@ -342,7 +342,7 @@ describe('App.InstallerStep9Controller', function () {
     });
   });
 
-  var hosts_for_load_and_render = {
+  var hostsForLoadAndRender = {
     'host1': {
       message: 'message1',
       status: 'unknown',
@@ -387,23 +387,23 @@ describe('App.InstallerStep9Controller', function () {
   describe('#loadHosts', function () {
 
     beforeEach(function() {
-      c.reopen({content: {hosts: hosts_for_load_and_render}});
+      c.reopen({content: {hosts: hostsForLoadAndRender}});
       c.loadHosts();
     });
 
     it('Only REGISTERED hosts', function () {
-      var loaded_hosts = c.get('hosts');
-      expect(loaded_hosts.length).to.equal(2);
+      var loadedHosts = c.get('hosts');
+      expect(loadedHosts.length).to.equal(2);
     });
 
     it('All hosts have progress 0', function () {
-      var loaded_hosts = c.get('hosts');
-      expect(loaded_hosts.everyProperty('progress', 0)).to.equal(true);
+      var loadedHosts = c.get('hosts');
+      expect(loadedHosts.everyProperty('progress', 0)).to.equal(true);
     });
 
     it('All host don\'t have logTasks', function () {
-      var loaded_hosts = c.get('hosts');
-      expect(loaded_hosts.everyProperty('logTasks.length', 0)).to.equal(true);
+      var loadedHosts = c.get('hosts');
+      expect(loadedHosts.everyProperty('logTasks.length', 0)).to.equal(true);
     });
   });
 
@@ -589,7 +589,7 @@ describe('App.InstallerStep9Controller', function () {
   describe('#launchStartServices', function () {
     beforeEach(function() {
       sinon.stub(App, 'get', function(k) {
-        if (k === 'components.slaves')
+        if (k === 'components.slaves') {
           return ["TASKTRACKER", "DATANODE", 
                   "JOURNALNODE", "ZKFC", 
                   "APP_TIMELINE_SERVER", 
@@ -598,6 +598,7 @@ describe('App.InstallerStep9Controller', function () {
                   "HBASE_REGIONSERVER", 
                   "SUPERVISOR", 
                   "FLUME_HANDLER"];
+        }
         return true;
       });
     });
@@ -870,8 +871,9 @@ describe('App.InstallerStep9Controller', function () {
 
     beforeEach(function() {
       sinon.stub(App, 'get', function(k) {
-        if (k === 'components.slaves')
+        if (k === 'components.slaves') {
           return ["TASKTRACKER", "DATANODE", "JOURNALNODE", "ZKFC", "APP_TIMELINE_SERVER", "NODEMANAGER", "GANGLIA_MONITOR", "HBASE_REGIONSERVER", "SUPERVISOR", "FLUME_HANDLER"];
+        }
         return Em.get(App, k);
       });
     });
@@ -964,7 +966,7 @@ describe('App.InstallerStep9Controller', function () {
     tests.forEach(function (test) {
       it(test.m, function () {
         c.onInProgressPerHost(test.actions, test.host);
-        expect(test.host.message == test.e.message).to.equal(test.e.b);
+        expect(test.host.message === test.e.message).to.equal(test.e.b);
       });
     });
   });
@@ -1163,8 +1165,9 @@ describe('App.InstallerStep9Controller', function () {
 
     beforeEach(function() {
       sinon.stub(App, 'get', function(k) {
-        if (k === 'components.slaves')
+        if (k === 'components.slaves') {
           return ["TASKTRACKER", "DATANODE", "JOURNALNODE", "ZKFC", "APP_TIMELINE_SERVER", "NODEMANAGER", "GANGLIA_MONITOR", "HBASE_REGIONSERVER", "SUPERVISOR", "FLUME_HANDLER"];
+        }
         return Em.get(App, k);
       });
     });

+ 36 - 45
ambari-web/test/controllers/wizard_test.js

@@ -22,41 +22,41 @@ require('controllers/wizard');
 
 var c;
 
+function getSteps(start, count) {
+  var steps = [];
+  for (var j = start; j <= count; j++) {
+    steps.push(Em.Object.create({step: j, value: false}));
+  }
+  return steps;
+}
+
 describe('App.WizardController', function () {
 
   var wizardController = App.WizardController.create({});
 
   var totalSteps = 11;
-  var ruller = [];
-  for(var i = 0; i < totalSteps; i++) {
-    ruller.push(i);
-  }
-
+  var ruller = d3.range(0, totalSteps);
+  var i;
   beforeEach(function () {
     c = App.WizardController.create({});
   });
 
-  describe('#setLowerStepsDisable', function() {
-    for(var i = 1; i < totalSteps; i++) {
-      var indx = i;
-      var steps = [];
-      for(var j = 1; j <= indx; j++) {
-        steps.push(Em.Object.create({step:j,value:false}));
-      }
-      wizardController.set('isStepDisabled', steps);
-      for(j = 1; j <= indx; j++) {
-        it('Steps: ' + i + ' | Disabled: ' + (j-1), function() {
-          wizardController.setLowerStepsDisable(j);
-          expect(wizardController.get('isStepDisabled').filterProperty('value', true).length).to.equal(j-1);
-        });
-      }
-    }
+  describe('#setLowerStepsDisable', function () {
+    var steps = getSteps(1, 10);
+    wizardController.set('isStepDisabled', steps);
+    steps.forEach(function (step) {
+      var index = step.get('step');
+      it('Steps: 10 | Disabled: ' + (index - 1), function () {
+        wizardController.setLowerStepsDisable(index);
+        expect(wizardController.get('isStepDisabled').filterProperty('value', true).length).to.be.equal(index - 1);
+      });
+    });
   });
 
   // isStep0 ... isStep10 tests
   App.WizardController1 = App.WizardController.extend({currentStep:''});
   var tests = [];
-  for (var i = 0; i < totalSteps; i++) {
+  for (i = 0; i < totalSteps; i++) {
     var n = ruller.slice(0);
     n.splice(i, 1);
     tests.push({i: i, n: n});
@@ -65,11 +65,13 @@ describe('App.WizardController', function () {
     describe('isStep' + test.i, function () {
       var w = App.WizardController1.create();
       w.set('currentStep', test.i);
-      it('Current Step is ' + test.i + ', so isStep' + test.i + ' is TRUE', function () {
+
+      it('Current Step is {0}, so isStep{1} is TRUE'.format(test.i, test.i), function () {
         expect(w.get('isStep' + test.i)).to.equal(true);
       });
+
       test.n.forEach(function (indx) {
-        it('Current Step is ' + test.i + ', so isStep' + indx + ' is FALSE', function () {
+        it('Current Step is {0}, so isStep{1} is FALSE'.format(test.i, indx), function () {
           expect(w.get('isStep' + indx)).to.equal(false);
         });
       });
@@ -79,14 +81,11 @@ describe('App.WizardController', function () {
 
   describe('#gotoStep', function() {
     var w = App.WizardController1.create();
-    var steps = [];
-    for(var j = 0; j < totalSteps; j++) {
-      steps.push(Em.Object.create({step:j,value:false}));
-    }
+    var steps = getSteps(0, totalSteps - 1);
     steps.forEach(function(step, index) {
       step.set('value', true);
       w.set('isStepDisabled', steps);
-      it('step ' + index + ' is disabled, so gotoStep('+index+') is not possible', function() {
+      it('step {0} is disabled, so gotoStep({1}) is not possible'.format(index, index), function() {
         expect(w.gotoStep(index)).to.equal(false);
       });
     });
@@ -284,8 +283,7 @@ describe('App.WizardController', function () {
     });
 
     describe('#finishLoading', function () {
-      var callback = sinon.spy(),
-        stepController = App.get('router.wizardStep3Controller'),
+      var stepController = App.get('router.wizardStep3Controller'),
         cases = [
           {
             requestId: null,
@@ -691,11 +689,6 @@ describe('App.WizardController', function () {
       App.ajax.send.restore();
     });
     it('should call callbeck with data', function () {
-      var jsonData = {
-        Requests: {
-          id: 1
-        }
-      };
       wizardController.set('content', Em.Object.create({
         cluster: {
           oldRequestsId: '1'
@@ -846,7 +839,7 @@ describe('App.WizardController', function () {
       sinon.stub(App.MainAdminServiceAccountsController,'create').returns({
         loadUsers: function() {},
         get: function(type) {
-          if (type == 'dataIsLoaded') {
+          if (type === 'dataIsLoaded') {
             return true;
           }
           return Em.Object.create({
@@ -1502,9 +1495,7 @@ describe('App.WizardController', function () {
       });
       sinon.stub(App.themesMapper, 'generateAdvancedTabs').returns(true);
       sinon.stub(App.config, 'loadConfigsFromStack').returns({
-        done: function(callback) {
-          callback();
-        }
+        done: Em.clb
       });
       sinon.stub(App.StackService, 'find').returns(Em.A([
         Em.Object.create({
@@ -1521,16 +1512,16 @@ describe('App.WizardController', function () {
       App.themesMapper.generateAdvancedTabs.restore();
       wizardController.loadConfigThemeForServices.restore();
     });
-    it('Should load config themes', function() { 
+    it('Should load config themes', function(done) {
       this.stub.returns(true);
-      wizardController.loadConfigThemes().then(function(data) {
-        expect().to.be.undefined;
+      wizardController.loadConfigThemes().then(function() {
+        done();
       });
     });
-    it('Should load config themes (2)', function() {
+    it('Should load config themes (2)', function(done) {
       this.stub.returns(false);
-      wizardController.loadConfigThemes().then(function(data) {
-        expect().to.be.undefined;
+      wizardController.loadConfigThemes().then(function() {
+        done();
       });
     });
   });

+ 4 - 5
ambari-web/test/data/HDP2.2/site_properties_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var App = require('app');
 require('utils/helper');
 require('data/HDP2/gluster_fs_properties');
 var siteProperties = require('data/HDP2.2/site_properties').configProperties;
@@ -26,7 +25,7 @@ describe('hdp2SiteProperties', function () {
    * @stackProperties: All the properties that are derived from stack definition
    */
   var stackProperties = siteProperties.filter(function(item){
-    return  !(item.isRequiredByAgent === false || item.category === 'Ambari Principals')
+    return !(item.isRequiredByAgent === false || item.category === 'Ambari Principals')
   });
 
   stackProperties.forEach(function(siteProperty){
@@ -43,7 +42,7 @@ describe('hdp2SiteProperties', function () {
      * showLabel
      * unit
      */
-    describe('Check attributes of "' + siteProperty.filename + '/' + siteProperty.name  + '"' + '. Stack driven attributes should be undefined ', function () {
+    describe('Check attributes of "{0}/{1}". Stack driven attributes should be undefined '.format(siteProperty.filename, siteProperty.name), function () {
       ['isVisible', 'value', 'recommendedValue', 'description', 'isReconfigurable', 'isRequired', 'displayName', 'showLabel', 'unit'].forEach(function (p) {
         it(p, function () {
           expect(siteProperty[p]).to.not.exist;
@@ -55,7 +54,7 @@ describe('hdp2SiteProperties', function () {
      * displayTypes <code>supportTextConnection<code> and <code>radio button<code>
      * can be used as exception. Other displayTypes values should be used in stack definition
      */
-    it('Check attributes of "' + siteProperty.filename + '/' + siteProperty.name  + '"' + '. Display type value ' + siteProperty.displayType + ' should be described in stack ', function () {
+    it('Check attributes of "{0}/{1}". Display type value {2} should be described in stack '.format(siteProperty.filename, siteProperty.name, siteProperty.displayType), function () {
       expect(siteProperty.displayType).to.match(/undefined|supportTextConnection|radio button/);
     });
 
@@ -64,7 +63,7 @@ describe('hdp2SiteProperties', function () {
      * name
      * filename
      */
-    describe('Check primary attributes of "' + siteProperty.filename + '/' + siteProperty.name  + '"' + '. Attributes that uniquely represent a property should be defined ', function () {
+    describe('Check primary attributes of "{0}/{1}". Attributes that uniquely represent a property should be defined '.format(siteProperty.filename, siteProperty.name), function () {
       it('name', function () {
         expect(siteProperty.name).to.not.equal(undefined);
       });

+ 4 - 5
ambari-web/test/data/HDP2.3/site_properties_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var App = require('app');
 require('utils/helper');
 require('data/HDP2/gluster_fs_properties');
 var siteProperties = require('data/HDP2.3/site_properties').configProperties;
@@ -26,7 +25,7 @@ describe('hdp2SiteProperties', function () {
    * @stackProperties: All the properties that are derived from stack definition
    */
   var stackProperties = siteProperties.filter(function(item){
-    return  !(item.isRequiredByAgent === false || item.category === 'Ambari Principals')
+    return !(item.isRequiredByAgent === false || item.category === 'Ambari Principals')
   });
 
   stackProperties.forEach(function(siteProperty){
@@ -43,7 +42,7 @@ describe('hdp2SiteProperties', function () {
      * showLabel
      * unit
      */
-    describe('Check attributes of "' + siteProperty.filename + '/' + siteProperty.name  + '"' + '. Stack driven attributes should be undefined ', function () {
+    describe('Check attributes of "{0}/{1}". Stack driven attributes should be undefined '.format(siteProperty.filename, siteProperty.name), function () {
       ['isVisible', 'value', 'recommendedValue', 'description', 'isReconfigurable', 'isRequired', 'displayName', 'showLabel', 'unit'].forEach(function (p) {
         it(p, function () {
           expect(siteProperty[p]).to.not.exist;
@@ -56,7 +55,7 @@ describe('hdp2SiteProperties', function () {
      * displayTypes <code>supportTextConnection<code> and <code>radio button<code>
      * can be used as exception. Other displayTypes values should be used in stack definition
      */
-    it('Check attributes of "' + siteProperty.filename + '/' + siteProperty.name  + '"' + '. Display type value ' + siteProperty.displayType + ' should be described in stack ', function () {
+    it('Check attributes of "{0}/{1}". Display type value {2} should be described in stack '.format(siteProperty.filename, siteProperty.name, siteProperty.displayType), function () {
       expect(siteProperty.displayType).to.match(/undefined|supportTextConnection|radio button/);
     });
 
@@ -65,7 +64,7 @@ describe('hdp2SiteProperties', function () {
      * name
      * filename
      */
-    describe('Check primary attributes of "' + siteProperty.filename + '/' + siteProperty.name  + '"' + '. Attributes that uniquely represent a property should be defined ', function () {
+    describe('Check primary attributes of "{0}/{1}". Attributes that uniquely represent a property should be defined '.format(siteProperty.filename, siteProperty.name), function () {
       it('name', function () {
         expect(siteProperty.name).to.not.equal(undefined);
       });

+ 2 - 3
ambari-web/test/data/HDP2/secure_mapping_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var App = require('app');
 require('utils/helper');
 var mappedHdp2Properties = require('data/HDP2/secure_mapping');
 
@@ -24,12 +23,12 @@ describe('hdp2SiteMapping', function () {
 
   // All mapped properties should have value of string type
   mappedHdp2Properties.forEach(function(mappedProperty){
-    it('Value of "' + mappedProperty.name  + '"' + ' should be string', function () {
+    it('Value of "{0}" should be string'.format(mappedProperty.name), function () {
       expect(mappedProperty.value).to.be.a('string');
     });
   });
   mappedHdp2Properties.forEach(function(mappedProperty){
-    it('Value of "' + mappedProperty.name  + '"' + ' should have serviceName and filename attribute', function () {
+    it('Value of "{0}" should have serviceName and filename attribute'.format(mappedProperty.name), function () {
       expect(mappedProperty).to.have.property('serviceName');
       expect(mappedProperty).to.have.property('filename');
     });

+ 4 - 5
ambari-web/test/data/HDP2/site_properties_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var App = require('app');
 require('utils/helper');
 require('data/HDP2/gluster_fs_properties');
 var siteProperties = require('data/HDP2/site_properties').configProperties;
@@ -26,7 +25,7 @@ describe('hdp2SiteProperties', function () {
    * @stackProperties: All the properties that are derived from stack definition
    */
   var stackProperties = siteProperties.filter(function(item){
-    return  !(item.isRequiredByAgent === false || item.category === 'Ambari Principals')
+    return !(item.isRequiredByAgent === false || item.category === 'Ambari Principals')
   });
 
   stackProperties.forEach(function(siteProperty){
@@ -43,7 +42,7 @@ describe('hdp2SiteProperties', function () {
      * showLabel
      * unit
      */
-    describe('Check attributes of "' + siteProperty.filename + '/' + siteProperty.name  + '"' + '. Stack driven attributes should be undefined ', function () {
+    describe('Check attributes of "{0}/{1}". Stack driven attributes should be undefined '.format(siteProperty.filename, siteProperty.name), function () {
       ['isVisible', 'value', 'recommendedValue', 'description', 'isReconfigurable', 'isRequired', 'displayName', 'showLabel', 'unit'].forEach(function (p) {
         it(p, function () {
           expect(siteProperty[p]).to.not.exist;
@@ -55,7 +54,7 @@ describe('hdp2SiteProperties', function () {
      * displayTypes <code>supportTextConnection<code> and <code>radio button<code>
      * can be used as exception. Other displayTypes values should be used in stack definition
      */
-    it('Check attributes of "' + siteProperty.filename + '/' + siteProperty.name  + '"' + '. Display type value ' + siteProperty.displayType + ' should be described in stack ', function () {
+    it('Check attributes of "{0}/{1}". Display type value {2} should be described in stack '.format(siteProperty.filename, siteProperty.name, siteProperty.displayType), function () {
       expect(siteProperty.displayType).to.match(/undefined|supportTextConnection|radio button/);
     });
 
@@ -64,7 +63,7 @@ describe('hdp2SiteProperties', function () {
      * name
      * filename
      */
-    describe('Check primary attributes of "' + siteProperty.filename + '/' + siteProperty.name  + '"' + '. Attributes that uniquely represent a property should be defined ', function () {
+    describe('Check primary attributes of "{0}/{1}". Attributes that uniquely represent a property should be defined '.format(siteProperty.filename, siteProperty.name), function () {
       it('name', function () {
         expect(siteProperty.name).to.not.equal(undefined);
       });

+ 2 - 3
ambari-web/test/init_computed_aliases.js

@@ -40,10 +40,9 @@ App.TestAliases = {
     /**
      * Stub <code>get</code> for <code>App</code> or <code>self</code>
      *
-     * @param {Ember.Object} self
      * @returns {App.TestAliases}
      */
-    smartStubGet: function (self) {
+    smartStubGet: function () {
       var args = [].slice.call(arguments);
       if (args.length === 3) {
         return this._stubOneKey.apply(this, args);
@@ -156,7 +155,7 @@ App.TestAliases = {
       for (var y = 0; y < allCombos; y++) {
         var combo = {};
         for (var x = 0; x < n; x++) {
-          combo[dependentKeys[x]] = !!((y >> x) & 1);
+          combo[dependentKeys[x]] = !!(y >> x & 1);
         }
         result.push(combo);
       }

+ 3 - 3
ambari-web/test/init_test.js

@@ -29,10 +29,10 @@ if (!Function.prototype.bind) {
       throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');
     }
 
-    var aArgs   = Array.prototype.slice.call(arguments, 1),
+    var aArgs = Array.prototype.slice.call(arguments, 1),
       fToBind = this,
-      fNOP    = function() {},
-      fBound  = function() {
+      fNOP = function() {},
+      fBound = function() {
         return fToBind.apply(this instanceof fNOP
             ? this
             : oThis,

+ 1 - 22
ambari-web/test/login_test.js

@@ -16,29 +16,8 @@
  * limitations under the License.
  */
 
-var App = require('app');
-
 require('controllers/login_controller');
 
 describe('App.LoginController', function () {
-
-  var loginController = App.LoginController.create();
-
-  describe('#validateCredentials()', function () {
-    /*
-    it('should return undefined if no username is present', function () {
-      loginController.set('loginName', '');
-      expect(loginController.validateCredentials()).to.equal(undefined);
-    })
-    it('should return undefined if no password is present', function () {
-      loginController.set('password', '');
-      expect(loginController.validateCredentials()).to.equal(undefined);
-    })
-    it('should return the user object with the specified username and password (dummy until actual integration)', function () {
-      loginController.set('loginName', 'admin');
-      loginController.set('password', 'admin');
-      expect(loginController.validateCredentials().get('loginName'), 'admin');
-    })
-    */
-  })
+  describe('#validateCredentials()', function () {});
 });

+ 3 - 3
ambari-web/test/mappers/alert_definitions_mapper_test.js

@@ -201,7 +201,7 @@ describe('App.alertDefinitionsMapper', function () {
       });
 
       sinon.stub(App.router, 'get', function() {return false;});
-      App.cache['previousAlertGroupsMap'] = {};
+      App.cache.previousAlertGroupsMap = {};
 
       sinon.stub(App.alertDefinitionsMapper, 'setMetricsSourcePropertyLists', Em.K);
       sinon.stub(App.alertDefinitionsMapper, 'setAlertDefinitionsRawSourceData', Em.K);
@@ -224,7 +224,7 @@ describe('App.alertDefinitionsMapper', function () {
       App.alertDefinitionsMapper.deleteRecord.restore();
 
       App.router.get.restore();
-      App.cache['previousAlertGroupsMap'] = {};
+      App.cache.previousAlertGroupsMap = {};
 
       App.alertDefinitionsMapper.setMetricsSourcePropertyLists.restore();
       App.alertDefinitionsMapper.setAlertDefinitionsRawSourceData.restore();
@@ -403,7 +403,7 @@ describe('App.alertDefinitionsMapper', function () {
 
     it('should set groups from App.cache.previousAlertGroupsMap', function () {
 
-      App.cache['previousAlertGroupsMap'] = {
+      App.cache.previousAlertGroupsMap = {
         1: [5,1],
         2: [4,3],
         3: [3,2],

+ 5 - 6
ambari-web/test/mappers/alert_groups_mapper_test.js

@@ -93,7 +93,7 @@ describe('App.alertGroupsMapper', function () {
       });
 
       App.alertGroupsMapper.set('model', {});
-      App.cache['previousAlertGroupsMap'] = {};
+      App.cache.previousAlertGroupsMap = {};
 
     });
 
@@ -102,10 +102,11 @@ describe('App.alertGroupsMapper', function () {
       App.store.commit.restore();
       App.store.loadMany.restore();
       App.alertGroupsMapper.set('model', App.AlertGroup);
-      App.cache['previousAlertGroupsMap'] = {};
+      App.cache.previousAlertGroupsMap = {};
 
     });
 
+    /*eslint-disable mocha-cleanup/asserts-limit */
     it('should parse alert groups', function() {
 
       var expected = [
@@ -126,12 +127,10 @@ describe('App.alertGroupsMapper', function () {
       ];
 
       App.alertGroupsMapper.map(json);
-
       var mapped = App.alertGroupsMapper.get('model.content');
-
       testHelpers.nestedExpect(expected, mapped);
-
     });
+    /*eslint-enable mocha-cleanup/asserts-limit */
 
     it('should set App.cache.previousAlertGroupsMap', function () {
 
@@ -149,7 +148,7 @@ describe('App.alertGroupsMapper', function () {
 
       App.alertGroupsMapper.map(json);
 
-      expect(App.cache['previousAlertGroupsMap']).to.eql(expected);
+      expect(App.cache.previousAlertGroupsMap).to.eql(expected);
 
     });
 

+ 1 - 7
ambari-web/test/mappers/alert_instances_mapper_test.js

@@ -21,13 +21,7 @@ require('mappers/alert_instances_mapper');
 
 describe('App.alertInstanceMapper', function () {
 
-  var alertInstances = [
-      {id: 1},
-      {id: 2},
-      {id: 3},
-      {id: 4}
-    ],
-    json = {
+  var json = {
       "items": [
         {
           "Alert": {

+ 0 - 1
ambari-web/test/mappers/hosts_mapper_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var Ember = require('ember');
 var App = require('app');
 
 require('models/host');

+ 3 - 4
ambari-web/test/mappers/server_data_mapper_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var Ember = require('ember');
 var App = require('app');
 var mapper;
 
@@ -24,7 +23,7 @@ require('mappers/server_data_mapper');
 
 describe('App.QuickDataMapper', function () {
 
-  var test_json = {
+  var testJson = {
     a1: {
       b1: {
         c1: 'val1'
@@ -62,7 +61,7 @@ describe('App.QuickDataMapper', function () {
     ];
     tests.forEach(function(test) {
       it(test.i, function() {
-        expect(mapper.getJsonProperty(test_json, test.i)).to.equal(test.e);
+        expect(mapper.getJsonProperty(testJson, test.i)).to.equal(test.e);
       });
     });
   });
@@ -82,7 +81,7 @@ describe('App.QuickDataMapper', function () {
     var result;
 
     beforeEach(function () {
-      result = mapper.parseIt(test_json, config);
+      result = mapper.parseIt(testJson, config);
     });
 
     it('Property starts with $', function() {

+ 0 - 1
ambari-web/test/mappers/service_mapper_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var Ember = require('ember');
 var App = require('app');
 
 require('utils/helper');

+ 2 - 3
ambari-web/test/mappers/stack_mapper_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var Ember = require('ember');
 var App = require('app');
 require('mappers/server_data_mapper');
 require('mappers/stack_mapper');
@@ -27,7 +26,7 @@ require('models/repository');
 describe('App.stackMapper', function () {
 	describe("#map", function() {
     
-    var test_data = {
+    var testData = {
         items: [{
           "Versions" : {
             "active" : true,
@@ -261,7 +260,7 @@ describe('App.stackMapper', function () {
       App.resetDsStoreTypeMap(App.OperatingSystem);
       App.resetDsStoreTypeMap(App.Stack);
       sinon.stub(App.store, 'commit', Em.K);
-      App.stackMapper.map(test_data);
+      App.stackMapper.map(testData);
     });
     afterEach(function(){
       App.store.commit.restore();

+ 1 - 9
ambari-web/test/mappers/status_mapper_test.js

@@ -16,12 +16,4 @@
  * limitations under the License.
  */
 
-var Ember = require('ember');
-var App = require('app');
-
-require('mappers/server_data_mapper');
-
-describe('App.statusMapper', function () {
-
-
-});
+describe('App.statusMapper', function () {});

+ 0 - 1
ambari-web/test/mappers/users_mapper_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var Ember = require('ember');
 var App = require('app');
 
 require('mappers/server_data_mapper');

+ 2 - 2
ambari-web/test/mixins/common/configs/config_recommendations_test.js

@@ -19,7 +19,7 @@
 var App = require('app');
 
 describe('App.ConfigRecommendations', function() {
-	var mixinObject =  Em.Controller.extend(App.ConfigRecommendations, {});
+	var mixinObject = Em.Controller.extend(App.ConfigRecommendations, {});
 	var instanceObject = mixinObject.create({});
 
 	beforeEach(function() {
@@ -307,7 +307,7 @@ describe('App.ConfigRecommendations', function() {
 			expect(instanceObject.getRecommendation('p1', 'f1')).to.eql(recommendations[0]);
 		});
 
-		it('get recommendation for default group', function () {
+		it('get recommendation for default group (2)', function () {
 			expect(instanceObject.getRecommendation('p1', 'f1', 'group1')).to.eql(recommendations[2]);
 		});
 

+ 1 - 1
ambari-web/test/mixins/common/configs/configs_saver_test.js

@@ -19,7 +19,7 @@
 var App = require('app');
 
 describe('App.ConfigsSaverMixin', function() {
-  var mixinObject =  Em.Controller.extend(App.ConfigsSaverMixin, {});
+  var mixinObject = Em.Controller.extend(App.ConfigsSaverMixin, {});
   var instanceObject = mixinObject.create({});
 
   describe('#allowSaveSite()', function() {

+ 1 - 2
ambari-web/test/mixins/common/configs/toggle_isrequired_test.js

@@ -19,8 +19,7 @@
 var App = require('app');
 
 describe('#_overrideConfigIsRequired', function () {
-  var controller,
-    instanceObject,
+  var instanceObject,
     configs,
     serviceConfig;
 

+ 13 - 12
ambari-web/test/mixins/common/kdc_credentials_controller_mixin_test.js

@@ -71,6 +71,19 @@ describe('App.KDCCredentialsControllerMixin', function() {
 
   describe('#createKDCCredentials', function() {
 
+    function createConfig (name, value) {
+      return App.ServiceConfigProperty.create({
+        name: name,
+        value: value
+      });
+    }
+    function resolveWith (data) {
+      return $.Deferred().resolve(data).promise();
+    }
+    function rejectWith (data) {
+      return $.Deferred().reject(data).promise();
+    }
+
     beforeEach(function () {
       sinon.stub(App, 'get').withArgs('clusterName').returns('testName');
       sinon.stub(credentialsUtils, 'createCredentials', function() {
@@ -90,18 +103,6 @@ describe('App.KDCCredentialsControllerMixin', function() {
       credentialsUtils.updateCredentials.restore();
     });
 
-    var createConfig = function(name, value) {
-      return App.ServiceConfigProperty.create({
-        name: name,
-        value: value
-      });
-    };
-    var resolveWith = function(data) {
-      return $.Deferred().resolve(data).promise();
-    };
-    var rejectWith = function(data) {
-      return $.Deferred().reject(data).promise();
-    };
     [
       {
         configs: [

+ 3 - 3
ambari-web/test/mixins/common/serverValidator_test.js

@@ -33,14 +33,14 @@ describe('App.ServerValidatorMixin', function() {
     };
     var genResponse = function(items) {
       return {
-        items: (items.map(function(item) { return genRespItem.apply(undefined, item); }))
+        items: items.map(function(item) { return genRespItem.apply(undefined, item); })
       };
     };
     var genConfigs = function(configs) {
       return Em.Object.create({
-        configs: (configs.map(function(item) {
+        configs: configs.map(function(item) {
             return Em.Object.create({ name: item[0], filename: item[1] });
-          }))
+          })
       });
     };
     var tests = [

+ 23 - 23
ambari-web/test/mixins/common/widget_mixin_test.js

@@ -118,7 +118,7 @@ describe('App.WidgetMixin', function () {
     });
 
     it('HBASE_HBASE_REGIONSERVER', function () {
-      var HBASE_HBASE_REGIONSERVER = {
+      var hbaseRegionServer = {
         "name": "regionserver.Server.percentFilesLocal",
         "service_name": "HBASE",
         "component_name": "HBASE_REGIONSERVER",
@@ -137,11 +137,11 @@ describe('App.WidgetMixin', function () {
             }
           ]
         };
-      expect(JSON.stringify(this.requestData['HBASE_HBASE_REGIONSERVER'])).to.equal(JSON.stringify(HBASE_HBASE_REGIONSERVER));
+      expect(JSON.stringify(this.requestData.HBASE_HBASE_REGIONSERVER)).to.equal(JSON.stringify(hbaseRegionServer));
     });
 
     it('HBASE_HBASE_REGIONSERVER_c1', function () {
-      var HBASE_HBASE_REGIONSERVER_c1 = {
+      var hbaseRegionServerC1 = {
         "name": "regionserver.Server.percentFilesLocal",
         "service_name": "HBASE",
         "component_name": "HBASE_REGIONSERVER",
@@ -155,11 +155,11 @@ describe('App.WidgetMixin', function () {
           }
         ]
       };
-      expect(JSON.stringify(this.requestData['HBASE_HBASE_REGIONSERVER_c1'])).to.equal(JSON.stringify(HBASE_HBASE_REGIONSERVER_c1));
+      expect(JSON.stringify(this.requestData.HBASE_HBASE_REGIONSERVER_c1)).to.equal(JSON.stringify(hbaseRegionServerC1));
     });
 
     it('HDFS_DATANODE_c1', function () {
-      var HDFS_DATANODE_c1 = {
+      var hdfsDataNodeC1 = {
         "name": "regionserver.Server.percentFilesLocal",
         "service_name": "HDFS",
         "component_name": "DATANODE",
@@ -173,7 +173,7 @@ describe('App.WidgetMixin', function () {
           }
         ]
       };
-      expect(JSON.stringify(this.requestData['HDFS_DATANODE_c1'])).to.equal(JSON.stringify(HDFS_DATANODE_c1));
+      expect(JSON.stringify(this.requestData.HDFS_DATANODE_c1)).to.equal(JSON.stringify(hdfsDataNodeC1));
     });
 
   });
@@ -484,29 +484,29 @@ describe('App.WidgetLoadAggregator', function () {
       result = aggregator.groupRequests(requests);
     });
 
-    it("result['n1_C1'].subRequests.length", function () {
-      expect(result['n1_C1'].subRequests.length).to.equal(1);
+    it("result.n1_C1.subRequests.length", function () {
+      expect(result.n1_C1.subRequests.length).to.equal(1);
     });
-    it("result['n1_C1'].data.metric_paths.length", function () {
-      expect(result['n1_C1'].data.metric_paths.length).to.equal(1);
+    it("result.n1_C1.data.metric_paths.length", function () {
+      expect(result.n1_C1.data.metric_paths.length).to.equal(1);
     });
-    it("result['n1_C1_graph'].subRequests.length", function () {
-      expect(result['n1_C1_graph'].subRequests.length).to.equal(1);
+    it("result.n1_C1_graph.subRequests.length", function () {
+      expect(result.n1_C1_graph.subRequests.length).to.equal(1);
     });
-    it("result['n1_C1_graph'].data.metric_paths.length", function () {
-      expect(result['n1_C1_graph'].data.metric_paths.length).to.equal(1);
+    it("result.n1_C1_graph.data.metric_paths.length", function () {
+      expect(result.n1_C1_graph.data.metric_paths.length).to.equal(1);
     });
-    it("result['n2_C1'].subRequests.length", function () {
-      expect(result['n2_C1'].subRequests.length).to.equal(1);
+    it("result.n2_C1.subRequests.length", function () {
+      expect(result.n2_C1.subRequests.length).to.equal(1);
     });
-    it("result['n2_C1'].data.metric_paths.length", function () {
-      expect(result['n2_C1'].data.metric_paths.length).to.equal(1);
+    it("result.n2_C1.data.metric_paths.length", function () {
+      expect(result.n2_C1.data.metric_paths.length).to.equal(1);
     });
-    it("result['n1_C2'].subRequests.length", function () {
-      expect(result['n1_C2'].subRequests.length).to.equal(1);
+    it("result.n1_C2.subRequests.length", function () {
+      expect(result.n1_C2.subRequests.length).to.equal(1);
     });
-    it("result['n1_C2'].data.metric_paths.length", function () {
-      expect(result['n1_C2'].data.metric_paths.length).to.equal(1);
+    it("result.n1_C2.data.metric_paths.length", function () {
+      expect(result.n1_C2.data.metric_paths.length).to.equal(1);
     });
   });
 
@@ -541,7 +541,7 @@ describe('App.WidgetLoadAggregator', function () {
         }
       };
       aggregator.runRequests(requests);
-      expect(mock.f1.calledWith(requests['r1'].data)).to.be.true;
+      expect(mock.f1.calledWith(requests.r1.data)).to.be.true;
     });
     it("view destroyed", function () {
       var requests = {

+ 0 - 24
ambari-web/test/mixins/main/host/details/host_components/decommissionable_test.js

@@ -22,30 +22,6 @@ require('mixins/main/host/details/host_components/decommissionable');
 
 var decommissionable,
   view,
-  statusCases = [
-    {
-      status: App.HostComponentStatus.started,
-      expected: false
-    },
-    {
-      status: 'status',
-      expected: true
-    }
-  ],
-  responseCases = [
-    {
-      HostRoles: {
-        desired_admin_state: 'state'
-      },
-      ServiceComponentInfo: {component_state: ''}
-    },
-    {
-      HostRoles: {
-        desired_admin_state: null
-      },
-      ServiceComponentInfo: {component_state: ''}
-    }
-  ],
   textCases = [
     {
       available: true,

+ 1 - 11
ambari-web/test/mixins/main/service/configs/widget_popover_support_test.js

@@ -16,14 +16,4 @@
  * limitations under the License.
  */
 
-var App = require('app');
-var view;
-
-describe('App.WidgetPopoverSupport', function () {
-
-  beforeEach(function () {
-    view = Em.View.create(App.WidgetPopoverSupport, {});
-  });
-
-
-});
+describe('App.WidgetPopoverSupport', function () {});

+ 1 - 3
ambari-web/test/mixins/wizard/wizardEnableDone_test.js

@@ -20,9 +20,7 @@ var App = require('app');
 
 describe('App.WizardEnableDone', function () {
   var baseObject = Em.Object.extend({
-        statusChangeCallback: function (data) {
-          isSubmitDisabled: true
-        }
+        statusChangeCallback: function () {}
       }),
       mixedObject = baseObject.extend(App.WizardEnableDone),
       mixedObjectInstance;

+ 3 - 3
ambari-web/test/mixins/wizard/wizardProgressPageController_test.js

@@ -37,7 +37,7 @@ describe('App.wizardProgressPageControllerMixin', function() {
       });
       sinon.spy(mixedObjectInstance, 'onCreateComponent');
       sinon.spy(mixedObjectInstance, 'updateComponent');
-      sinon.stub(mixedObjectInstance, 'checkInstalledComponents', function(componentName, hostNames) {
+      sinon.stub(mixedObjectInstance, 'checkInstalledComponents', function(componentName) {
         var def = $.Deferred();
         var data = {
           'ZOOKEEPER_SERVER': {
@@ -106,7 +106,7 @@ describe('App.wizardProgressPageControllerMixin', function() {
       });
       it('updateComponent is called', function () {
         // invoke callback
-        this.args.sender[this.args.success].apply(this.args.sender, [null, null, this.args.data]);
+        this.args.sender[this.args.success](null, null, this.args.data);
         expect(mixedObjectInstance.updateComponent.called).to.be.true;
       });
     });
@@ -131,7 +131,7 @@ describe('App.wizardProgressPageControllerMixin', function() {
       });
       it('updateComponent is called', function () {
         // invoke callback
-        this.args.sender[this.args.success].apply(this.args.sender, [null, null, this.args.data]);
+        this.args.sender[this.args.success](null, null, this.args.data);
         expect(mixedObjectInstance.updateComponent.called).to.be.true;
       });
     });

+ 3 - 3
ambari-web/test/mock_data_setup/configs_mock_data.js

@@ -107,15 +107,15 @@ module.exports = {
         });
       });
     } else {
-      for (var serviceName in configTags) {
-        configTags[serviceName].forEach(function(tag) {
+      Object.keys(configTags).forEach(function (sName) {
+        configTags[sName].forEach(function(tag) {
           configTagsObject.push({
             siteName: tag,
             tagName: "version1",
             newTagName: null
           });
         });
-      }
+      });
     }
     return configTagsObject.uniq();
   },

+ 2 - 2
ambari-web/test/models/authentication_test.js

@@ -53,12 +53,12 @@ describe('App.AuthenticationForm', function () {
   methods.forEach(function (method) {
     method.fields.forEach(function (field) {
       describe('#' + field + '.isRequired', function () {
-        for (var i = 2; i--; ) {
+        [2, 1, 0].forEach(function (i) {
           it('should be ' + i + ' dependent on ' + method.name + ' value', function () {
             form.getField(method.name).set('value', i);
             expect(form.getField(field).get('isRequired')).to.equal(i);
           });
-        }
+        });
       });
     });
   });

+ 2 - 51
ambari-web/test/models/configs/objects/service_config_property_test.js

@@ -54,56 +54,6 @@ var serviceConfigProperty,
     })
   ],
 
-  components = [
-    {
-      name: 'NameNode',
-      master: true
-    },
-    {
-      name: 'SNameNode',
-      master: true
-    },
-    {
-      name: 'JobTracker',
-      master: true
-    },
-    {
-      name: 'HBase Master',
-      master: true
-    },
-    {
-      name: 'Oozie Master',
-      master: true
-    },
-    {
-      name: 'Hive Metastore',
-      master: true
-    },
-    {
-      name: 'WebHCat Server',
-      master: true
-    },
-    {
-      name: 'ZooKeeper Server',
-      master: true
-    },
-    {
-      name: 'Ganglia',
-      master: true
-    },
-    {
-      name: 'DataNode',
-      slave: true
-    },
-    {
-      name: 'TaskTracker',
-      slave: true
-    },
-    {
-      name: 'RegionServer',
-      slave: true
-    }
-  ],
   overridableFalseData = [
     {
       isOverridable: false
@@ -120,7 +70,8 @@ var serviceConfigProperty,
     {
       isOverridable: true,
       isEditable: true
-    },    {
+    },
+    {
       isOverridable: true,
       overrides: []
     },

+ 0 - 1
ambari-web/test/models/configs/objects/service_config_test.js

@@ -21,7 +21,6 @@ var App = require('app');
 require('models/configs/objects/service_config');
 
 var serviceConfig,
-  group, 
   configs = [
       Em.Object.create({
         'name': 'p1',

+ 0 - 5
ambari-web/test/models/configs/theme/tab_test.js

@@ -17,7 +17,6 @@
  */
 
 var App = require('app');
-var model;
 
 function getModel() {
   return App.Tab.createRecord();
@@ -25,10 +24,6 @@ function getModel() {
 
 describe('App.Tab', function () {
 
-  beforeEach(function () {
-    model = getModel();
-  });
-
   App.TestAliases.testAsComputedSumBy(getModel(), 'errorsCount', 'sections', 'errorsCount');
 
   App.TestAliases.testAsComputedIfThenElse(getModel(), 'tooltipMsg', 'isHiddenByFilter', Em.I18n.t('services.service.config.nothing.to.display') , '');

+ 2 - 0
ambari-web/test/models/form_test.js

@@ -194,6 +194,7 @@ describe('App.FormField', function () {
     });
   });
 
+  /*eslint-disable mocha-cleanup/asserts-limit */
   describe('#validate', function () {
     it('should return error message', function () {
       formField.set('isRequired', true);
@@ -206,6 +207,7 @@ describe('App.FormField', function () {
       expectError('');
     });
   });
+  /*eslint-enable mocha-cleanup/asserts-limit */
 
   describe('#isHiddenField', function () {
     hiddenCases.forEach(function (item) {

+ 2 - 2
ambari-web/test/models/host_component_test.js

@@ -225,10 +225,10 @@ describe('App.HostComponent', function() {
       }
     ];
 
-    it('reset statusClass to plain property', function () {
+    beforeEach(function () {
       hc.reopen({
         statusClass: ''
-      })
+      });
     });
     testCases.forEach(function (test) {
       it('statusClass - ' + test.statusClass, function () {

+ 2 - 1
ambari-web/test/models/host_test.js

@@ -463,11 +463,12 @@ describe('App.Host', function () {
       }
     ];
 
-    it('reset healthClass to plain property', function(){
+    beforeEach(function() {
       host1.reopen({
         healthClass: ''
       });
     });
+
     testCases.forEach(function (test) {
       it('healthClass - ' + test.params.healthClass, function () {
         host1.set('healthClass', test.params.healthClass);

+ 0 - 1
ambari-web/test/models/service/hdfs_test.js

@@ -18,7 +18,6 @@
 
 var App = require('app');
 
-var modelSetup = require('test/init_model_test');
 require('models/service/hdfs');
 
 describe('App.HDFSService', function () {

+ 1 - 55
ambari-web/test/models/service/yarn_test.js

@@ -25,29 +25,6 @@ var yarnService,
   yarnServiceData = {
     id: 'yarn'
   },
-  hostComponentsData = [
-    {
-      id: 'ats',
-      componentName: 'APP_TIMELINE_SERVER',
-      host: {
-        id: 'host'
-      }
-    },
-    {
-      id: 'nodemanager',
-      componentName: 'NODEMANAGER',
-      host: {
-        id: 'host'
-      }
-    },
-    {
-      id: 'yarnclient',
-      componentName: 'YARN_CLIENT',
-      host: {
-        id: 'host'
-      }
-    }
-  ],
   configs = [
     {
       properties: {
@@ -56,38 +33,7 @@ var yarnService,
       tag: 'version2',
       type: 'yarn-site'
     }
-  ],
-  nodeCountCases = [
-    {
-      assets: {
-        nodeManagersStarted: 0,
-        nodeManagersInstalled: 1,
-        nodeManagersTotal: 1,
-        nodeManagersCountActive: 0,
-        nodeManagersCountRebooted: 0,
-        nodeManagersCountUnhealthy: 0,
-        nodeManagersCountDecommissioned: 0
-      },
-      nodeManagersCountLost: 1
-    },
-    {
-      assets: {
-        nodeManagersStarted: 1,
-        nodeManagersInstalled: 1,
-        nodeManagersTotal: 1,
-        nodeManagersCountActive: 1,
-        nodeManagersCountRebooted: 1,
-        nodeManagersCountUnhealthy: 0,
-        nodeManagersCountDecommissioned: 0
-      },
-      nodeManagersCountLost: 0
-    }
-  ],
-  setHostComponents = function () {
-    yarnService.reopen({
-      hostComponents: hostComponentsData
-    });
-  };
+  ];
 
 describe('App.YARNService', function () {
 

+ 0 - 66
ambari-web/test/models/service_test.js

@@ -61,72 +61,6 @@ var service,
       property: 'isStarted'
     }
   ],
-  services = [
-    {
-      name: 'HDFS',
-      configurable: true
-    },
-    {
-      name: 'YARN',
-      configurable: true
-    },
-    {
-      name: 'MAPREDUCE2',
-      configurable: true
-    },
-    {
-      name:'TEZ',
-      clientOnly: true,
-      configurable: true
-    },
-    {
-      name: 'HBASE',
-      configurable: true
-    },
-    {
-      name: 'HIVE',
-      configurable: true
-    },
-    {
-      name: 'FLUME',
-      configurable: true
-    },
-    {
-      name: 'FALCON',
-      configurable: true
-    },
-    {
-      name: 'STORM',
-      configurable: true
-    },
-    {
-      name: 'OOZIE',
-      configurable: true
-    },
-    {
-      name: 'GANGLIA',
-      configurable: true
-    },
-    {
-      name: 'ZOOKEEPER',
-      configurable: true
-    },
-    {
-      name: 'PIG',
-      configurable: true,
-      clientOnly: true
-    },
-    {
-      name: 'SQOOP',
-      clientOnly: true
-    },
-    {
-      name: 'HUE',
-      configurable: true
-    }
-  ],
-  clientsOnly = services.filterProperty('clientOnly').mapProperty('name'),
-  configurable = services.filterProperty('configurable').mapProperty('name'),
   hostComponentsDataFalse = [
     [],
     [

+ 5 - 2
ambari-web/test/models/stack_version/repository_version_test.js

@@ -42,19 +42,22 @@ describe('App.RepositoryVersion', function () {
     before(function () {
       sinon.stub(App, 'get').returns(['host1']);
     });
+
+    beforeEach(function () {
+      model = getModel();
+    });
+
     after(function () {
       App.get.restore();
     });
 
     it("stackVersion is null", function() {
-      var model = getModel();
       model.set('stackVersion', null);
       model.propertyDidChange('notInstalledHosts');
       expect(model.get('notInstalledHosts')).to.eql(['host1']);
     });
 
     it("stackVersion has notInstalledHosts array", function() {
-      var model = getModel();
       model.set('stackVersion', Em.Object.create({
         notInstalledHosts: ['host2']
       }));

+ 0 - 1
ambari-web/test/router_test.js

@@ -450,7 +450,6 @@ describe('App.Router', function () {
   });
 
   describe("#getAuthenticated", function() {
-    var router;
     beforeEach(function () {
       router = App.Router.create();
       this.mockGetCurrentLocationUrl = sinon.stub(router, 'getCurrentLocationUrl');

+ 1 - 1
ambari-web/test/routes/views_test.js

@@ -23,7 +23,7 @@ describe('routes/views', function() {
   var route = routeClass.create().get('viewDetails').create();
 
   describe("#parseViewPath", function() {
-    var testCases = [
+    [
       {
         url: 'viewName',
         result: ''

+ 2 - 1
ambari-web/test/utils/batch_scheduled_requests_test.js

@@ -99,8 +99,9 @@ describe('batch_scheduled_requests', function() {
       sinon.spy(batchUtils, 'showRollingRestartPopup');
       sinon.spy(batchUtils, 'showWarningRollingRestartPopup');
       sinon.stub(App, 'get', function(k) {
-        if ('components.rollinRestartAllowed' === k)
+        if ('components.rollinRestartAllowed' === k) {
           return ['DATANODE', 'TASKTRACKER', 'NODEMANAGER', 'HBASE_REGIONSERVER', 'SUPERVISOR'];
+        }
         return Em.get(App, k);
       });
     });

+ 2 - 2
ambari-web/test/utils/blueprint_test.js

@@ -438,8 +438,8 @@ describe('utils/blueprint', function() {
   describe('#_generateHostMap', function() {
     it('generate map', function() {
       var map = blueprintUtils._generateHostMap({}, ['h1','h2', 'h1'],'c1');
-      expect(map['h1'][0]).to.eql('c1');
-      expect(map['h2'][0]).to.eql('c1');
+      expect(map.h1[0]).to.eql('c1');
+      expect(map.h2[0]).to.eql('c1');
     });
 
     it('skip generations as hosts is empty', function() {

+ 13 - 14
ambari-web/test/utils/config_test.js

@@ -22,7 +22,6 @@ require('utils/configs_collection');
 require('utils/config');
 require('models/service/hdfs');
 var setups = require('test/init_model_test');
-var modelSetup = setups.configs;
 
 function dummyCopy(val) {
   return JSON.parse(JSON.stringify(val));
@@ -59,7 +58,7 @@ describe('App.config', function () {
     describe('two configs into textarea', function () {
       var result;
       beforeEach(function () {
-        result = App.config.fileConfigsIntoTextarea.call(App.config, configs, filename);
+        result = App.config.fileConfigsIntoTextarea(configs, filename);
       });
       it('One config is returned', function () {
         expect(result.length).to.equal(1);
@@ -77,7 +76,7 @@ describe('App.config', function () {
       newConfigs.push(dummyCopy(c3));
       var result;
       beforeEach(function () {
-        result = App.config.fileConfigsIntoTextarea.call(App.config, newConfigs, filename);
+        result = App.config.fileConfigsIntoTextarea(newConfigs, filename);
       });
       it('One config is returned', function () {
         expect(result.length).to.equal(1);
@@ -97,7 +96,7 @@ describe('App.config', function () {
       var result;
 
       beforeEach(function () {
-        result = App.config.fileConfigsIntoTextarea.call(App.config, newConfigs, filename);
+        result = App.config.fileConfigsIntoTextarea(newConfigs, filename);
       });
 
       it('Two configs are returned', function () {
@@ -115,7 +114,7 @@ describe('App.config', function () {
     describe('none configs into empty textarea', function () {
       var result;
       beforeEach(function () {
-        result = App.config.fileConfigsIntoTextarea.call(App.config, [], 'capacity-scheduler.xml');
+        result = App.config.fileConfigsIntoTextarea([], 'capacity-scheduler.xml');
       });
       it('One config is returned', function () {
         expect(result.length).to.equal(1);
@@ -136,7 +135,7 @@ describe('App.config', function () {
       newConfigs.push(dummyCopy(c3));
       var result;
       beforeEach(function () {
-        result = App.config.fileConfigsIntoTextarea.call(App.config, newConfigs, 'capacity-scheduler.xml', [c3]);
+        result = App.config.fileConfigsIntoTextarea(newConfigs, 'capacity-scheduler.xml', [c3]);
       });
       it('Two configs are returned', function () {
         expect(result.length).to.equal(2);
@@ -194,7 +193,7 @@ describe('App.config', function () {
     describe('config1=value1 to one config', function () {
       var result;
       beforeEach(function () {
-        result = App.config.textareaIntoFileConfigs.call(App.config, testData[0].configs, filename);
+        result = App.config.textareaIntoFileConfigs(testData[0].configs, filename);
       });
       it('One config is returned', function () {
         expect(result.length).to.equal(1);
@@ -213,7 +212,7 @@ describe('App.config', function () {
     describe('config1=value1\\nconfig2=value2\\n to two configs', function () {
       var result;
       beforeEach(function () {
-        result = App.config.textareaIntoFileConfigs.call(App.config, testData[1].configs, filename);
+        result = App.config.textareaIntoFileConfigs(testData[1].configs, filename);
       });
       it('Two configs are returned', function (){
         expect(result.length).to.equal(2);
@@ -241,7 +240,7 @@ describe('App.config', function () {
     describe('config1=value1,value2\n to one config', function () {
       var result;
       beforeEach(function () {
-        result = App.config.textareaIntoFileConfigs.call(App.config, testData[2].configs, filename);
+        result = App.config.textareaIntoFileConfigs(testData[2].configs, filename);
       });
       it('One config is returned', function () {
         expect(result.length).to.equal(1);
@@ -260,7 +259,7 @@ describe('App.config', function () {
     describe('config1=value1 config2=value2 to two configs', function () {
       var result;
       beforeEach(function () {
-        result = App.config.textareaIntoFileConfigs.call(App.config, testData[3].configs, filename);
+        result = App.config.textareaIntoFileConfigs(testData[3].configs, filename);
       });
       it('One config is returned', function () {
         expect(result.length).to.equal(1);
@@ -676,9 +675,9 @@ describe('App.config', function () {
 
     it('creates override with save properties as original config', function() {
       var override = App.config.createOverride(configProperty, {}, group);
-      for (var key in template) {
+      Object.keys(template).forEach(function (key) {
         expect(override.get(key)).to.eql(template[key]);
-      }
+      });
     });
 
     describe('overrides some values that should be different for override', function() {
@@ -711,9 +710,9 @@ describe('App.config', function () {
       };
 
       var override = App.config.createOverride(configProperty, overridenTemplate, group);
-      for (var key in overridenTemplate) {
+      Object.keys(overridenTemplate).forEach(function (key) {
         expect(override.get(key)).to.eql(overridenTemplate[key]);
-      }
+      });
     });
 
     it('throws error due to undefined configGroup', function() {

+ 7 - 62
ambari-web/test/utils/configs/config_initializer_test.js

@@ -21,62 +21,7 @@ var App = require('app');
 require('models/configs/objects/service_config_property');
 require('utils/configs/config_initializer');
 
-var serviceConfig,
-  group,
-  serviceConfigProperty,
-
-  components = [
-    {
-      name: 'NameNode',
-      master: true
-    },
-    {
-      name: 'SNameNode',
-      master: true
-    },
-    {
-      name: 'JobTracker',
-      master: true
-    },
-    {
-      name: 'HBase Master',
-      master: true
-    },
-    {
-      name: 'Oozie Master',
-      master: true
-    },
-    {
-      name: 'Hive Metastore',
-      master: true
-    },
-    {
-      name: 'WebHCat Server',
-      master: true
-    },
-    {
-      name: 'ZooKeeper Server',
-      master: true
-    },
-    {
-      name: 'Ganglia',
-      master: true
-    },
-    {
-      name: 'DataNode',
-      slave: true
-    },
-    {
-      name: 'TaskTracker',
-      slave: true
-    },
-    {
-      name: 'RegionServer',
-      slave: true
-    }
-  ],
-  masters = components.filterProperty('master'),
-  slaves = components.filterProperty('slave');
+var serviceConfigProperty;
 
 describe('App.ConfigInitializer', function () {
 
@@ -357,7 +302,7 @@ describe('App.ConfigInitializer', function () {
         App.get.restore();
       });
 
-      cases['hive_database'].forEach(function (item) {
+      cases.hive_database.forEach(function (item) {
         var title = 'hive_database value should be set to {0}';
         describe(title.format(item.value), function () {
 
@@ -410,10 +355,10 @@ describe('App.ConfigInitializer', function () {
       });
     });
 
-    it(cases['hive_master_hosts'].title, function () {
+    it(cases.hive_master_hosts.title, function () {
       serviceConfigProperty.set('name', 'hive_master_hosts');
-      App.ConfigInitializer.initialValue(serviceConfigProperty, cases['hive_master_hosts'].localDB, []);
-      expect(serviceConfigProperty.get('value')).to.equal(cases['hive_master_hosts'].value);
+      App.ConfigInitializer.initialValue(serviceConfigProperty, cases.hive_master_hosts.localDB, []);
+      expect(serviceConfigProperty.get('value')).to.equal(cases.hive_master_hosts.value);
     });
 
     it(cases['hive.metastore.uris'].title, function () {
@@ -432,7 +377,7 @@ describe('App.ConfigInitializer', function () {
         recommendedValue: cases['templeton.hive.properties'].recommendedValue,
         value: cases['templeton.hive.properties'].recommendedValue
       });
-      App.ConfigInitializer.initialValue(serviceConfigProperty, cases['templeton.hive.properties'].localDB,  {'hive.metastore.uris': cases['templeton.hive.properties'].recommendedValue});
+      App.ConfigInitializer.initialValue(serviceConfigProperty, cases['templeton.hive.properties'].localDB, {'hive.metastore.uris': cases['templeton.hive.properties'].recommendedValue});
       expect(serviceConfigProperty.get('value')).to.equal(cases['templeton.hive.properties'].value);
       expect(serviceConfigProperty.get('recommendedValue')).to.equal(cases['templeton.hive.properties'].value);
     });
@@ -442,7 +387,7 @@ describe('App.ConfigInitializer', function () {
         name: 'yarn.resourcemanager.zk-address',
         recommendedValue: cases['yarn.resourcemanager.zk-address'].recommendedValue
       });
-      App.ConfigInitializer.initialValue(serviceConfigProperty, cases['yarn.resourcemanager.zk-address'].localDB,  cases['yarn.resourcemanager.zk-address'].dependencies);
+      App.ConfigInitializer.initialValue(serviceConfigProperty, cases['yarn.resourcemanager.zk-address'].localDB, cases['yarn.resourcemanager.zk-address'].dependencies);
       expect(serviceConfigProperty.get('value')).to.equal(cases['yarn.resourcemanager.zk-address'].value);
       expect(serviceConfigProperty.get('recommendedValue')).to.equal(cases['yarn.resourcemanager.zk-address'].value);
     });

+ 0 - 1
ambari-web/test/utils/configs/database_test.js

@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-var App = require('app');
 var dbUtils = require('utils/configs/database');
 
 describe('Database Utils', function() {

+ 5 - 5
ambari-web/test/utils/data_manipulation_test.js

@@ -16,9 +16,9 @@
  * limitations under the License.
  */
 
-var data_manipulation = require('utils/data_manipulation');
+var dataManipulation = require('utils/data_manipulation');
 
-describe('data_manipulation', function () {
+describe('dataManipulation', function () {
 
   describe('#rejectPropertyValues', function () {
 
@@ -31,7 +31,7 @@ describe('data_manipulation', function () {
         ],
         key = 'n',
         valuesToReject = ['v2', 'v3'];
-      var result = data_manipulation.rejectPropertyValues(collection, key, valuesToReject);
+      var result = dataManipulation.rejectPropertyValues(collection, key, valuesToReject);
       expect(result).to.eql([
         {n: 'v1'},
         {n: 'v4'}
@@ -51,7 +51,7 @@ describe('data_manipulation', function () {
         ],
         key = 'n',
         valuesToFilter = ['v2', 'v3'];
-      var result = data_manipulation.filterPropertyValues(collection, key, valuesToFilter);
+      var result = dataManipulation.filterPropertyValues(collection, key, valuesToFilter);
       expect(result).to.eql([
         {n: 'v2'},
         {n: 'v3'}
@@ -70,7 +70,7 @@ describe('data_manipulation', function () {
           {n: 'v4'}
         ],
         key = 'n';
-      var result = data_manipulation.groupPropertyValues(collection, key);
+      var result = dataManipulation.groupPropertyValues(collection, key);
       expect(JSON.stringify(result)).to.equal(JSON.stringify({
         v1: [
           {n: 'v1'}

+ 2 - 11
ambari-web/test/utils/date/date_test.js

@@ -16,21 +16,12 @@
  * limitations under the License.
  */
 
-var Ember = require('ember');
 var App = require('app');
-
-var validator = require('utils/validator');
 var date = require('utils/date/date');
 
 describe('date', function () {
 
-  var correct_tests = Em.A([
-    {t: 1349752195000, e: 'Tue, Oct 09, 2012 03:09', e2: 'Tue Oct 09 2012'},
-    {t: 1367752195000, e: 'Sun, May 05, 2013 11:09', e2: 'Sun May 05 2013'},
-    {t: 1369952195000, e: 'Thu, May 30, 2013 22:16', e2: 'Thu May 30 2013'}
-  ]);
-
-  var incorrect_tests = Em.A([
+  var incorrectTests = Em.A([
     {t: null},
     {t: ''},
     {t: false},
@@ -104,7 +95,7 @@ describe('date', function () {
     });
 
     describe('Incorrect data', function(){
-      incorrect_tests.forEach(function(test) {
+      incorrectTests.forEach(function(test) {
         it(test.t, function() {
           expect(date.timingFormat(test.t)).to.equal(null);
         });

+ 14 - 17
ambari-web/test/utils/helper_test.js

@@ -181,8 +181,9 @@ describe('utils/helper', function() {
       });
       it('should sort array', function() {
         result.forEach(function(resultObj, index, resultArr) {
-          if (index > resultArr.length - 1)
+          if (index > resultArr.length - 1) {
             expect(resultObj.a < resultArr[index + 1].a).to.eql(false);
+          }
         });
       });
       it('should try to sort without throwing exception', function(){
@@ -244,7 +245,7 @@ describe('utils/helper', function() {
       beforeEach(appendDiv);
       afterEach(removeDiv);
       it('should add tooltip', function() {
-        var tooltip = App.tooltip($('#tooltip-test'));
+        App.tooltip($('#tooltip-test'));
         expect($('#tooltip-test').data('tooltip').enabled).to.eql(true);
       });
     });
@@ -252,7 +253,7 @@ describe('utils/helper', function() {
       beforeEach(appendDiv);
       afterEach(removeDiv);
       it('should add popover', function() {
-        var tooltip = App.popover($('#tooltip-test'));
+        App.popover($('#tooltip-test'));
         expect($('#tooltip-test').data('popover').enabled).to.eql(true);
       });
     });
@@ -304,13 +305,11 @@ describe('utils/helper', function() {
           'FALCON': 'Falcon',
           'falcon': 'Falcon'
         };
-        for (var inputName in tests) {
-          (function(name) {
-            it(testMessage.format(name, tests[name]), function() {
-              expect(App.format.normalizeNameBySeparators(name, ["-", "_", " "])).to.eql(tests[name]);
-            });
-          })(inputName)
-        }
+        Object.keys(tests).forEach(function (inputName) {
+          it(testMessage.format(inputName, tests[inputName]), function() {
+            expect(App.format.normalizeNameBySeparators(inputName, ["-", "_", " "])).to.eql(tests[inputName]);
+          });
+        });
       });
 
       describe('#normalizeName()', function() {
@@ -386,13 +385,11 @@ describe('utils/helper', function() {
           'ZOOKEEPER_SERVICE_CHECK': 'ZooKeeper Service Check',
           'CLIENT': 'Client'
         };
-        for (var inputName in tests) {
-          (function(name) {
-            it(testMessage.format(name, tests[name]), function() {
-              expect(App.format.normalizeName(name)).to.eql(tests[name]);
-            });
-          })(inputName)
-        }
+        Object.keys(tests).forEach(function (inputName) {
+          it(testMessage.format(inputName, tests[inputName]), function() {
+            expect(App.format.normalizeName(inputName)).to.eql(tests[inputName]);
+          });
+        });
       });
       describe('#kdcErrorMsg()', function() {
         var tests = [

+ 7 - 76
ambari-web/test/utils/host_progress_popup_test.js

@@ -26,76 +26,7 @@ require('utils/host_progress_popup');
 
 describe('App.HostPopup', function () {
 
-  var services = [
-    {
-      displayName: "Start service WebHCat",
-      hosts: [
-        {
-          logTasks: [
-            {
-              Tasks: {
-                command: "START",
-                host_name: "ip-10-12-123-90.ec2.internal",
-                role: "WEBHCAT_SERVER",
-                status: "QUEUED"
-              },
-              href: "http://ec2-54-224-233-43.compute-1.amazonaws.com:8080/api/v1/clusters/mycluster/requests/23/tasks/94"
-            }
-          ],
-          name: "ip-10-12-123-90.ec2.internal",
-          publicName: "ip-10-12-123-90.ec2.internal",
-          serviceName: "Start service WebHCat"
-        }
-      ],
-      isRunning: false
-    },
-    {
-      displayName: "Start service Hive/HCat",
-      hosts: [
-        {
-          logTasks: [
-            {
-              Tasks: {
-                command: "INSTALL",
-                host_name: "ip-10-12-123-90.ec2.internal",
-                status: "COMPLETED"
-              },
-              href: "http://ec2-54-224-233-43.compute-1.amazonaws.com:8080/api/v1/clusters/mycluster/requests/15/tasks/76"
-            }
-          ],
-          name: "ip-10-12-123-90.ec2.internal",
-          publicName: "ip-10-12-123-90.ec2.internal",
-          serviceName: "Start service Hive/HCat"
-        },
-        {
-          logTasks: [
-            {
-              Tasks: {
-                command: "START",
-                host_name: "ip-10-33-7-23.ec2.internal",
-                status: "COMPLETED"
-              },
-              href: "http://ec2-54-224-233-43.compute-1.amazonaws.com:8080/api/v1/clusters/mycluster/requests/15/tasks/78"
-            },
-            {
-              Tasks: {
-                command: "START",
-                host_name: "ip-10-33-7-23.ec2.internal",
-                status: "COMPLETED"
-              },
-              href: "http://ec2-54-224-233-43.compute-1.amazonaws.com:8080/api/v1/clusters/mycluster/requests/15/tasks/79"
-            }
-          ],
-          name: "ip-10-33-7-23.ec2.internal",
-          publicName: "ip-10-33-7-23.ec2.internal",
-          serviceName: "Start service Hive/HCat"
-        }
-      ],
-      isRunning: false
-    }
-  ];
-
-  var test_tasks = [
+  var testTasks = [
     {
       t: [
         {
@@ -346,17 +277,17 @@ describe('App.HostPopup', function () {
   });
 
   describe('#getStatus', function() {
-    test_tasks.forEach(function(test_task) {
-      it(test_task.m, function() {
-        expect(App.HostPopup.getStatus(test_task.t)[0]).to.equal(test_task.r);
+    testTasks.forEach(function(testTask) {
+      it(testTask.m, function() {
+        expect(App.HostPopup.getStatus(testTask.t)[0]).to.equal(testTask.r);
       });
     });
   });
 
   describe('#getProgress', function() {
-    test_tasks.forEach(function(test_task) {
-      it(test_task.m, function() {
-        expect(App.HostPopup.getProgress(test_task.t)).to.equal(test_task.p);
+    testTasks.forEach(function(testTask) {
+      it(testTask.m, function() {
+        expect(App.HostPopup.getProgress(testTask.t)).to.equal(testTask.p);
       });
     });
   });

+ 1 - 3
ambari-web/test/utils/load_timer_test.js

@@ -16,8 +16,6 @@
  * limitations under the License.
  */
 
-var misc = require('utils/load_timer');
-
 describe('App.loadTimer', function () {
 
   window.performance = {
@@ -38,7 +36,7 @@ describe('App.loadTimer', function () {
   describe("#start()", function() {
     it("time should be cached", function() {
       App.loadTimer.start('test');
-      expect(App.loadTimer.get('timeStampCache')['test']).to.be.an('number');
+      expect(App.loadTimer.get('timeStampCache.test')).to.be.an('number');
     });
   });
 

+ 1 - 1
ambari-web/test/utils/misc_test.js

@@ -36,7 +36,7 @@ describe('misc', function () {
         expect(misc.formatBandwidth(test.i)).to.equal(test.e);
       });
     });
-    it('NaN to NaN' + ' ', function () {
+    it('NaN to NaN', function () {
       expect(isNaN(misc.formatBandwidth(NaN))).to.equal(true);
     });
   });

+ 1 - 1
ambari-web/test/utils/number_utils_test.js

@@ -268,7 +268,7 @@ describe('utils/number_utils', function() {
     ];
     var message = 'cardinality `{0}`. {1} value should be {2}';
     tests.forEach(function(test) {
-      it(message.format('' + test.cardinality, (test.isMax ? 'maximum' : 'minimum'), test.e), function() {
+      it(message.format('' + test.cardinality, test.isMax ? 'maximum' : 'minimum', test.e), function() {
         expect(numberUtils.getCardinalityValue(test.cardinality, test.isMax)).to.be.eql(test.e);
       });
     })

+ 11 - 11
ambari-web/test/utils/string_utils_test.js

@@ -16,10 +16,10 @@
  * limitations under the License.
  */
 
-var string_utils = require('utils/string_utils');
+var stringUtils = require('utils/string_utils');
 require('utils/helper');
 
-describe('string_utils', function () {
+describe('stringUtils', function () {
 
   describe('#underScoreToCamelCase', function () {
     var tests = [
@@ -30,7 +30,7 @@ describe('string_utils', function () {
     ];
     tests.forEach(function(test) {
       it(test.m + ' ', function () {
-        expect(string_utils.underScoreToCamelCase(test.i)).to.equal(test.e);
+        expect(stringUtils.underScoreToCamelCase(test.i)).to.equal(test.e);
       });
     });
   });
@@ -50,7 +50,7 @@ describe('string_utils', function () {
     ];
     tests.forEach(function(test) {
       it(test.m + ' ', function () {
-        expect(string_utils.pad(test.i, test.l, test.f, test.a)).to.equal(test.e);
+        expect(stringUtils.pad(test.i, test.l, test.f, test.a)).to.equal(test.e);
       });
     });
   });
@@ -70,7 +70,7 @@ describe('string_utils', function () {
     ];
     tests.forEach(function(test) {
       it(test.m + ' ', function () {
-        expect(string_utils.compareVersions(test.v1, test.v2)).to.equal(test.e);
+        expect(stringUtils.compareVersions(test.v1, test.v2)).to.equal(test.e);
       });
     });
   });
@@ -84,7 +84,7 @@ describe('string_utils', function () {
     ];
     tests.forEach(function(test) {
       it(test.t + ' ' + test.m + ' ', function () {
-        expect(string_utils.isSingleLine(test.t)).to.equal(test.e);
+        expect(stringUtils.isSingleLine(test.t)).to.equal(test.e);
       });
     });
   });
@@ -92,7 +92,7 @@ describe('string_utils', function () {
   describe('#arrayToCSV', function() {
     var test = [{a: 1, b:2, c:3}, {a: 1, b:2, c:3}, {a: 1, b:2, c:3}];
     it('array of object to csv-string', function () {
-      expect(string_utils.arrayToCSV(test)).to.equal("1,2,3\n1,2,3\n1,2,3\n");
+      expect(stringUtils.arrayToCSV(test)).to.equal("1,2,3\n1,2,3\n1,2,3\n");
     });
   });
 
@@ -110,7 +110,7 @@ describe('string_utils', function () {
     ];
     tests.forEach(function(test) {
       it('Check ' + typeof test.t, function () {
-        expect(string_utils.getFileFromPath(test.t)).to.equal(test.e);
+        expect(stringUtils.getFileFromPath(test.t)).to.equal(test.e);
       });
     });
   });
@@ -131,7 +131,7 @@ describe('string_utils', function () {
       ];
       tests.forEach(function(test) {
           it('Check ' + typeof test.t, function () {
-            expect(string_utils.getPath(test.t)).to.equal(test.e);
+            expect(stringUtils.getPath(test.t)).to.equal(test.e);
           });
       });
   });
@@ -156,7 +156,7 @@ describe('string_utils', function () {
     ];
     tests.forEach(function(test) {
       it(test.i + ' to ' + test.e + ' ', function () {
-        expect(string_utils.getCamelCase(test.i)).to.equal(test.e);
+        expect(stringUtils.getCamelCase(test.i)).to.equal(test.e);
       });
     });
   });
@@ -251,7 +251,7 @@ describe('string_utils', function () {
     ];
     tests.forEach(function(test) {
       it('Check ' + typeof test.t, function () {
-        expect(string_utils.htmlEntities(test.t)).to.equal(test.e);
+        expect(stringUtils.htmlEntities(test.t)).to.equal(test.e);
       });
     });
   });

+ 3 - 4
ambari-web/test/utils/ui_effects_test.js

@@ -16,8 +16,7 @@
  * limitations under the License.
  */
 
-var ui_utils = require('utils/ui_effects');
-var App = require('app');
+var uiUtils = require('utils/ui_effects');
 
 describe('utils/ui_effects', function(){
   describe('#pulsate()', function(){
@@ -34,13 +33,13 @@ describe('utils/ui_effects', function(){
 
     it('opacity should be 0.2 on 5-th iteration', function() {
       var domEl = $('#pulsate-test-dom');
-      ui_utils.pulsate(domEl, 1000);
+      uiUtils.pulsate(domEl, 1000);
       this.clock.tick(300);
       expect(parseFloat(domEl.css('opacity')).toFixed(1)).to.eql('0.2');
     });
     it('should call callback at the end', function() {
       var domEl = $('#pulsate-test-dom');
-      ui_utils.pulsate(domEl, 1000, this.clb);
+      uiUtils.pulsate(domEl, 1000, this.clb);
       this.clock.tick(2000);
       expect(this.clb.calledOnce).to.be.ok;
     });

+ 4 - 3
ambari-web/test/utils/validator_test.js

@@ -232,8 +232,9 @@ describe('validator', function () {
       { obj: 1, detect: false },
       { obj: true, detect: false }
     ];
-    testable.forEach(function(value){
-      it('should ' + (value.detect ? '' : 'not') + ' detect empty value in `' + new String(value.obj) + '`', function(){
+    testable.forEach(function(value) {
+      var detect = value.detect ? '' : 'not';
+      it('should {0} detect empty value in `{1}`'.format(detect, JSON.stringify(value.obj)), function() {
         expect(validator.empty(value.obj)).to.eql(value.detect);
       });
     });
@@ -420,7 +421,7 @@ describe('validator', function () {
         { value: 'a{1,2}{', expected: false }
       ];
     tests.forEach(function(test) {
-      it(message.format(test.value, (test.expected) ? 'valid' : 'not valid'), function() {
+      it(message.format(test.value, test.expected ? 'valid' : 'not valid'), function() {
         expect(validator.isValidMatchesRegexp(test.value)).to.equal(test.expected);
       })
     });

+ 5 - 5
ambari-web/test/views/common/chart/linear_time_test.js

@@ -382,7 +382,7 @@ describe('App.ChartLinearTimeView', function () {
         view.setYAxisFormatter();
         view.yAxisFormatter();
         methodNames.forEach(function (name) {
-          expect(App.ChartLinearTimeView[name].callCount).to.equal(Number(name == item.formatter));
+          expect(App.ChartLinearTimeView[name].callCount).to.equal(Number(name === item.formatter));
         });
       });
     });
@@ -443,16 +443,16 @@ describe('App.ChartLinearTimeView.LoadAggregator', function () {
       result = aggregator.groupRequests(requests);
     });
     it("result['r1'].subRequests.length", function () {
-      expect(result['r1'].subRequests.length).to.equal(1);
+      expect(result.r1.subRequests.length).to.equal(1);
     });
     it("result['r1'].fields.length", function () {
-      expect(result['r1'].fields.length).to.equal(1);
+      expect(result.r1.fields.length).to.equal(1);
     });
     it("result['r2'].subRequests.length", function () {
-      expect(result['r2'].subRequests.length).to.equal(2);
+      expect(result.r2.subRequests.length).to.equal(2);
     });
     it("result['r2'].fields.length", function () {
-      expect(result['r2'].fields.length).to.equal(3);
+      expect(result.r2.fields.length).to.equal(3);
     });
   });
 

+ 1 - 1
ambari-web/test/views/common/configs/overriddenProperty_view_test.js

@@ -44,7 +44,7 @@ describe('App.ServiceConfigView.SCPOverriddenRowsView', function () {
 
   describe('#setSwitchText', function () {
 
-    var view = App.ServiceConfigView.SCPOverriddenRowsView.create({
+    view = App.ServiceConfigView.SCPOverriddenRowsView.create({
       serviceConfigProperty: {
         overrides: [
           Em.Object.create({

+ 1 - 4
ambari-web/test/views/common/configs/service_config_container_view_test.js

@@ -22,10 +22,7 @@ require('views/common/configs/services_config');
 
 describe('App.ServiceConfigContainerView', function () {
 
-  var view,
-    selectedService = {
-      configCategories: []
-    };
+  var view;
 
   beforeEach(function () {
     view = App.ServiceConfigContainerView.create({

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor