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

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

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 4d6c80febe439377d3753867196b0499d2ed4ba3
Parents: edbb549
Author: Oleg Nechiporenko <onechipore...@apache.org>
Authored: Wed Mar 29 15:59:54 2017 +0300
Committer: Oleg Nechiporenko <onechipore...@apache.org>
Committed: Wed Mar 29 15:59:54 2017 +0300

----------------------------------------------------------------------
 ambari-web/app/assets/index.html                |  4 ++--
 .../app/controllers/wizard/step6_controller.js  |  5 +++-
 .../mixins/wizard/assign_master_components.js   |  1 +
 ambari-web/app/templates/application.hbs        |  4 ++--
 .../common/assign_master_components.hbs         | 14 ++++++------
 .../app/templates/common/form/dropdown.hbs      |  2 +-
 ambari-web/app/templates/common/modal_popup.hbs |  8 +++----
 ambari-web/app/templates/installer.hbs          | 24 ++++++++++----------
 ambari-web/app/templates/wizard/step6.hbs       | 18 +++++++--------
 .../common/assign_master_components_view.js     |  4 ++++
 ambari-web/app/views/common/modal_popup.js      |  1 +
 .../views/common/modal_popups/alert_popup.js    |  1 +
 .../common/modal_popups/confirmation_popup.js   |  1 +
 ambari-web/app/views/wizard/step6_view.js       | 12 ++++++----
 14 files changed, 57 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/assets/index.html
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/index.html b/ambari-web/app/assets/index.html
index 848df40..efd3c64 100644
--- a/ambari-web/app/assets/index.html
+++ b/ambari-web/app/assets/index.html
@@ -45,8 +45,8 @@
     </div>
     <footer>
         <div class="container">
-            <a href="http://www.apache.org/licenses/LICENSE-2.0"; 
target="_blank">Licensed under the Apache License, Version 2.0</a>.<br>
-            <a href="/licenses/NOTICE.txt" target="_blank">See third-party 
tools/resources that Ambari uses and their respective authors</a>
+            <a data-qa="license-link" 
href="http://www.apache.org/licenses/LICENSE-2.0"; target="_blank">Licensed 
under the Apache License, Version 2.0</a>.<br>
+            <a data-qa="third-party-link" href="/licenses/NOTICE.txt" 
target="_blank">See third-party tools/resources that Ambari uses and their 
respective authors</a>
          </div>
     </footer>
 </body>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/controllers/wizard/step6_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step6_controller.js 
