#841 Client modules mixed with service modules

This commit is contained in:
Juan Ferrer 2018-12-22 11:59:26 +01:00
parent 97e0b33d0d
commit f2fc5b6b2b
723 changed files with 298 additions and 636 deletions

View File

@ -1,18 +0,0 @@
export default {
client:
cb => require.ensure([], () => cb(require('client'))),
route:
cb => require.ensure([], () => cb(require('route'))),
item:
cb => require.ensure([], () => cb(require('item'))),
ticket:
cb => require.ensure([], () => cb(require('ticket'))),
order:
cb => require.ensure([], () => cb(require('order'))),
claim:
cb => require.ensure([], () => cb(require('claim'))),
agency:
cb => require.ensure([], () => cb(require('agency'))),
travel:
cb => require.ensure([], () => cb(require('travel')))
};

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -4,19 +4,14 @@ import template from './index.html';
describe('Component vnChip', () => { describe('Component vnChip', () => {
let $element; let $element;
let $scope; let $scope;
let $httpBackend;
let controller; let controller;
beforeEach(() => { beforeEach(ngModule('vnCore'));
angular.mock.module('client');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _$timeout_) => { beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$element = angular.element(`<div>${template}</div>`); $element = angular.element(`<div>${template}</div>`);
$httpBackend = _$httpBackend_; controller = $componentController('vnChip', {$element, $scope, $transclude: () => {}});
$httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({});
controller = _$componentController_('vnChip', {$element, $scope, $httpBackend, $transclude: () => {}});
})); }));
describe('remove()', () => { describe('remove()', () => {

View File

@ -1,14 +1,10 @@
describe('Component vnDialog', () => { describe('Component vnDialog', () => {
let $componentController;
let $element; let $element;
let controller; let controller;
beforeEach(() => { beforeEach(ngModule('vnCore'));
angular.mock.module('client');
});
beforeEach(angular.mock.inject(_$componentController_ => { beforeEach(angular.mock.inject($componentController => {
$componentController = _$componentController_;
$element = angular.element('<vn-dialog></vn-dialog>'); $element = angular.element('<vn-dialog></vn-dialog>');
controller = $componentController('vnDialog', {$element, $transclude: null}); controller = $componentController('vnDialog', {$element, $transclude: null});
controller.onOpen = jasmine.createSpy('onOpen'); controller.onOpen = jasmine.createSpy('onOpen');

View File

@ -1,22 +1,17 @@
import './index.js'; import './index.js';
describe('Component vnInputNumber', () => { describe('Component vnInputNumber', () => {
let $componentController;
let $scope; let $scope;
let $attrs; let $attrs;
let $timeout; let $timeout;
let $element; let $element;
let controller; let controller;
beforeEach(() => { beforeEach(ngModule('vnCore'));
angular.mock.module('claim');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _$timeout_) => { beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$componentController = _$componentController_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$attrs = {}; $attrs = {};
$timeout = _$timeout_;
$element = angular.element('<div><input><div class="infix invalid validated"><div class="rightIcons"></div></div>'); $element = angular.element('<div><input><div class="infix invalid validated"><div class="rightIcons"></div></div>');
controller = $componentController('vnInputNumber', {$element, $scope, $attrs, $timeout, $transclude: () => {}}); controller = $componentController('vnInputNumber', {$element, $scope, $attrs, $timeout, $transclude: () => {}});
})); }));

View File

@ -1,22 +1,17 @@
import './index.js'; import './index.js';
describe('Component vnInputNumber', () => { describe('Component vnInputNumber', () => {
let $componentController;
let $scope; let $scope;
let $attrs; let $attrs;
let $timeout; let $timeout;
let $element; let $element;
let controller; let controller;
beforeEach(() => { beforeEach(ngModule('vnCore'));
angular.mock.module('claim');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_, _$timeout_) => { beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$componentController = _$componentController_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$attrs = {}; $attrs = {};
$timeout = _$timeout_;
$element = angular.element('<div><input><div class="infix invalid validated"><div class="rightIcons"></div></div>'); $element = angular.element('<div><input><div class="infix invalid validated"><div class="rightIcons"></div></div>');
controller = $componentController('vnInputNumber', {$element, $scope, $attrs, $timeout, $transclude: () => {}}); controller = $componentController('vnInputNumber', {$element, $scope, $attrs, $timeout, $transclude: () => {}});
})); }));

View File

@ -1,16 +1,12 @@
import './multi-check.js'; import './multi-check.js';
describe('Component vnMultiCheck', () => { describe('Component vnMultiCheck', () => {
let $componentController;
let controller; let controller;
let $element; let $element;
beforeEach(() => { beforeEach(ngModule('vnCore'));
angular.mock.module('ticket');
});
beforeEach(angular.mock.inject(_$componentController_ => { beforeEach(angular.mock.inject($componentController => {
$componentController = _$componentController_;
$element = angular.element(`<div class="shown"></div>`); $element = angular.element(`<div class="shown"></div>`);
controller = $componentController('vnMultiCheck', {$element: $element}); controller = $componentController('vnMultiCheck', {$element: $element});
})); }));

View File

@ -1,20 +1,14 @@
import './paging.js'; import './paging.js';
describe('Component vnPaging', () => { describe('Component vnPaging', () => {
let $componentController;
let $scope; let $scope;
let $httpBackend;
let controller; let controller;
beforeEach(() => { beforeEach(ngModule('vnCore'));
angular.mock.module('client');
});
beforeEach(angular.mock.inject((_$componentController_, $rootScope, _$httpBackend_) => { beforeEach(angular.mock.inject(($componentController, $rootScope) => {
$componentController = _$componentController_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; controller = $componentController('vnPaging', {$scope});
controller = $componentController('vnPaging', {$scope, $httpBackend});
})); }));
describe('$onChanges()', () => { describe('$onChanges()', () => {

Some files were not shown because too many files have changed in this diff Show More