"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "horizon/static/framework/widgets/load-edit/load-edit.directive.spec.js" between
horizon-22.1.0.tar.gz and horizon-23.0.0.tar.gz

About: OpenStack Horizon (Optional Service: Dashboard) provides a web-based self-service portal to interact with underlying OpenStack services, such as launching an instance, assigning IP addresses and configuring access controls.
The "Zed" series (latest release).

load-edit.directive.spec.js  (horizon-22.1.0):load-edit.directive.spec.js  (horizon-23.0.0)
skipping to change at line 42 skipping to change at line 42
return readFileService; return readFileService;
}; };
}); });
})); }));
beforeEach(inject(function ($injector) { beforeEach(inject(function ($injector) {
$scope = $injector.get('$rootScope').$new(); $scope = $injector.get('$rootScope').$new();
$q = $injector.get('$q'); $q = $injector.get('$q');
$compile = $injector.get('$compile'); $compile = $injector.get('$compile');
key = 'elementKey'; key = 'elementKey';
element = $compile( element = $compile(
'<load-edit title="{}" model="{}" max-bytes="{}" key="' + key + '" ' + '<load-edit title="{}" model="{}" model-default-value="{}"' +
'required="true" rows="8"></load-edit>' 'max-bytes="{}" key="' + key + '" ' + 'required="true" rows="8">' +
'</load-edit>'
)($scope); )($scope);
$scope.$apply(); $scope.$apply();
})); }));
describe('onTextAreaChange listener', function() { describe('onTextAreaChange listener', function() {
var textarea; var textarea;
beforeEach(function() { beforeEach(function() {
textarea = element.find('textarea'); textarea = element.find('textarea');
}); });
skipping to change at line 78 skipping to change at line 79
expect(element.isolateScope().textModified).toBe(false); expect(element.isolateScope().textModified).toBe(false);
}); });
it('should set userInput to the value of the textarea', function() { it('should set userInput to the value of the textarea', function() {
textarea.val('user input'); textarea.val('user input');
textarea.trigger('input'); textarea.trigger('input');
$scope.$apply(); $scope.$apply();
expect(element.isolateScope().model).toBe('user input'); expect(element.isolateScope().model).toBe('user input');
}); });
it('should update text area with default user data', function () {
element.isolateScope().modelDefaultValue = 'default user data';
$scope.$apply();
textarea.trigger('input');
$scope.$apply();
expect(element.isolateScope().model).toBe('default user data');
});
}); });
describe('onFileLoadListener', function() { describe('onFileLoadListener', function() {
it('should set the value of textContent to the file contents', function(do ne) { it('should set the value of textContent to the file contents', function(do ne) {
var contentPromise = $q.defer(); var contentPromise = $q.defer();
readFileService.readTextFile = function() { readFileService.readTextFile = function() {
return contentPromise.promise; return contentPromise.promise;
}; };
var fileInput = element.find('input[type="file"]'); var fileInput = element.find('input[type="file"]');
 End of changes. 2 change blocks. 
2 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)