Merge "Fix jasmine test failures due to missing ngRoute, schema-form dep"
This commit is contained in:
commit
e5d467ff1e
@ -97,16 +97,28 @@
|
||||
describe('WEBROOT handling', function() {
|
||||
it('respects WEBROOT by default', function() {
|
||||
var expectedUrl = WEBROOT + 'good';
|
||||
var $scope = {};
|
||||
$httpBackend.when('GET', expectedUrl).respond(200, '');
|
||||
$httpBackend.expect('GET', expectedUrl);
|
||||
api.get('/good');
|
||||
api.get('/good').success(function() {
|
||||
$scope.success = true;
|
||||
});
|
||||
|
||||
$httpBackend.flush();
|
||||
expect($scope.success).toBe(true);
|
||||
});
|
||||
|
||||
it('ignores WEBROOT with external = true flag', function() {
|
||||
var expectedUrl = '/good';
|
||||
var $scope = {};
|
||||
$httpBackend.when('GET', expectedUrl).respond(200, '');
|
||||
$httpBackend.expect('GET', expectedUrl);
|
||||
api.get('/good', {external: true});
|
||||
api.get('/good', {external: true}).success(function() {
|
||||
$scope.success = true;
|
||||
});
|
||||
|
||||
$httpBackend.flush();
|
||||
expect($scope.success).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -31,9 +31,6 @@
|
||||
expect(angular.module('schemaForm')).toBeDefined();
|
||||
});
|
||||
|
||||
it('should build tabs correctly', function() {
|
||||
});
|
||||
|
||||
it('should define messages for all the error codes', function() {
|
||||
// We don't need to check the specifics of each message in a test,
|
||||
// but we should check they all exist
|
||||
|
@ -29,9 +29,6 @@
|
||||
<script src='{{ STATIC_URL }}{{ file }}'></script>
|
||||
{% endfor %}
|
||||
|
||||
<!-- Magic Search library must be after magic-search override widget -->
|
||||
<script src="{{ STATIC_URL }}horizon/lib/magic_search/magic_search.js"></script>
|
||||
|
||||
{% block source %}
|
||||
{% endblock %}
|
||||
|
||||
|
@ -24,8 +24,9 @@
|
||||
* Dashboard module for the resource-browser panel.
|
||||
*/
|
||||
angular
|
||||
.module('horizon.dashboard.developer.resource-browser', [], config)
|
||||
.constant('horizon.dashboard.developer.resource-browser.BASE_ROUTE', 'developer/resource_browser/');
|
||||
.module('horizon.dashboard.developer.resource-browser', ['ngRoute', 'schemaForm'], config)
|
||||
.constant('horizon.dashboard.developer.resource-browser.BASE_ROUTE',
|
||||
'developer/resource_browser/');
|
||||
|
||||
config.$inject = [
|
||||
'$windowProvider',
|
||||
|
@ -199,7 +199,7 @@
|
||||
source_type: 'url', image_url: 'http://somewhere'});
|
||||
});
|
||||
|
||||
it('should raise event even if update meta data fails', function() {
|
||||
it('should raise event even if update metadata fails', function() {
|
||||
var image = { name: 'Test', id: '2' };
|
||||
var failedPromise = function() {
|
||||
return {
|
||||
@ -225,6 +225,9 @@
|
||||
var modalArgs = wizardModalService.modal.calls.argsFor(0)[0];
|
||||
modalArgs.submit();
|
||||
$scope.$apply();
|
||||
|
||||
expect($scope.$emit).toHaveBeenCalledWith(
|
||||
'horizon.app.core.images.IMAGE_METADATA_CHANGED', undefined);
|
||||
});
|
||||
|
||||
it('should destroy the event watchers', function() {
|
||||
|
Loading…
Reference in New Issue
Block a user