Skip to content

Commit

Permalink
Merge pull request #1558 from himdel/keypair-sparkle-fine
Browse files Browse the repository at this point in the history
[FINE] Key Pair (angular) - don't sparkleOff when waiting for task
  • Loading branch information
simaishi committed Jun 19, 2017
2 parents d7394c9 + 534a27e commit a8a122c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,11 @@ ManageIQ.angular.app.controller('keyPairCloudFormController', ['$http', '$scope'

var url = '/auth_key_pair_cloud/create/' + keyPairFormId + '?button=' + buttonName;
$scope.keyPairModel.ems_id = $scope.keyPairModel.ems.id;
if(serializeFields) {
miqService.miqAjaxButton(url, miqService.serializeModel($scope.keyPairModel));
if (serializeFields) {
miqService.miqAjaxButton(url, miqService.serializeModel($scope.keyPairModel), { complete: false });
} else {
miqService.miqAjaxButton(url, false);
miqService.miqAjaxButton(url);
}
miqService.sparkleOff();
};

$scope.cancelClicked = function() {
Expand Down Expand Up @@ -69,4 +68,4 @@ ManageIQ.angular.app.controller('keyPairCloudFormController', ['$http', '$scope'
}

init();
}]);
}]);
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,15 @@ describe('keyPairCloudFormController', function() {
});

it('delegates to miqService.miqAjaxButton', function() {
expect(miqService.miqAjaxButton).toHaveBeenCalledWith('/auth_key_pair_cloud/create/new?button=save', miqService.serializeModel($scope.keyPairModel));
expect(miqService.miqAjaxButton).toHaveBeenCalledWith('/auth_key_pair_cloud/create/new?button=save', miqService.serializeModel($scope.keyPairModel), { complete: false });
});
});

describe('#cancelClicked', function() {
beforeEach(function() {
$httpBackend.flush();
$scope.angularForm = {
$setPristine: function (value){}
$setPristine: function (value) {},
};
$scope.cancelClicked();
});
Expand All @@ -87,7 +87,7 @@ describe('keyPairCloudFormController', function() {
});

it('delegates to miqService.restAjaxButton', function() {
expect(miqService.miqAjaxButton).toHaveBeenCalledWith('/auth_key_pair_cloud/create/new?button=cancel', false);
expect(miqService.miqAjaxButton).toHaveBeenCalledWith('/auth_key_pair_cloud/create/new?button=cancel');
});
});
});

0 comments on commit a8a122c

Please sign in to comment.