b/ambari-web/app/controllers/wizard/step6_controller.js
index d766c18..fb26dc2 100644
--- a/ambari-web/app/controllers/wizard/step6_controller.js
+++ b/ambari-web/app/controllers/wizard/step6_controller.js
@@ -163,6 +163,7 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
 
   openSlavesAndClientsIssues: function () {
     App.ModalPopup.show({
+      'data-qa': 'slave-clients-issues-modal',
       header: 
Em.I18n.t('installer.step6.validationSlavesAndClients.popup.header'),
       bodyClass: Em.View.extend({
         controller: this,
@@ -405,7 +406,8 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
             checked: false,
             isInstalled: false,
             isDisabled: header.get('isDisabled'),
-            uId: _hostName + '-checkbox-' + index
+            uId: _hostName + '-checkbox-' + index,
+            dataQaAttr: header.name === 'CLIENT' ? 'client-component' : ''
           };
         })
       };
@@ -834,6 +836,7 @@ App.WizardStep6Controller = 
Em.Controller.extend(App.HostComponentValidationMixi
 
     if (self.get('anyWarnings') || self.get('anyErrors')) {
       App.ModalPopup.show({
+        'data-qa': 'validation-issues-modal',
         primary: Em.I18n.t('common.continueAnyway'),
         header: Em.I18n.t('installer.step6.validationIssuesAttention.header'),
         body: Em.I18n.t('installer.step6.validationIssuesAttention'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/mixins/wizard/assign_master_components.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/mixins/wizard/assign_master_components.js 
b/ambari-web/app/mixins/wizard/assign_master_components.js
index 9813da1..3e2a09a 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -1205,6 +1205,7 @@ App.AssignMasterComponents = 
Em.Mixin.create(App.HostComponentValidationMixin, A
     }
 
     App.ModalPopup.show({
+      'data-qa': 'validation-issues-modal',
       primary: Em.I18n.t('common.continueAnyway'),
       header: Em.I18n.t('installer.step5.validationIssuesAttention.header'),
       body: Em.I18n.t('installer.step5.validationIssuesAttention'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/application.hbs 
b/ambari-web/app/templates/application.hbs
index 9eab287..c9776e3 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -77,7 +77,7 @@
         {{! user dropdown }}
         {{#if App.router.loggedIn}}
           <div class="top-nav-user navbar-right btn-group">
-            <button class="dropdown-toggle navbar-btn btn btn-default" 
data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
+            <button {{QAAttr "user-dropdown"}} class="dropdown-toggle 
navbar-btn btn btn-default" data-toggle="dropdown" role="button" 
aria-haspopup="true" aria-expanded="false">
               <i class="glyphicon 
glyphicon-user"></i>&nbsp;{{App.router.displayLoginName}}&nbsp;<span 
class="caret"></span>
             </button>
             <ul class="dropdown-menu">
@@ -113,7 +113,7 @@
               {{! sign out }}
               {{#if showExitLink}}
                 <li role="separator" class="divider"></li>
-                <li><a href="" id="sign-out" {{action logoff}}>{{t 
app.signout}}</a></li>
+                <li><a href="" id="sign-out" {{QAAttr "sign-out"}} {{action 
logoff}}>{{t app.signout}}</a></li>
               {{/if}}
               {{! sign out end }}
             </ul>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/templates/common/assign_master_components.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/assign_master_components.hbs 
b/ambari-web/app/templates/common/assign_master_components.hbs
index 72568a4..d5dec3a 100644
--- a/ambari-web/app/templates/common/assign_master_components.hbs
+++ b/ambari-web/app/templates/common/assign_master_components.hbs
@@ -50,7 +50,7 @@
                     {{#each controller.additionalHostsList}}
                       <div class="row row-no-pad additional-hosts-list">
                         <div class="col-md-4">
-                          <label class="pts pull-right">
+                          <label class="pts pull-right" {{QAAttr 
"component-name"}}>
                             {{label}}
                           </label>
                         </div>
@@ -60,10 +60,10 @@
                       </div>
                     {{/each}}
                     {{#each servicesMastersToShow}}
-                      <div class="row row-no-pad form-group">
+                      <div {{QAAttr "component-row"}} class="row row-no-pad 
form-group">
                         <div class="col-md-4">
                           <div class="control-group">
-                            <label class="pts pull-right">
+                            <label class="pts pull-right" {{QAAttr 
"component-name"}}>
                               {{#if showCurrentPrefix}}
                                 {{t common.current}}
                               {{/if}}
@@ -76,7 +76,7 @@
                         </div>
                         <div class="col-md-6">
                           {{#if isServiceCoHost}}
-                            <div class="hostName">
+                            <div class="hostName" {{QAAttr "service-co-host"}}>
                               {{selectedHost}}<i class="glyphicon 
glyphicon-asterisks">&#10037;</i>
                             </div>
                           {{else}}
@@ -134,7 +134,7 @@
                   <div class="col-md-10 col-md-offset-1">
                     <div class="hostString"><span>{{hostInfo}}</span></div>
                     {{#each masterServicesToDisplay}}
-                      <span {{bindAttr 
class="isInstalled:assigned-service:new-service :service-component 
:label"}}>{{display_name}}</span>
+                      <span {{QAAttr "component-on-host"}} {{bindAttr 
class="isInstalled:assigned-service:new-service :service-component 
:label"}}>{{display_name}}</span>
                     {{/each}}
                   </div>
                 </div>
@@ -164,14 +164,14 @@
   <div class="wizard-footer col-md-12">
     <div class="btn-area">
       {{#if view.isBackButtonVisible}}
-        <button type="button" class="btn btn-default pull-left 
installer-back-btn" {{bindAttr disabled="App.router.btnClickInProgress"}} 
{{action back}}>
+        <button {{QAAttr "wizard-back"}} type="button" class="btn btn-default 
pull-left installer-back-btn" {{bindAttr 
disabled="App.router.btnClickInProgress"}} {{action back}}>
           &larr; {{t common.back}}
           {{#if App.router.backBtnClickInProgress}}
             {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
           {{/if}}
         </button>
       {{/if}}
-      <button type="button" class="btn btn-success pull-right" {{bindAttr 
disabled="nextButtonDisabled"}} {{action submit target="controller"}}>
+      <button {{QAAttr "wizard-next"}} type="button" class="btn btn-success 
pull-right" {{bindAttr disabled="nextButtonDisabled"}} {{action submit 
target="controller"}}>
         {{#if App.router.nextBtnClickInProgress}}
           {{view App.SpinnerView tagName="span" 
classNames="service-button-spinner"}}
         {{/if}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/templates/common/form/dropdown.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/form/dropdown.hbs 
b/ambari-web/app/templates/common/form/dropdown.hbs
index 605389a..129925b 100644
--- a/ambari-web/app/templates/common/form/dropdown.hbs
+++ b/ambari-web/app/templates/common/form/dropdown.hbs
@@ -16,7 +16,7 @@
 * limitations under the License.
 }}
 
-<div class="dropdown">
+<div class="dropdown" {{QAAttr "select-host-for-component"}}>
   <button {{bindAttr class=":btn :btn-default :dropdown-toggle 
view.disabled:disabled"}} type="button" data-toggle="dropdown">
     {{view App.DropdownOptionView optionBinding="view.selection" 
optionLabelPathBinding="view.optionLabelPath" class="selected-item"}}
     <span class="caret"></span>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/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 f805ec6..cf3b235 100644
--- a/ambari-web/app/templates/common/modal_popup.hbs
+++ b/ambari-web/app/templates/common/modal_popup.hbs
@@ -24,7 +24,7 @@
       {{! Modal header }}
       <div class="modal-header">
         {{#if view.showCloseButton}}
-          <a class="close" {{action onClose target="view"}}>&times;</a>
+          <a {{QAAttr "close-modal"}} class="close" {{action onClose 
target="view"}}>&times;</a>
         {{/if}}
         <h4 id="modal-label">
           {{#if view.headerClass}}
@@ -54,15 +54,15 @@
         {{else}}
           <div class="modal-footer">
             {{#if view.third}}
-              <button
+              <button {{QAAttr "modal-tertiary"}}
                 {{bindAttr disabled="view.disableThird" class=":btn 
view.thirdClass" id="view.thirdId"}}
                 {{action onThird target="view"}}>
                   {{view.third}}
-              </button>{{/if}}{{#if view.secondary}}<button
+              </button>{{/if}}{{#if view.secondary}}<button {{QAAttr 
"modal-secondary"}}
                 {{bindAttr disabled="view.disableSecondary" class=":btn 
view.secondaryClass" id="view.secondaryId"}}
                 {{action onSecondary target="view"}}>
                   {{view.secondary}}
-              </button>{{/if}}{{#if view.primary}}<button
+              </button>{{/if}}{{#if view.primary}}<button {{QAAttr 
"modal-primary"}}
                 {{bindAttr disabled="view.disablePrimary" class=":btn 
view.primaryClass" id="view.primaryId"}}
                 {{action onPrimary target="view"}}>
                   {{view.primary}}

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/templates/installer.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/installer.hbs 
b/ambari-web/app/templates/installer.hbs
index 79d2a7e..f63664a 100644
--- a/ambari-web/app/templates/installer.hbs
+++ b/ambari-web/app/templates/installer.hbs
@@ -24,18 +24,18 @@
   <div class="wizard">
     <div class="wizard-body row">
       <div class="wizard-nav col-md-3">
-        <ul class="nav nav-pills nav-stacked">
-          <li {{bindAttr class="isStep0:active view.isStep0Disabled:disabled 
view.isStep0Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep0 target="controller"}}><i class="step-marker"><span 
class="step-index">0</span></i><p class="step-name">{{t 
installer.step0.header}}</p></a></li>
-          <li {{bindAttr class="isStep1:active view.isStep1Disabled:disabled 
view.isStep1Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep1 target="controller"}}><i class="step-marker"><span 
class="step-index">1</span></i><p class="step-name">{{t 
installer.step1.header}}</p></a></li>
-          <li {{bindAttr class="isStep2:active view.isStep2Disabled:disabled 
view.isStep2Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep2 target="controller"}}><i class="step-marker"><span 
class="step-index">2</span></i><p class="step-name">{{t 
installer.step2.header}}</p></a></li>
-          <li {{bindAttr class="isStep3:active view.isStep3Disabled:disabled 
view.isStep3Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep3 target="controller"}}><i class="step-marker"><span 
class="step-index">3</span></i><p class="step-name">{{t 
installer.step3.header}}</p></a></li>
-          <li {{bindAttr class="isStep4:active view.isStep4Disabled:disabled 
view.isStep4Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep4 target="controller"}}><i class="step-marker"><span 
class="step-index">4</span></i><p class="step-name">{{t 
installer.step4.header}}</p></a></li>
-          <li {{bindAttr class="isStep5:active view.isStep5Disabled:disabled 
view.isStep5Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep5 target="controller"}}><i class="step-marker"><span 
class="step-index">5</span></i><p class="step-name">{{t 
installer.step5.header}}</p></a></li>
-          <li {{bindAttr class="isStep6:active view.isStep6Disabled:disabled 
view.isStep6Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep6 target="controller"}}><i class="step-marker"><span 
class="step-index">6</span></i><p class="step-name">{{t 
installer.step6.header}}</p></a></li>
-          <li {{bindAttr class="isStep7:active view.isStep7Disabled:disabled 
view.isStep7Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep7 target="controller"}}><i class="step-marker"><span 
class="step-index">7</span></i><p class="step-name">{{t 
installer.step7.header}}</p></a></li>
-          <li {{bindAttr class="isStep8:active view.isStep8Disabled:disabled 
view.isStep8Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep8 target="controller"}}><i class="step-marker"><span 
class="step-index">8</span></i><p class="step-name">{{t 
installer.step8.header}}</p></a></li>
-          <li {{bindAttr class="isStep9:active view.isStep9Disabled:disabled 
view.isStep9Completed:completed"}}><a href="javascript:void(null);"  {{action 
gotoStep9 target="controller"}}><i class="step-marker"><span 
class="step-index">9</span></i><p class="step-name">{{t 
installer.step9.header}}</p></a></li>
-          <li {{bindAttr class="isStep10:active view.isStep10Disabled:disabled 
view.isStep10Completed:completed"}}><a href="javascript:void(null);" {{action 
gotoStep10 target="controller"}}><i class="step-marker"><span 
class="step-index">10</span></i><p class="step-name">{{t 
installer.step10.header}}</p></a></li>
+        <ul class="nav nav-pills nav-stacked" {{QAAttr "wizard-nav"}}>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep0:active 
view.isStep0Disabled:disabled view.isStep0Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep0 target="controller"}}><i 
class="step-marker"><span class="step-index">0</span></i><p 
class="step-name">{{t installer.step0.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep1:active 
view.isStep1Disabled:disabled view.isStep1Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep1 target="controller"}}><i 
class="step-marker"><span class="step-index">1</span></i><p 
class="step-name">{{t installer.step1.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep2:active 
view.isStep2Disabled:disabled view.isStep2Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep2 target="controller"}}><i 
class="step-marker"><span class="step-index">2</span></i><p 
class="step-name">{{t installer.step2.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep3:active 
view.isStep3Disabled:disabled view.isStep3Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep3 target="controller"}}><i 
class="step-marker"><span class="step-index">3</span></i><p 
class="step-name">{{t installer.step3.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep4:active 
view.isStep4Disabled:disabled view.isStep4Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep4 target="controller"}}><i 
class="step-marker"><span class="step-index">4</span></i><p 
class="step-name">{{t installer.step4.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep5:active 
view.isStep5Disabled:disabled view.isStep5Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep5 target="controller"}}><i 
class="step-marker"><span class="step-index">5</span></i><p 
class="step-name">{{t installer.step5.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep6:active 
view.isStep6Disabled:disabled view.isStep6Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep6 target="controller"}}><i 
class="step-marker"><span class="step-index">6</span></i><p 
class="step-name">{{t installer.step6.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep7:active 
view.isStep7Disabled:disabled view.isStep7Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep7 target="controller"}}><i 
class="step-marker"><span class="step-index">7</span></i><p 
class="step-name">{{t installer.step7.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep8:active 
view.isStep8Disabled:disabled view.isStep8Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep8 target="controller"}}><i 
class="step-marker"><span class="step-index">8</span></i><p 
class="step-name">{{t installer.step8.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep9:active 
view.isStep9Disabled:disabled view.isStep9Completed:completed"}}><a 
href="javascript:void(null);"  {{action gotoStep9 target="controller"}}><i 
class="step-marker"><span class="step-index">9</span></i><p 
class="step-name">{{t installer.step9.header}}</p></a></li>
+          <li {{QAAttr "wizard-nav-step"}} {{bindAttr class="isStep10:active 
view.isStep10Disabled:disabled view.isStep10Completed:completed"}}><a 
href="javascript:void(null);" {{action gotoStep10 target="controller"}}><i 
class="step-marker"><span class="step-index">10</span></i><p 
class="step-name">{{t installer.step10.header}}</p></a></li>
         </ul>
       </div>
         {{! outlet includes body and footer }}

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/templates/wizard/step6.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/wizard/step6.hbs 
b/ambari-web/app/templates/wizard/step6.hbs
index ae9f80c..c06177e 100644
--- a/ambari-web/app/templates/wizard/step6.hbs
+++ b/ambari-web/app/templates/wizard/step6.hbs
@@ -23,7 +23,7 @@
   <div class="panel panel-default">
     <div class="panel-body">
       {{#if anyGeneralIssues}}
-        <div class="alert alert-danger">
+        <div class="alert alert-danger" {{QAAttr "error-message"}}>
           {{t installer.step6.validationSlavesAndClients.hasIssues}}
           <a href="javascript:void(null);" {{action openSlavesAndClientsIssues 
target="controller"}}>{{t installer.step6.validationSlavesAndClients.click}}</a>
           {{t installer.step6.validationSlavesAndClients.forDetails}}
@@ -31,15 +31,15 @@
       {{/if}}
 
       <div class="pre-scrollable col-sm-12">
-        <table class="table table-hover" id="component_assign_table">
+        <table class="table table-hover" id="component_assign_table" {{QAAttr 
"slave-clients-table"}}>
           <thead>
           <tr>
             <th class="host-column">{{t common.host}}</th>
             {{#each header in controller.headers}}
               <th {{bindAttr class="header.name"}}>
-                <a href="#" {{bindAttr 
class="header.allChecked:selected:deselected header.isDisabled:remove-link" 
id="header.allId"}}
+                <a href="#" {{QAAttr "select-all"}} {{bindAttr 
class="header.allChecked:selected:deselected header.isDisabled:remove-link" 
id="header.allId"}}
                   {{action "selectAllNodes" header target="controller"}}>{{t 
all}}</a> &nbsp;|&nbsp; <a
-                      href="#" {{bindAttr 
class="header.noChecked:selected:deselected header.isDisabled:remove-link" 
id="header.noneId"}}
+                {{QAAttr "deselect-all"}} href="#" {{bindAttr 
class="header.noChecked:selected:deselected header.isDisabled:remove-link" 
id="header.noneId"}}
                 {{action "deselectAllNodes" header target="controller"}}>{{t 
none}}</a>
               </th>
             {{/each}}
@@ -47,19 +47,19 @@
           </thead>
           <tbody>
             {{#each host in view.pageContent}}
-              <tr>
+              <tr {{QAAttr "host-row"}}>
                 {{#view App.WizardStep6HostView hostBinding="host" }}
                   <div class="checkbox">
                     <span class="trim_hostname">{{host.hostName}}</span>
                     {{#if host.hasMaster}}
-                      <i class="glyphicon glyphicon-asterisks">&#10037;</i>
+                      <i {{QAAttr "has-masters"}} class="glyphicon 
glyphicon-asterisks">&#10037;</i>
                     {{/if}}
                   </div>
                 {{/view}}
                 {{#each checkbox in host.checkboxes}}
-                  <td {{bindAttr class="checkbox.hasErrorMessage:error 
checkbox.hasWarnMessage:warning checkbox.component"}}>
-                    <div class="checkbox">
-                        <input {{bindAttr id="checkbox.uId" checked = 
"checkbox.checked" disabled="checkbox.isDisabled"}} {{action "checkboxClick" 
checkbox target="view" }}
+                  <td {{QAAttr "toggle-component"}} {{bindAttr 
class="checkbox.hasErrorMessage:error checkbox.hasWarnMessage:warning 
checkbox.component"}}>
+                    <div class="checkbox" {{bindAttr 
data-qa="checkbox.dataQaAttr"}}>
+                        <input {{bindAttr id="checkbox.uId" 
checked="checkbox.checked" disabled="checkbox.isDisabled"}} {{action 
"checkboxClick" checkbox target="view" }}
                                 type="checkbox"/>
                       <label {{bindAttr 
for="checkbox.uId"}}>{{checkbox.title}}</label>
                     </div>

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/views/common/assign_master_components_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/assign_master_components_view.js 
b/ambari-web/app/views/common/assign_master_components_view.js
index 8ad1991..892bcae 100644
--- a/ambari-web/app/views/common/assign_master_components_view.js
+++ b/ambari-web/app/views/common/assign_master_components_view.js
@@ -174,6 +174,8 @@ App.AddControlView = Em.View.extend({
 
   classNameBindings: ['uniqueId'],
 
+  'data-qa': 'add-master',
+
   template: Em.Handlebars.compile('+'),
 
   /**
@@ -209,6 +211,8 @@ App.RemoveControlView = Em.View.extend({
 
   tagName: "span",
 
+  'data-qa': 'remove-master',
+
   classNames: ["label", 'extra-component'],
 
   template: Em.Handlebars.compile('-'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/views/common/modal_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popup.js 
b/ambari-web/app/views/common/modal_popup.js
index 4248301..ad27a40 100644
--- a/ambari-web/app/views/common/modal_popup.js
+++ b/ambari-web/app/views/common/modal_popup.js
@@ -48,6 +48,7 @@ App.ModalPopup = Ember.View.extend({
   primaryId: '',
   secondaryId: '',
   thirdId: '',
+  'data-qa': 'modal',
   onPrimary: function () {
     this.hide();
   },

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/views/common/modal_popups/alert_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popups/alert_popup.js 
b/ambari-web/app/views/common/modal_popups/alert_popup.js
index 3364fcb..a1009d8 100644
--- a/ambari-web/app/views/common/modal_popups/alert_popup.js
+++ b/ambari-web/app/views/common/modal_popups/alert_popup.js
@@ -28,6 +28,7 @@ var App = require('app');
  */
 App.showAlertPopup = function (header, body, callback) {
   return App.ModalPopup.show({
+    'data-qa': 'alert-modal',
     primary: Em.I18n.t('ok'),
     secondary: null,
     header: header,

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/views/common/modal_popups/confirmation_popup.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/modal_popups/confirmation_popup.js 
b/ambari-web/app/views/common/modal_popups/confirmation_popup.js
index dc7f596..c7d95f4 100644
--- a/ambari-web/app/views/common/modal_popups/confirmation_popup.js
+++ b/ambari-web/app/views/common/modal_popups/confirmation_popup.js
@@ -34,6 +34,7 @@ App.showConfirmationPopup = function (primary, body, 
secondary, header, primaryT
     return false;
   }
   return App.ModalPopup.show({
+    'data-qa': 'confirmation-modal',
     encodeBody: false,
     primary: primaryText || Em.I18n.t('ok'),
     header: header || Em.I18n.t('popup.confirmation.commonHeader'),

http://git-wip-us.apache.org/repos/asf/ambari/blob/4d6c80fe/ambari-web/app/views/wizard/step6_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step6_view.js 
b/ambari-web/app/views/wizard/step6_view.js
index ab74660..ab37245 100644
--- a/ambari-web/app/views/wizard/step6_view.js
+++ b/ambari-web/app/views/wizard/step6_view.js
@@ -87,7 +87,7 @@ App.WizardStep6View = App.TableView.extend({
 
   columnCount: function() {
     var hosts = this.get('controller.hosts');
-    return (hosts && hosts.length > 0) ? hosts[0].get('checkboxes').length + 1 
: 1;
+    return hosts && hosts.length > 0 ? hosts[0].get('checkboxes').length + 1 : 
1;
   }.property('controller.hosts.@each.checkboxes')
 });
 
@@ -99,6 +99,8 @@ App.WizardStep6HostView = Em.View.extend({
    */
   host: null,
 
+  'data-qa': 'hostname-block',
+
   tagName: 'td',
 
   /**
@@ -106,11 +108,13 @@ App.WizardStep6HostView = Em.View.extend({
    * @method didInsertElement
    */
   didInsertElement: function () {
+    const componentNames = this.get('controller')
+      .getMasterComponentsForHost(this.get('host.hostName'))
+      .map(_component => App.format.role(_component, false))
+      .join('<br />');
     App.popover(this.$(), {
       title: 
Em.I18n.t('installer.step6.wizardStep6Host.title').format(this.get('host.hostName')),
-      content: 
this.get('controller').getMasterComponentsForHost(this.get('host.hostName')).map(function
 (_component) {
-        return App.format.role(_component, false);
-      }).join("<br />"),
+      content: `<div 
data-qa="master-component-popover">${componentNames}</div>`,
       placement: 'right',
       trigger: 'hover'
     });

Reply via email to