Repository: ambari
Updated Branches:
  refs/heads/trunk 43f02f903 -> 982f9c626


AMBARI-20609. Fix Install Wizard data attribute (alexantonenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/982f9c62
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/982f9c62
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/982f9c62

Branch: refs/heads/trunk
Commit: 982f9c626b50d671b0a8a01997bb96e8bc22648e
Parents: 43f02f9
Author: Alex Antonenko <[email protected]>
Authored: Thu Mar 30 19:00:01 2017 +0300
Committer: Alex Antonenko <[email protected]>
Committed: Thu Mar 30 19:40:06 2017 +0300

----------------------------------------------------------------------
 .../app/controllers/wizard/step4_controller.js  |  2 ++
 ambari-web/app/templates/common/modal_popup.hbs |  2 +-
 ambari-web/app/templates/wizard/step4.hbs       | 20 +++++++++-----------
 .../step4/step4_ranger_requirements_popup.hbs   |  2 +-
 ambari-web/app/views/common/checkbox_view.js    |  2 +-
 5 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/982f9c62/ambari-web/app/controllers/wizard/step4_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step4_controller.js 
b/ambari-web/app/controllers/wizard/step4_controller.js
index 8165c8d..d82bf34 100644
--- a/ambari-web/app/controllers/wizard/step4_controller.js
+++ b/ambari-web/app/controllers/wizard/step4_controller.js
@@ -484,6 +484,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({
   needToAddServicePopup: function (services, i18nSuffix, serviceName, 
callback, id) {
     var self = this;
     return App.ModalPopup.show({
+      'data-qa': 'need-add-service-confirmation-modal',
       header: Em.I18n.t('installer.step4.' + i18nSuffix + 
'.popup.header').format(serviceName),
       body: Em.I18n.t('installer.step4.' + i18nSuffix + 
'.popup.body').format(serviceName),
       onPrimary: function () {
@@ -551,6 +552,7 @@ App.WizardStep4Controller = Em.ArrayController.extend({
   rangerRequirementsPopup: function (callback, id) {
     var self = this;
     return App.ModalPopup.show({
+      'data-qa': 'ranger-requirements-modal',
       header: Em.I18n.t('installer.step4.rangerRequirements.popup.header'),
       bodyClass: Em.View.extend({
         templateName: 
require('templates/wizard/step4/step4_ranger_requirements_popup')

http://git-wip-us.apache.org/repos/asf/ambari/blob/982f9c62/ambari-web/app/templates/common/modal_popup.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/modal_popup.hbs 
b/ambari-web/app/templates/common/modal_popup.hbs
index cf3b235..96aa6dc 100644
--- a/ambari-web/app/templates/common/modal_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popup.hbs
@@ -26,7 +26,7 @@
         {{#if view.showCloseButton}}
           <a {{QAAttr "close-modal"}} class="close" {{action onClose 
target="view"}}>&times;</a>
         {{/if}}
-        <h4 id="modal-label">
+        <h4 {{QAAttr "modal-title"}} id="modal-label">
           {{#if view.headerClass}}
             {{view view.headerClass}}
           {{else}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/982f9c62/ambari-web/app/templates/wizard/step4.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step4.hbs 
b/ambari-web/app/templates/wizard/step4.hbs
index 1dbf5e6..c688981 100644
--- a/ambari-web/app/templates/wizard/step4.hbs
+++ b/ambari-web/app/templates/wizard/step4.hbs
@@ -25,26 +25,24 @@
       <table class="table table-hover">
         <thead>
         <tr>
-          <th class="col-md-3">{{t common.service}}</th>
-          <th id="service-version">{{t common.version}}</th>
-          <th id="service-description">{{t common.description}}</th>
+          <th {{QAAttr "service-name-header"}} class="col-md-3">{{t 
common.service}}</th>
+          <th {{QAAttr "service-version-header"}} id="service-version">{{t 
common.version}}</th>
+          <th {{QAAttr "service-description-header"}} 
id="service-description">{{t common.description}}</th>
           <th>
-            {{view App.CheckboxView disabledBinding="isInstalled" 
checkedBinding="isAllChecked"}}
+            {{view App.CheckboxView data-qa="toggle-all" 
disabledBinding="isInstalled" checkedBinding="isAllChecked"}}
           </th>
         </tr>
         </thead>
         <tbody>
         {{#each controller}}
           {{#unless isHiddenOnSelectServicePage}}
-            <tr {{bindAttr class="isSelected:active 
isSelected:service-selected"}}>
-              <td>
-                <div class="checkbox">{{displayNameOnSelectServicePage}}</div>
-              </td>
-              <td>{{serviceVersionDisplay}}</td>
-              <td>{{{comments}}}</td>
+            <tr {{QAAttr "service-row"}} {{bindAttr class="isSelected:active 
isSelected:service-selected"}}>
+              <td {{QAAttr 
"service-name"}}>{{displayNameOnSelectServicePage}}</td>
+              <td {{QAAttr "service-version"}}>{{serviceVersionDisplay}}</td>
+              <td {{QAAttr "service-description"}}>{{{comments}}}</td>
               <td>
                 <div class="checkbox">
-                  {{view App.CheckboxView 
checkboxClassNamesBinding="serviceName"
+                  {{view App.CheckboxView 
checkboxClassNamesBinding="serviceName" data-qa="toggle-service"
                   disabledBinding="isDisabled"
                   checkedBinding="isSelected"
                   }}

http://git-wip-us.apache.org/repos/asf/ambari/blob/982f9c62/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
----------------------------------------------------------------------
diff --git 
a/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs 
b/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
index 107b861..9726556 100644
--- a/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
+++ b/ambari-web/app/templates/wizard/step4/step4_ranger_requirements_popup.hbs
@@ -18,5 +18,5 @@
 
 {{t installer.step4.rangerRequirements.popup.body.requirements}}
 <div class="checkbox">
-  {{view App.CheckboxView checkedBinding="isChecked" 
labelTranslate="installer.step4.rangerRequirements.popup.body.confirmation"}}
+  {{view App.CheckboxView data-qa="ranger-requirements-confirmation" 
checkedBinding="isChecked" 
labelTranslate="installer.step4.rangerRequirements.popup.body.confirmation"}}
 </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/982f9c62/ambari-web/app/views/common/checkbox_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/checkbox_view.js 
b/ambari-web/app/views/common/checkbox_view.js
index 517f6eb..2e1d763 100644
--- a/ambari-web/app/views/common/checkbox_view.js
+++ b/ambari-web/app/views/common/checkbox_view.js
@@ -135,7 +135,7 @@ App.CheckboxView = Em.View.extend({
     labelTextBinding: 'parentView.labelText',
     classNameBindings: 'parentView.labelClassNames',
     tagName: 'label',
-    attributeBindings: ['for'],
+    attributeBindings: ['for', 'parentView.checked:checked'],
     template: Em.Handlebars.compile('{{view.labelText}}'),
     for: Em.computed.alias('parentView.checkboxId')
   })

Reply via email to