You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by al...@apache.org on 2016/01/22 14:02:17 UTC
ambari git commit: Revert "AMBARI-14574. multiple clicks on "Next"
button causes skipping of steps while installing a cluster"
Repository: ambari
Updated Branches:
refs/heads/trunk 880506c70 -> e9b167e25
Revert "AMBARI-14574. multiple clicks on "Next" button causes skipping of steps while installing a cluster"
This reverts commit 880506c7027c80c1fd7c8e51535980d87b0f04fd.
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e9b167e2
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e9b167e2
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e9b167e2
Branch: refs/heads/trunk
Commit: e9b167e25e3476b538b829c707f5ae04c4f819b7
Parents: 880506c
Author: Alex Antonenko <hi...@gmail.com>
Authored: Fri Jan 22 15:02:02 2016 +0200
Committer: Alex Antonenko <hi...@gmail.com>
Committed: Fri Jan 22 15:02:02 2016 +0200
----------------------------------------------------------------------
ambari-web/app/controllers/wizard.js | 2 -
.../app/controllers/wizard/step0_controller.js | 5 --
.../app/controllers/wizard/step3_controller.js | 6 +-
.../app/controllers/wizard/step4_controller.js | 5 --
.../app/controllers/wizard/step7_controller.js | 4 +-
.../mixins/wizard/assign_master_components.js | 6 +-
ambari-web/app/router.js | 1 -
ambari-web/app/routes/installer.js | 68 ++++++++------------
ambari-web/app/views/wizard/step10_view.js | 3 +-
ambari-web/app/views/wizard/step3_view.js | 1 +
ambari-web/app/views/wizard/step4_view.js | 3 +-
ambari-web/app/views/wizard/step7_view.js | 1 +
ambari-web/app/views/wizard/step8_view.js | 1 +
ambari-web/app/views/wizard/step9_view.js | 1 +
.../test/controllers/wizard/step0_test.js | 13 +---
.../test/controllers/wizard/step3_test.js | 16 -----
.../test/controllers/wizard/step4_test.js | 21 ------
.../test/controllers/wizard/step5_test.js | 20 ------
.../test/controllers/wizard/step7_test.js | 11 ----
ambari-web/test/views/wizard/step4_view_test.js | 2 +-
ambari-web/test/views/wizard/step7_view_test.js | 4 +-
21 files changed, 42 insertions(+), 152 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/controllers/wizard.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard.js b/ambari-web/app/controllers/wizard.js
index 762149f..d75982e 100644
--- a/ambari-web/app/controllers/wizard.js
+++ b/ambari-web/app/controllers/wizard.js
@@ -59,8 +59,6 @@ App.WizardController = Em.Controller.extend(App.LocalStorage, App.ThemesMappingM
connectOutlet:function(name, context) {
if (name !== 'loading') this.set('isStepDisabled.isLocked', false);
- App.get('router').set('transitionInProgress', false);
- App.get('router').set('nextBtnClickInProgress', false);
return this._super.apply(this,arguments);
},
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/controllers/wizard/step0_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step0_controller.js b/ambari-web/app/controllers/wizard/step0_controller.js
index 4e60d1b..5f134b5 100644
--- a/ambari-web/app/controllers/wizard/step0_controller.js
+++ b/ambari-web/app/controllers/wizard/step0_controller.js
@@ -66,14 +66,9 @@ App.WizardStep0Controller = Em.Controller.extend({
/**
* Onclick handler for <code>next</code> button
- * Disable 'Next' button while it is already under process. (using Router's property 'nextBtnClickInProgress')
* @method submit
*/
submit: function () {
- if(App.router.nextBtnClickInProgress){
- return;
- }
- App.router.nextBtnClickInProgress = true;
this.set('hasSubmitted', true);
if (!this.get('invalidClusterName')) {
App.clusterStatus.set('clusterName', this.get('content.cluster.name'));
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/controllers/wizard/step3_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step3_controller.js b/ambari-web/app/controllers/wizard/step3_controller.js
index 6fd4563..a43303b 100644
--- a/ambari-web/app/controllers/wizard/step3_controller.js
+++ b/ambari-web/app/controllers/wizard/step3_controller.js
@@ -1648,16 +1648,12 @@ App.WizardStep3Controller = Em.Controller.extend(App.ReloadPopupMixin, {
/**
* Submit-click handler
- * Disable 'Next' button while it is already under process. (using Router's property 'nextBtnClickInProgress')
* @return {App.ModalPopup|null}
* @method submit
*/
submit: function () {
var self = this;
- if(App.router.nextBtnClickInProgress){
- return;
- }
- App.router.nextBtnClickInProgress = true;
+
if (this.get('isHostHaveWarnings')) {
return App.showConfirmationPopup(
function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/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 90479ac..17ce7a6 100644
--- a/ambari-web/app/controllers/wizard/step4_controller.js
+++ b/ambari-web/app/controllers/wizard/step4_controller.js
@@ -133,18 +133,13 @@ App.WizardStep4Controller = Em.ArrayController.extend({
/**
* Onclick handler for <code>Next</code> button.
- * Disable 'Next' button while it is already under process. (using Router's property 'nextBtnClickInProgress')
* @method submit
*/
submit: function () {
- if(App.router.nextBtnClickInProgress){
- return;
- }
if (!this.get('isSubmitDisabled')) {
this.unSelectServices();
this.setGroupedServices();
if (this.validate()) {
- App.router.nextBtnClickInProgress = true;
this.set('errorStack', []);
App.router.send('next');
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/controllers/wizard/step7_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/wizard/step7_controller.js b/ambari-web/app/controllers/wizard/step7_controller.js
index 81e69d6..a2d812e 100644
--- a/ambari-web/app/controllers/wizard/step7_controller.js
+++ b/ambari-web/app/controllers/wizard/step7_controller.js
@@ -1648,10 +1648,9 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
* @method submit
*/
submit: function () {
- if (this.get('isSubmitDisabled') || App.router.nextBtnClickInProgress) {
+ if (this.get('isSubmitDisabled')) {
return false;
}
- App.router.nextBtnClickInProgress = true;
var preInstallChecksController = App.router.get('preInstallChecksController');
if (this.get('supportsPreInstallChecks')) {
if (preInstallChecksController.get('preInstallChecksWhereRun')) {
@@ -1671,7 +1670,6 @@ App.WizardStep7Controller = Em.Controller.extend(App.ServerValidatorMixin, App.E
.fail(function (value) {
if ("invalid_configs" == value) {
self.set('submitButtonClicked', false);
- App.router.nextBtnClickInProgress = false;
} else {
// Failed due to validation mechanism failure.
// Should proceed with other checks
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/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 b1b2d9b..5545e92 100644
--- a/ambari-web/app/mixins/wizard/assign_master_components.js
+++ b/ambari-web/app/mixins/wizard/assign_master_components.js
@@ -1069,20 +1069,16 @@ App.AssignMasterComponents = Em.Mixin.create({
/**
* Submit button click handler
- * Disable 'Next' button while it is already under process. (using Router's property 'nextBtnClickInProgress')
* @method submit
*/
submit: function () {
var self = this;
- if (!this.get('submitButtonClicked') && !App.router.get('nextBtnClickInProgress')) {
+ if (!this.get('submitButtonClicked')) {
this.set('submitButtonClicked', true);
- App.router.set('nextBtnClickInProgress', true);
var goNextStepIfValid = function () {
if (!self.get('submitDisabled')) {
App.router.send('next');
- }else{
- App.router.set('nextBtnClickInProgress', false);
}
self.set('submitButtonClicked', false);
};
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 3c6a07c..c7f59c0 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -55,7 +55,6 @@ App.Router = Em.Router.extend({
isFwdNavigation: true,
backBtnForHigherStep: false,
transitionInProgress: false,
- nextBtnClickInProgress: false,
/**
* Path for local login page. This page will be always accessible without
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/routes/installer.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/installer.js b/ambari-web/app/routes/installer.js
index a1dde7c..e37a05d 100644
--- a/ambari-web/app/routes/installer.js
+++ b/ambari-web/app/routes/installer.js
@@ -126,15 +126,10 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
back: Em.Router.transitionTo('step0'),
next: function (router) {
console.time('step1 next');
- if(App.router.nextBtnClickInProgress || router.transitionInProgress){
- return;
- }
var wizardStep1Controller = router.get('wizardStep1Controller');
var installerController = router.get('installerController');
installerController.validateJDKVersion(function() {
installerController.checkRepoURL(wizardStep1Controller).done(function () {
- App.router.nextBtnClickInProgress = true;
- router.transitionInProgress = true;
installerController.setDBProperty('service', undefined);
installerController.setStacks();
installerController.clearInstallOptions();
@@ -161,14 +156,11 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
back: Em.Router.transitionTo('step1'),
next: function (router) {
console.time('step2 next');
- if (!router.transitionInProgress) {
- router.set('transitionInProgress', true);
- var controller = router.get('installerController');
- controller.save('installOptions');
- //hosts was saved to content.hosts inside wizardStep2Controller
- controller.save('hosts');
- router.transitionTo('step3');
- }
+ var controller = router.get('installerController');
+ controller.save('installOptions');
+ //hosts was saved to content.hosts inside wizardStep2Controller
+ controller.save('hosts');
+ router.transitionTo('step3');
console.timeEnd('step2 next');
}
}),
@@ -238,21 +230,18 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
next: function (router) {
console.time('step4 next');
- if (!router.transitionInProgress) {
- router.set('transitionInProgress', true);
- var controller = router.get('installerController');
- var wizardStep4Controller = router.get('wizardStep4Controller');
- controller.saveServices(wizardStep4Controller);
- controller.saveClients(wizardStep4Controller);
- router.get('wizardStep5Controller').clearRecommendations(); // Force reload recommendation between steps 4 and 5
- controller.setDBProperties({
- recommendations: undefined,
- masterComponentHosts: undefined
- });
- controller.set('stackConfigsLoaded', false);
- App.configsCollection.clearAll();
- router.transitionTo('step5');
- }
+ var controller = router.get('installerController');
+ var wizardStep4Controller = router.get('wizardStep4Controller');
+ controller.saveServices(wizardStep4Controller);
+ controller.saveClients(wizardStep4Controller);
+ router.get('wizardStep5Controller').clearRecommendations(); // Force reload recommendation between steps 4 and 5
+ controller.setDBProperties({
+ recommendations: undefined,
+ masterComponentHosts: undefined
+ });
+ controller.set('stackConfigsLoaded', false);
+ App.configsCollection.clearAll();
+ router.transitionTo('step5');
console.timeEnd('step4 next');
}
}),
@@ -279,19 +268,16 @@ module.exports = Em.Route.extend(App.RouterRedirections, {
back: Em.Router.transitionTo('step4'),
next: function (router) {
console.time('step5 next');
- if (!router.transitionInProgress) {
- router.set('transitionInProgress', true);
- var controller = router.get('installerController');
- var wizardStep5Controller = router.get('wizardStep5Controller');
- var wizardStep6Controller = router.get('wizardStep6Controller');
- controller.saveMasterComponentHosts(wizardStep5Controller);
- controller.setDBProperties({
- slaveComponentHosts: undefined,
- recommendations: wizardStep5Controller.get('content.recommendations')
- });
- wizardStep6Controller.set('isClientsSet', false);
- router.transitionTo('step6');
- }
+ var controller = router.get('installerController');
+ var wizardStep5Controller = router.get('wizardStep5Controller');
+ var wizardStep6Controller = router.get('wizardStep6Controller');
+ controller.saveMasterComponentHosts(wizardStep5Controller);
+ controller.setDBProperties({
+ slaveComponentHosts: undefined,
+ recommendations: wizardStep5Controller.get('content.recommendations')
+ });
+ wizardStep6Controller.set('isClientsSet', false);
+ router.transitionTo('step6');
console.timeEnd('step5 next');
}
}),
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/views/wizard/step10_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step10_view.js b/ambari-web/app/views/wizard/step10_view.js
index d1e7be7..858a4b2 100644
--- a/ambari-web/app/views/wizard/step10_view.js
+++ b/ambari-web/app/views/wizard/step10_view.js
@@ -25,6 +25,7 @@ App.WizardStep10View = Em.View.extend({
didInsertElement: function () {
this.get('controller').loadStep();
+ App.get('router').set('transitionInProgress', false);
},
serviceRestartText: function () {
@@ -34,4 +35,4 @@ App.WizardStep10View = Em.View.extend({
else
return '';
}.property('controller.isAddServiceWizard')
-});
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/views/wizard/step3_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step3_view.js b/ambari-web/app/views/wizard/step3_view.js
index 710d136..0aa5460 100644
--- a/ambari-web/app/views/wizard/step3_view.js
+++ b/ambari-web/app/views/wizard/step3_view.js
@@ -101,6 +101,7 @@ App.WizardStep3View = App.TableView.extend({
didInsertElement: function () {
this.get('controller').loadStep();
+ App.get('router').set('transitionInProgress', false);
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/views/wizard/step4_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step4_view.js b/ambari-web/app/views/wizard/step4_view.js
index b24c89d..3def0c5 100644
--- a/ambari-web/app/views/wizard/step4_view.js
+++ b/ambari-web/app/views/wizard/step4_view.js
@@ -24,6 +24,7 @@ App.WizardStep4View = Em.View.extend({
templateName: require('templates/wizard/step4'),
didInsertElement: function () {
+ App.get('router').set('transitionInProgress', false);
}
-});
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/views/wizard/step7_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step7_view.js b/ambari-web/app/views/wizard/step7_view.js
index b7e2934..9cea52f 100644
--- a/ambari-web/app/views/wizard/step7_view.js
+++ b/ambari-web/app/views/wizard/step7_view.js
@@ -23,5 +23,6 @@ App.WizardStep7View = Em.View.extend({
templateName: require('templates/wizard/step7'),
didInsertElement: function () {
+ App.get('router').set('transitionInProgress', false);
}
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/views/wizard/step8_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step8_view.js b/ambari-web/app/views/wizard/step8_view.js
index 3176f46..c653fdd 100644
--- a/ambari-web/app/views/wizard/step8_view.js
+++ b/ambari-web/app/views/wizard/step8_view.js
@@ -25,6 +25,7 @@ App.WizardStep8View = Em.View.extend({
didInsertElement: function () {
this.get('controller').loadStep();
+ App.get('router').set('transitionInProgress', false);
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/app/views/wizard/step9_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/wizard/step9_view.js b/ambari-web/app/views/wizard/step9_view.js
index 63dca38..e58186b 100644
--- a/ambari-web/app/views/wizard/step9_view.js
+++ b/ambari-web/app/views/wizard/step9_view.js
@@ -222,6 +222,7 @@ App.WizardStep9View = App.TableView.extend({
didInsertElement: function () {
this.onStatus();
this.get('controller').navigateStep();
+ App.get('router').set('transitionInProgress', false);
},
/**
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/test/controllers/wizard/step0_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step0_test.js b/ambari-web/test/controllers/wizard/step0_test.js
index 336f445..4349d04 100644
--- a/ambari-web/test/controllers/wizard/step0_test.js
+++ b/ambari-web/test/controllers/wizard/step0_test.js
@@ -27,13 +27,11 @@ describe('App.WizardStep0Controller', function () {
wizardStep0Controller = App.WizardStep0Controller.create({content: {cluster: {}}});
sinon.stub(App.clusterStatus, 'set', Em.K);
sinon.stub(App.router, 'send', Em.K);
- App.router.nextBtnClickInProgress = false;
});
afterEach(function() {
App.clusterStatus.set.restore();
App.router.send.restore();
- App.router.nextBtnClickInProgress = false;
});
describe('#invalidClusterName', function () {
@@ -78,15 +76,6 @@ describe('App.WizardStep0Controller', function () {
expect(App.router.send.called).to.equal(false);
expect(App.clusterStatus.set.called).to.equal(false);
});
- it('if Next button is clicked multiple times before the next step renders, it must not be processed', function() {
- wizardStep0Controller.set('content.cluster.name', 'tdk');
- wizardStep0Controller.submit();
- expect(App.router.send.calledWith('next')).to.equal(true);
-
- App.router.send.reset();
- wizardStep0Controller.submit();
- expect(App.router.send.called).to.equal(false);
- });
});
-});
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/test/controllers/wizard/step3_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step3_test.js b/ambari-web/test/controllers/wizard/step3_test.js
index 5a4d5af..8c2fb6f 100644
--- a/ambari-web/test/controllers/wizard/step3_test.js
+++ b/ambari-web/test/controllers/wizard/step3_test.js
@@ -42,15 +42,12 @@ describe('App.WizardStep3Controller', function () {
sinon.stub(App.db, 'getDisplayLength', Em.K);
sinon.stub(App.db, 'getFilterConditions').returns([]);
sinon.stub(App.router, 'send', Em.K);
- App.router.nextBtnClickInProgress = false;
});
afterEach(function () {
App.db.getDisplayLength.restore();
App.router.send.restore();
App.db.getFilterConditions.restore();
- App.ajax.send.restore();
- App.router.nextBtnClickInProgress = false;
});
App.TestAliases.testAsComputedGt(getController(), 'isHostHaveWarnings', 'warnings.length', 0);
@@ -1087,19 +1084,6 @@ describe('App.WizardStep3Controller', function () {
expect(c.get('confirmedHosts')).to.eql(bootHosts);
});
- it('if Next button is clicked multiple times before the next step renders, it must not be processed',function(){
- var bootHosts = [
- Em.Object.create({name: 'c1'})
- ];
- c.reopen({isHostHaveWarnings: false, bootHosts: bootHosts, hosts: []});
- c.submit();
- expect(App.router.send.calledWith('next')).to.equal(true);
-
- App.router.send.reset();
- c.submit();
- expect(App.router.send.calledWith('next')).to.equal(false);
- });
-
});
describe('#hostLogPopup', function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/test/controllers/wizard/step4_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step4_test.js b/ambari-web/test/controllers/wizard/step4_test.js
index 611aa27..9227279 100644
--- a/ambari-web/test/controllers/wizard/step4_test.js
+++ b/ambari-web/test/controllers/wizard/step4_test.js
@@ -558,27 +558,6 @@ describe('App.WizardStep4Controller', function () {
})
});
- describe('#submit for Next click', function() {
- var c;
- beforeEach(function(){
- c = App.WizardStep4Controller.create();
- sinon.stub(App.router, 'send', Em.K);
- App.router.nextBtnClickInProgress = false;
- });
- afterEach(function(){
- App.router.nextBtnClickInProgress = false;
- App.router.send.restore();
- });
- it('if Next button is clicked multiple times before the next step renders, it must not be processed',function(){
- c.reopen({isSubmitDisabled:false});
- c.submit();
- expect(App.router.send.calledWith('next')).to.equal(true);
-
- App.router.send.reset();
- c.submit();
- expect(App.router.send.calledWith('next')).to.equal(false);
- });
- });
describe('#dependencies', function() {
var tests = [
{
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/test/controllers/wizard/step5_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step5_test.js b/ambari-web/test/controllers/wizard/step5_test.js
index 2b3b023..e0f8b71 100644
--- a/ambari-web/test/controllers/wizard/step5_test.js
+++ b/ambari-web/test/controllers/wizard/step5_test.js
@@ -25,13 +25,6 @@ describe('App.WizardStep5Controller', function () {
beforeEach(function () {
c = App.WizardStep5Controller.create();
- sinon.stub(App.router, 'send', Em.K);
- App.router.nextBtnClickInProgress = false;
- });
-
- afterEach(function () {
- App.router.send.restore();
- App.router.nextBtnClickInProgress = false;
});
var controller = App.WizardStep5Controller.create();
@@ -1291,17 +1284,4 @@ describe('App.WizardStep5Controller', function () {
});
- describe('#submit',function(){
- it('if Next button is clicked multiple times before the next step renders, it must not be processed',function(){
- c.reopen({isSubmitDisabled:false, submitDisabled:false, useServerValidation:false});
- c.submit();
- expect(App.router.send.calledWith('next')).to.equal(true);
-
- App.router.send.reset();
- c.submit();
- expect(App.router.send.calledWith('next')).to.equal(false);
-
- });
- });
-
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/test/controllers/wizard/step7_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/controllers/wizard/step7_test.js b/ambari-web/test/controllers/wizard/step7_test.js
index 124180f..4a5ee87 100644
--- a/ambari-web/test/controllers/wizard/step7_test.js
+++ b/ambari-web/test/controllers/wizard/step7_test.js
@@ -111,12 +111,9 @@ describe('App.InstallerStep7Controller', function () {
beforeEach(function () {
sinon.stub(App.config, 'setPreDefinedServiceConfigs', Em.K);
installerStep7Controller = getController();
- App.router.nextBtnClickInProgress = false;
});
afterEach(function() {
- App.ajax.send.restore();
- App.router.nextBtnClickInProgress = false;
App.config.setPreDefinedServiceConfigs.restore();
installerStep7Controller.destroy();
});
@@ -335,14 +332,6 @@ describe('App.InstallerStep7Controller', function () {
installerStep7Controller.submit();
expect(installerStep7Controller.get('submitButtonClicked')).to.be.false;
});
- it('if Next button is clicked multiple times before the next step renders, it must not be processed',function(){
- installerStep7Controller.submit();
- expect(App.router.send.calledWith('next')).to.equal(true);
-
- App.router.send.reset();
- installerStep7Controller.submit();
- expect(App.router.send.calledWith('next')).to.equal(false);
- });
});
describe('#getConfigTagsSuccess', function () {
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/test/views/wizard/step4_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/wizard/step4_view_test.js b/ambari-web/test/views/wizard/step4_view_test.js
index 7763c79..11d11dc 100644
--- a/ambari-web/test/views/wizard/step4_view_test.js
+++ b/ambari-web/test/views/wizard/step4_view_test.js
@@ -36,7 +36,7 @@ describe('App.WizardStep4View', function () {
});
it('router.transitionInProgress is set to false', function () {
view.didInsertElement();
- expect(App.get('router').set.calledWith('transitionInProgress', false)).to.be.false;
+ expect(App.get('router').set.calledWith('transitionInProgress', false)).to.be.true;
});
});
});
http://git-wip-us.apache.org/repos/asf/ambari/blob/e9b167e2/ambari-web/test/views/wizard/step7_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/wizard/step7_view_test.js b/ambari-web/test/views/wizard/step7_view_test.js
index 022f1e0..87619d9 100644
--- a/ambari-web/test/views/wizard/step7_view_test.js
+++ b/ambari-web/test/views/wizard/step7_view_test.js
@@ -39,7 +39,7 @@ describe('App.WizardStep7View', function() {
it('should call loadStep', function() {
view.didInsertElement();
- expect(App.get('router').set.calledWith('transitionInProgress', false)).to.be.false;
+ expect(App.get('router').set.calledWith('transitionInProgress', false)).to.be.true;
});
});
-});
+});
\ No newline at end of file