angular.mock.injet shorten to inject

This commit is contained in:
Carlos Jimenez Ruiz 2020-07-23 16:46:16 +02:00
parent 7d5dc776c1
commit 4ca004f833
113 changed files with 112 additions and 136 deletions

View File

@ -8,7 +8,7 @@ describe('Component vnChip', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($componentController, $rootScope) => { beforeEach(inject(($componentController, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$element = angular.element(`<div>${template}</div>`); $element = angular.element(`<div>${template}</div>`);
controller = $componentController('vnChip', {$element, $scope, $transclude: () => {}}); controller = $componentController('vnChip', {$element, $scope, $transclude: () => {}});

View File

@ -9,7 +9,7 @@ describe('Component vnDatePicker', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($compile, $rootScope, _$filter_) => { beforeEach(inject(($compile, $rootScope, _$filter_) => {
$filter = _$filter_; $filter = _$filter_;
$element = $compile(`<vn-date-picker></vn-date-picker>`)($rootScope); $element = $compile(`<vn-date-picker></vn-date-picker>`)($rootScope);

View File

@ -5,7 +5,7 @@ describe('Component vnDialog', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($rootScope, $compile) => { beforeEach(inject(($rootScope, $compile) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$element = $compile('<vn-dialog><tpl-body>Body</tpl-body></vn-dialog>')($scope); $element = $compile('<vn-dialog><tpl-body>Body</tpl-body></vn-dialog>')($scope);
controller = $element.controller('vnDialog'); controller = $element.controller('vnDialog');

View File

@ -7,7 +7,7 @@ describe('Component vnInputFile', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($compile, $rootScope) => { beforeEach(inject(($compile, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$element = $compile('<vn-input-file></vn-input-file>')($scope); $element = $compile('<vn-input-file></vn-input-file>')($scope);
controller = $element.controller('vnInputFile'); controller = $element.controller('vnInputFile');

View File

@ -6,7 +6,7 @@ describe('Component vnInputNumber', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($compile, $rootScope) => { beforeEach(inject(($compile, $rootScope) => {
$element = $compile(`<vn-input-number ng-model="model" />`)($rootScope); $element = $compile(`<vn-input-number ng-model="model" />`)($rootScope);
$ctrl = $element.controller('vnInputNumber'); $ctrl = $element.controller('vnInputNumber');
})); }));

View File

@ -7,7 +7,7 @@ describe('Component vnInputTime', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($compile, $rootScope, _$filter_) => { beforeEach(inject(($compile, $rootScope, _$filter_) => {
$filter = _$filter_; $filter = _$filter_;
$element = $compile(`<vn-input-time></vn-input-time>`)($rootScope); $element = $compile(`<vn-input-time></vn-input-time>`)($rootScope);

View File

@ -7,7 +7,7 @@ describe('Component vnMultiCheck', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject($componentController => { beforeEach(inject($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});
controller._model = crudModel; controller._model = crudModel;

View File

@ -6,7 +6,7 @@ describe('Component vnSpinner', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($compile, $rootScope) => { beforeEach(inject(($compile, $rootScope) => {
$element = $compile(`<vn-spinner></vn-spinner>`)($rootScope); $element = $compile(`<vn-spinner></vn-spinner>`)($rootScope);
controller = $element.controller('vnSpinner'); controller = $element.controller('vnSpinner');
})); }));

View File

@ -6,7 +6,7 @@ describe('Component vnStepControl', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($componentController, _$state_) => { beforeEach(inject(($componentController, _$state_) => {
$state = _$state_; $state = _$state_;
jest.spyOn($state, 'go'); jest.spyOn($state, 'go');
controller = $componentController('vnStepControl', {$state: $state}); controller = $componentController('vnStepControl', {$state: $state});

View File

@ -7,7 +7,7 @@ describe('Component vnTable', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($componentController, $rootScope) => { beforeEach(inject(($componentController, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$element = angular.element(` $element = angular.element(`
<vn-table model="model"> <vn-table model="model">

View File

@ -6,7 +6,7 @@ describe('Component vnTextarea', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($compile, $rootScope) => { beforeEach(inject(($compile, $rootScope) => {
$element = $compile(`<vn-textarea></vn-textarea>`)($rootScope); $element = $compile(`<vn-textarea></vn-textarea>`)($rootScope);
$ctrl = $element.controller('vnTextarea'); $ctrl = $element.controller('vnTextarea');
})); }));

View File

@ -7,7 +7,7 @@ describe('Component vnTh', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject($componentController => { beforeEach(inject($componentController => {
$element = angular.element(`<div>${template}</div>`); $element = angular.element(`<div>${template}</div>`);
controller = $componentController('vnTh', {$element: $element}); controller = $componentController('vnTh', {$element: $element});
controller.table = { controller.table = {

View File

@ -12,7 +12,7 @@ describe('Component vnWatcher', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$state_, _$q_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$state_, _$q_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$element = angular.element('<div></div>'); $element = angular.element('<div></div>');
$state = _$state_; $state = _$state_;

View File

@ -7,7 +7,7 @@ describe('Directive zoomImage', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject(($compile, $rootScope) => { beforeEach(inject(($compile, $rootScope) => {
compile = $compile; compile = $compile;
scope = $rootScope.$new(); scope = $rootScope.$new();
})); }));

View File

@ -5,7 +5,7 @@ describe('factory vnModuleLoader', () => {
beforeEach(ngModule('vnCore')); beforeEach(ngModule('vnCore'));
beforeEach(angular.mock.inject((_vnModuleLoader_, _$rootScope_, $httpBackend, _$window_, $q) => { beforeEach(inject((_vnModuleLoader_, _$rootScope_, $httpBackend, _$window_, $q) => {
vnModuleLoader = _vnModuleLoader_; vnModuleLoader = _vnModuleLoader_;
$rootScope = _$rootScope_; $rootScope = _$rootScope_;
$window = _$window_; $window = _$window_;

View File

@ -1,24 +0,0 @@
import './index.js';
describe('Component vnMainMenu', () => {
let $httpBackend;
let controller;
beforeEach(ngModule('salix'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => {
let vnModules = {get: () => {}};
$httpBackend = _$httpBackend_;
controller = $componentController('vnMainMenu', {vnModules});
}));
describe('getCurrentUserName()', () => {
it(`should set the user name property in the controller`, () => {
$httpBackend.expect('GET', `Accounts/getUserData`).respond({name: 'batman'});
controller.getCurrentUserName();
$httpBackend.flush();
expect(controller.$.$root.user.name).toEqual('batman');
});
});
});

View File

@ -6,7 +6,7 @@ describe('Component vnLayout', () => {
beforeEach(ngModule('salix')); beforeEach(ngModule('salix'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => { beforeEach(inject(($componentController, _$httpBackend_) => {
let vnModules = {get: () => {}}; let vnModules = {get: () => {}};
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
let $element = angular.element('<div></div>'); let $element = angular.element('<div></div>');

View File

@ -6,7 +6,7 @@ describe('Component vnLeftMenu', () => {
beforeEach(ngModule('salix')); beforeEach(ngModule('salix'));
beforeEach(angular.mock.inject(($componentController, $state, $window) => { beforeEach(inject(($componentController, $state, $window) => {
$element = angular.element('<div></div>'); $element = angular.element('<div></div>');
$state.current.name = 'client.card.summary'; $state.current.name = 'client.card.summary';
$state.current.data = {moduleIndex: 0}; $state.current.data = {moduleIndex: 0};

View File

@ -7,7 +7,7 @@ describe('Salix', () => {
beforeEach(ngModule('salix')); beforeEach(ngModule('salix'));
beforeEach(angular.mock.inject(($componentController, $rootScope, $httpBackend) => { beforeEach(inject(($componentController, $rootScope, $httpBackend) => {
$httpBackend.expectGET('UserConfigs/getUserConfig'); $httpBackend.expectGET('UserConfigs/getUserConfig');
$scope = $rootScope.$new(); $scope = $rootScope.$new();

View File

@ -9,7 +9,7 @@ describe('claim', () => {
beforeEach(ngModule('claim')); beforeEach(ngModule('claim'));
beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => { beforeEach(inject(($componentController, _$state_, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$state = _$state_; $state = _$state_;
$state.params.id = 1; $state.params.id = 1;

View File

@ -8,7 +8,7 @@ describe('Claim', () => {
beforeEach(ngModule('claim')); beforeEach(ngModule('claim'));
beforeEach(angular.mock.inject(($componentController, $rootScope) => { beforeEach(inject(($componentController, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.watcher = watcher; $scope.watcher = watcher;
const $element = angular.element('<vn-claim-basic-data></vn-claim-basic-data>'); const $element = angular.element('<vn-claim-basic-data></vn-claim-basic-data>');

View File

@ -8,7 +8,7 @@ describe('Claim', () => {
beforeEach(ngModule('claim')); beforeEach(ngModule('claim'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $stateParams) => { beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
let $element = angular.element('<div></div>'); let $element = angular.element('<div></div>');

View File

@ -9,7 +9,7 @@ describe('claim', () => {
beforeEach(ngModule('claim')); beforeEach(ngModule('claim'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.descriptor = { $scope.descriptor = {
show: () => {} show: () => {}

View File

@ -9,7 +9,7 @@ describe('Claim', () => {
beforeEach(ngModule('claim')); beforeEach(ngModule('claim'));
beforeEach(angular.mock.inject(($componentController, $rootScope) => { beforeEach(inject(($componentController, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.watcher = watcher; $scope.watcher = watcher;
$scope.model = crudModel; $scope.model = crudModel;

View File

@ -9,7 +9,7 @@ describe('Claim', () => {
beforeEach(ngModule('claim')); beforeEach(ngModule('claim'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
controller = $componentController('vnClaimPhotos', {$element: null, $scope}); controller = $componentController('vnClaimPhotos', {$element: null, $scope});

View File

@ -9,7 +9,7 @@ describe('Claim', () => {
beforeEach(ngModule('claim')); beforeEach(ngModule('claim'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
const $element = angular.element('<vn-claim-summary></vn-claim-summary>'); const $element = angular.element('<vn-claim-summary></vn-claim-summary>');

View File

@ -11,7 +11,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$state_, _$httpBackend_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$state = _$state_; $state = _$state_;

View File

@ -10,7 +10,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$state_, _$httpBackend_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$state = _$state_; $state = _$state_;

View File

@ -10,7 +10,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$stateParams_, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$stateParams_, _$httpBackend_) => {
$stateParams = _$stateParams_; $stateParams = _$stateParams_;
$stateParams.id = 1; $stateParams.id = 1;
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;

View File

@ -6,7 +6,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope) => { beforeEach(inject(($componentController, $rootScope) => {
let $scope = $rootScope.$new(); let $scope = $rootScope.$new();
const $element = angular.element('<vn-client-balance-index></vn-client-balance-index>'); const $element = angular.element('<vn-client-balance-index></vn-client-balance-index>');
controller = $componentController('vnClientBalanceIndex', {$element, $scope}); controller = $componentController('vnClientBalanceIndex', {$element, $scope});

View File

@ -9,7 +9,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _vnApp_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _vnApp_) => {
let $element = angular.element('<vn-client-billing-data></vn-client-billing-data>'); let $element = angular.element('<vn-client-billing-data></vn-client-billing-data>');
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
vnApp = _vnApp_; vnApp = _vnApp_;

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $stateParams) => { beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
let $element = angular.element('<div></div>'); let $element = angular.element('<div></div>');

View File

@ -10,7 +10,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpParamSerializer_, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpParamSerializer_, _$httpBackend_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpParamSerializer = _$httpParamSerializer_; $httpParamSerializer = _$httpParamSerializer_;
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_) => { beforeEach(inject(($componentController, $rootScope, _$state_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$state = _$state_; $state = _$state_;
$scope.watcher = { $scope.watcher = {

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.form = { $scope.form = {

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-client-credit-insurance-index></vn-client-credit-insurance-index>'); const $element = angular.element('<vn-client-credit-insurance-index></vn-client-credit-insurance-index>');

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
const $element = angular.element('<vn-client-credit-insurance-insurance-index></vn-client-credit-insurance-insurance-index>'); const $element = angular.element('<vn-client-credit-insurance-insurance-index></vn-client-credit-insurance-insurance-index>');

View File

@ -10,7 +10,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope, _$state_) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope, _$state_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.confirmation = {show: () => { $scope.confirmation = {show: () => {
return { return {

View File

@ -9,7 +9,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$httpParamSerializer = _$httpParamSerializer_; $httpParamSerializer = _$httpParamSerializer_;

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
const $element = angular.element('<vn-client-dms-edit></vn-client-dms-edit>'); const $element = angular.element('<vn-client-dms-edit></vn-client-dms-edit>');

View File

@ -9,7 +9,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
controller = $componentController('vnClientDmsIndex', {$element: null, $scope}); controller = $componentController('vnClientDmsIndex', {$element: null, $scope});

View File

@ -10,7 +10,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.watcher = watcher; $scope.watcher = watcher;

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_) => { beforeEach(inject(($componentController, $rootScope, _$state_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$state = _$state_; $state = _$state_;
$scope.watcher = { $scope.watcher = {

View File

@ -7,7 +7,7 @@ describe('Client index', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, _$state_, $rootScope) => { beforeEach(inject(($componentController, _$state_, $rootScope) => {
$state = _$state_; $state = _$state_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-client-index></vn-client-index>'); const $element = angular.element('<vn-client-index></vn-client-index>');

View File

@ -7,7 +7,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, _$state_) => { beforeEach(inject(($componentController, _$state_) => {
$state = _$state_; $state = _$state_;
$state.params.id = '1234'; $state.params.id = '1234';
const $element = angular.element('<vn-note-create></vn-note-create>'); const $element = angular.element('<vn-note-create></vn-note-create>');

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-dialog></vn-dialog>'); const $element = angular.element('<vn-dialog></vn-dialog>');

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_) => { beforeEach(inject(($componentController, $rootScope, _$state_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$state = _$state_; $state = _$state_;
$scope.watcher = { $scope.watcher = {

View File

@ -11,7 +11,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope, _$state_, _$httpParamSerializer_) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope, _$state_, _$httpParamSerializer_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.sampleType = {}; $scope.sampleType = {};
$scope.watcher = { $scope.watcher = {

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
let $scope = $rootScope.$new(); let $scope = $rootScope.$new();
$element = angular.element('<vn-dialog></vn-dialog>'); $element = angular.element('<vn-dialog></vn-dialog>');

View File

@ -8,7 +8,7 @@ describe('Client', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-client-summary></vn-client-summary>'); const $element = angular.element('<vn-client-summary></vn-client-summary>');

View File

@ -8,7 +8,7 @@ describe('Component VnClientWebAccess', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _vnApp_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _vnApp_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
vnApp = _vnApp_; vnApp = _vnApp_;

View File

@ -9,7 +9,7 @@ describe('Component vnClientWebPayment', () => {
beforeEach(ngModule('client')); beforeEach(ngModule('client'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _vnApp_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _vnApp_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.model = crudModel; $scope.model = crudModel;
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;

View File

@ -9,7 +9,7 @@ describe('component vnEntrySummary', () => {
$translateProvider.translations('en', {}); $translateProvider.translations('en', {});
})); }));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element(`<vn-entry-summary></vn-entry-summary>`); const $element = angular.element(`<vn-entry-summary></vn-entry-summary>`);

View File

@ -8,7 +8,7 @@ describe('InvoiceOut', () => {
beforeEach(ngModule('invoiceOut')); beforeEach(ngModule('invoiceOut'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-invoice-out-summary></vn-invoice-out-summary>'); const $element = angular.element('<vn-invoice-out-summary></vn-invoice-out-summary>');

View File

@ -8,7 +8,7 @@ describe('vnItemBasicData', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-item-basic-data></vn-item-basic-data>'); const $element = angular.element('<vn-item-basic-data></vn-item-basic-data>');

View File

@ -8,7 +8,7 @@ describe('ItemBotanical', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-item-botanical></vn-item-botanical>'); const $element = angular.element('<vn-item-botanical></vn-item-botanical>');

View File

@ -8,7 +8,7 @@ describe('Item', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $stateParams) => { beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
let $element = angular.element('<div></div>'); let $element = angular.element('<div></div>');

View File

@ -8,7 +8,7 @@ describe('Item', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_) => { beforeEach(inject(($componentController, $rootScope, _$state_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$state = _$state_; $state = _$state_;
$scope.watcher = { $scope.watcher = {

View File

@ -8,7 +8,7 @@ describe('Item', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject(($componentController, $rootScope) => { beforeEach(inject(($componentController, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-item-diary></vn-item-diary>'); const $element = angular.element('<vn-item-diary></vn-item-diary>');
controller = $componentController('vnItemDiary', {$element, $scope}); controller = $componentController('vnItemDiary', {$element, $scope});

View File

@ -8,7 +8,7 @@ describe('Item', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-item-index></vn-item-index>'); const $element = angular.element('<vn-item-index></vn-item-index>');

View File

@ -8,7 +8,7 @@ describe('Item', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
controller = $componentController('vnItemRequest', {$element: null, $scope}); controller = $componentController('vnItemRequest', {$element: null, $scope});

View File

@ -7,7 +7,7 @@ describe('Item', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject($componentController => { beforeEach(inject($componentController => {
$element = angular.element(`<div></div>`); $element = angular.element(`<div></div>`);
controller = $componentController('vnItemSearchPanel', {$element}); controller = $componentController('vnItemSearchPanel', {$element});
})); }));

View File

@ -8,7 +8,7 @@ describe('Item', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-item-summary></vn-item-summary>'); const $element = angular.element('<vn-item-summary></vn-item-summary>');

View File

@ -8,7 +8,7 @@ describe('Item', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject(($componentController, $rootScope) => { beforeEach(inject(($componentController, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.model = crudModel; $scope.model = crudModel;
$scope.model.data = [{priority: 1}, {priority: 2}, {priority: 1}]; $scope.model.data = [{priority: 1}, {priority: 2}, {priority: 1}];

View File

@ -9,7 +9,7 @@ describe('Item', () => {
beforeEach(ngModule('item')); beforeEach(ngModule('item'));
beforeEach(angular.mock.inject((_$httpBackend_, $rootScope, _$stateParams_, $compile) => { beforeEach(inject((_$httpBackend_, $rootScope, _$stateParams_, $compile) => {
$stateParams = _$stateParams_; $stateParams = _$stateParams_;
$stateParams.id = 1; $stateParams.id = 1;
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;

View File

@ -8,7 +8,7 @@ describe('Order', () => {
beforeEach(ngModule('order')); beforeEach(ngModule('order'));
beforeEach(angular.mock.inject(($compile, _$httpBackend_, $rootScope) => { beforeEach(inject(($compile, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();

View File

@ -9,7 +9,7 @@ describe('Order', () => {
beforeEach(ngModule('order')); beforeEach(ngModule('order'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $stateParams) => { beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
let $element = angular.element('<div></div>'); let $element = angular.element('<div></div>');

View File

@ -10,7 +10,7 @@ describe('Order', () => {
beforeEach(ngModule('order')); beforeEach(ngModule('order'));
beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$state_, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.model = crudModel; $scope.model = crudModel;

View File

@ -8,7 +8,7 @@ describe('Order', () => {
beforeEach(ngModule('order')); beforeEach(ngModule('order'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, _vnApp_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, _vnApp_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-order-create-card></vn-order-create-card>'); const $element = angular.element('<vn-order-create-card></vn-order-create-card>');

View File

@ -7,7 +7,7 @@ describe('Order', () => {
beforeEach(ngModule('order')); beforeEach(ngModule('order'));
beforeEach(angular.mock.inject(($componentController, $rootScope) => { beforeEach(inject(($componentController, $rootScope) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.card = {createOrder: () => {}}; $scope.card = {createOrder: () => {}};
const $element = angular.element('<vn-order-create></vn-order-create>'); const $element = angular.element('<vn-order-create></vn-order-create>');

View File

@ -19,7 +19,7 @@ describe('Order', () => {
beforeEach(ngModule('order')); beforeEach(ngModule('order'));
beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_) => { beforeEach(inject(($componentController, _$state_, _$httpBackend_) => {
$state = _$state_; $state = _$state_;
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;

View File

@ -7,7 +7,7 @@ describe('Order', () => {
beforeEach(ngModule('order')); beforeEach(ngModule('order'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => { beforeEach(inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
const $element = angular.element('<vn-order-summary></vn-order-summary>'); const $element = angular.element('<vn-order-summary></vn-order-summary>');
controller = $componentController('vnOrderSummary', {$element}); controller = $componentController('vnOrderSummary', {$element});

View File

@ -8,7 +8,7 @@ describe('Order', () => {
beforeEach(ngModule('order')); beforeEach(ngModule('order'));
beforeEach(angular.mock.inject(($componentController, $state, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, $state, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.model = { $scope.model = {

View File

@ -7,7 +7,7 @@ describe('Route', () => {
beforeEach(ngModule('route')); beforeEach(ngModule('route'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => { beforeEach(inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
const $element = angular.element('<vn-route-summary></vn-route-summary>'); const $element = angular.element('<vn-route-summary></vn-route-summary>');
controller = $componentController('vnRouteSummary', {$element}); controller = $componentController('vnRouteSummary', {$element});

View File

@ -7,7 +7,7 @@ describe('Route', () => {
beforeEach(ngModule('route')); beforeEach(ngModule('route'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
const $element = angular.element('<vn-route-tickets></vn-route-tickets>'); const $element = angular.element('<vn-route-tickets></vn-route-tickets>');

View File

@ -8,7 +8,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, _$httpParamSerializer_) => { beforeEach(inject(($componentController, _$httpBackend_, _$httpParamSerializer_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$httpParamSerializer = _$httpParamSerializer_; $httpParamSerializer = _$httpParamSerializer_;
const $element = angular.element('<vn-ticket-basic-data-step-one></vn-ticket-basic-data-step-one>'); const $element = angular.element('<vn-ticket-basic-data-step-one></vn-ticket-basic-data-step-one>');

View File

@ -6,7 +6,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject($componentController => { beforeEach(inject($componentController => {
const $element = angular.element('<vn-ticket-basic-data-step-two><vn-ticket-basic-data-step-two>'); const $element = angular.element('<vn-ticket-basic-data-step-two><vn-ticket-basic-data-step-two>');
controller = $componentController('vnTicketBasicDataStepTwo', {$element}); controller = $componentController('vnTicketBasicDataStepTwo', {$element});
})); }));

View File

@ -12,7 +12,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $stateParams) => { beforeEach(inject(($componentController, _$httpBackend_, $stateParams) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
let $element = angular.element('<div></div>'); let $element = angular.element('<div></div>');

View File

@ -7,7 +7,7 @@ describe('ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, $rootScope, $state) => { beforeEach(inject(($componentController, $rootScope, $state) => {
$state.params.id = '1'; $state.params.id = '1';
let $scope = $rootScope.$new(); let $scope = $rootScope.$new();
$scope.model = crudModel; $scope.model = crudModel;

View File

@ -25,7 +25,7 @@ describe('Ticket Component vnTicketDescriptor', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, _$state_) => { beforeEach(inject(($componentController, _$httpBackend_, _$state_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$httpBackend.whenGET(`Tickets/${ticket.id}/canHaveStowaway`).respond(true); $httpBackend.whenGET(`Tickets/${ticket.id}/canHaveStowaway`).respond(true);
$httpBackend.whenGET(`Tickets/1/isEditable`).respond(true); $httpBackend.whenGET(`Tickets/1/isEditable`).respond(true);

View File

@ -9,7 +9,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$httpParamSerializer = _$httpParamSerializer_; $httpParamSerializer = _$httpParamSerializer_;

View File

@ -8,7 +8,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
const $element = angular.element('<vn-ticket-dms-edit></vn-ticket-dms-edit>'); const $element = angular.element('<vn-ticket-dms-edit></vn-ticket-dms-edit>');

View File

@ -8,7 +8,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => { beforeEach(inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
controller = $componentController('vnTicketDmsIndex', {$element: null}); controller = $componentController('vnTicketDmsIndex', {$element: null});
controller.$.model = crudModel; controller.$.model = crudModel;

View File

@ -8,7 +8,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.model = { $scope.model = {

View File

@ -11,7 +11,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$state_, _$httpBackend_) => {
const ticket = { const ticket = {
id: 1, id: 1,
clientFk: 101, clientFk: 101,

View File

@ -8,7 +8,7 @@ describe('Ticket component vnTicketService', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();

View File

@ -7,7 +7,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
let $scope = $rootScope.$new(); let $scope = $rootScope.$new();
const $element = angular.element('<vn-dialog></vn-dialog>'); const $element = angular.element('<vn-dialog></vn-dialog>');

View File

@ -7,7 +7,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_) => { beforeEach(inject(($componentController, _$httpBackend_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
const $element = angular.element('<vn-ticket-summary></vn-ticket-summary>'); const $element = angular.element('<vn-ticket-summary></vn-ticket-summary>');
controller = $componentController('vnTicketSummary', {$element}); controller = $componentController('vnTicketSummary', {$element});

View File

@ -7,7 +7,7 @@ describe('Ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $translate, vnApp) => { beforeEach(inject(($componentController, _$httpBackend_, $translate, vnApp) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
const $element = angular.element('<vn-ticket-tracking-edit></vn-ticket-tracking-edit>'); const $element = angular.element('<vn-ticket-tracking-edit></vn-ticket-tracking-edit>');
controller = $componentController('vnTicketTrackingEdit', {$element}); controller = $componentController('vnTicketTrackingEdit', {$element});

View File

@ -9,7 +9,7 @@ describe('ticket', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$state_, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$state_, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$scope.model = {data: [{id: 1}, {id: 2}], accept: () => { $scope.model = {data: [{id: 1}, {id: 2}], accept: () => {

View File

@ -8,7 +8,7 @@ describe('ticket weekly', () => {
beforeEach(ngModule('ticket')); beforeEach(ngModule('ticket'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => { beforeEach(inject(($componentController, _$httpBackend_, $rootScope) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
const $scope = $rootScope.$new(); const $scope = $rootScope.$new();
const $element = angular.element('<vn-ticket-weekly-index></vn-ticket-weekly-index>'); const $element = angular.element('<vn-ticket-weekly-index></vn-ticket-weekly-index>');

View File

@ -7,7 +7,7 @@ describe('Travel Component vnTravelBasicData', () => {
$translateProvider.translations('en', {}); $translateProvider.translations('en', {});
})); }));
beforeEach(angular.mock.inject($componentController => { beforeEach(inject($componentController => {
const $element = angular.element('<vn-travel-basic-data></vn-travel-basic-data>'); const $element = angular.element('<vn-travel-basic-data></vn-travel-basic-data>');
controller = $componentController('vnTravelBasicData', {$element}); controller = $componentController('vnTravelBasicData', {$element});
controller.card = {reload: () => {}}; controller.card = {reload: () => {}};

View File

@ -8,7 +8,7 @@ describe('Travel Component vnTravelCreate', () => {
beforeEach(ngModule('travel')); beforeEach(ngModule('travel'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_) => { beforeEach(inject(($componentController, $rootScope, _$state_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$state = _$state_; $state = _$state_;
$scope.watcher = watcher; $scope.watcher = watcher;

View File

@ -11,7 +11,7 @@ describe('Travel Component vnTravelIndex', () => {
beforeEach(ngModule('travel')); beforeEach(ngModule('travel'));
beforeEach(angular.mock.inject($componentController => { beforeEach(inject($componentController => {
const $element = angular.element('<vn-travel-index></vn-travel-index>'); const $element = angular.element('<vn-travel-index></vn-travel-index>');
controller = $componentController('vnTravelIndex', {$element}); controller = $componentController('vnTravelIndex', {$element});
controller.$.summary = {show: jasmine.createSpy('show')}; controller.$.summary = {show: jasmine.createSpy('show')};

View File

@ -5,7 +5,7 @@ describe('Travel Component vnTravel', () => {
beforeEach(ngModule('travel')); beforeEach(ngModule('travel'));
beforeEach(angular.mock.inject($componentController => { beforeEach(inject($componentController => {
let $element = angular.element(`<div></div>`); let $element = angular.element(`<div></div>`);
controller = $componentController('vnTravel', {$element}); controller = $componentController('vnTravel', {$element});
})); }));

View File

@ -10,7 +10,7 @@ describe('component vnTravelSummary', () => {
$translateProvider.translations('en', {}); $translateProvider.translations('en', {});
})); }));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$httpParamSerializer = _$httpParamSerializer_; $httpParamSerializer = _$httpParamSerializer_;
$scope = $rootScope.$new(); $scope = $rootScope.$new();

View File

@ -10,7 +10,7 @@ describe('Ticket', () => {
beforeEach(ngModule('travel')); beforeEach(ngModule('travel'));
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, _$httpParamSerializer_) => { beforeEach(inject(($componentController, _$httpBackend_, _$httpParamSerializer_) => {
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$httpParamSerializer = _$httpParamSerializer_; $httpParamSerializer = _$httpParamSerializer_;
const $element = angular.element('<vn-travel-thermograph-create></vn-travel-thermograph-create>'); const $element = angular.element('<vn-travel-thermograph-create></vn-travel-thermograph-create>');

View File

@ -10,7 +10,7 @@ describe('Worker', () => {
beforeEach(ngModule('travel')); beforeEach(ngModule('travel'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { beforeEach(inject(($componentController, $rootScope, _$httpBackend_, _$httpParamSerializer_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$httpParamSerializer = _$httpParamSerializer_; $httpParamSerializer = _$httpParamSerializer_;

View File

@ -10,7 +10,7 @@ describe('Worker', () => {
beforeEach(ngModule('worker')); beforeEach(ngModule('worker'));
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpParamSerializer_, _$httpBackend_) => { beforeEach(inject(($componentController, $rootScope, _$httpParamSerializer_, _$httpBackend_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$httpParamSerializer = _$httpParamSerializer_; $httpParamSerializer = _$httpParamSerializer_;

View File

@ -10,7 +10,7 @@ describe('Client', () => {
beforeEach(ngModule('worker')); beforeEach(ngModule('worker'));
beforeEach(angular.mock.inject(($compile, $rootScope, _$httpBackend_, _$httpParamSerializer_) => { beforeEach(inject(($compile, $rootScope, _$httpBackend_, _$httpParamSerializer_) => {
$scope = $rootScope.$new(); $scope = $rootScope.$new();
$httpBackend = _$httpBackend_; $httpBackend = _$httpBackend_;
$httpParamSerializer = _$httpParamSerializer_; $httpParamSerializer = _$httpParamSerializer_;

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