parent
b6a1e884df
commit
2ca85394f3
|
@ -1,7 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/nightmare';
|
||||
|
||||
// #1186 repearar e2e ticket.sale, item.regularize.
|
||||
// #1386 e2e Item regularize path
|
||||
xdescribe('Item regularize path', () => {
|
||||
const nightmare = createNightmare();
|
||||
beforeAll(() => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import selectors from '../../helpers/selectors.js';
|
||||
import createNightmare from '../../helpers/nightmare';
|
||||
|
||||
// #1186 repearar e2e ticket.sale, item.regularize.
|
||||
// #1387 e2e Ticket Edit sale path
|
||||
xdescribe('Ticket Edit sale path', () => {
|
||||
const nightmare = createNightmare();
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
// #937 front test datePicker awaiting loopback connector refactor to store dates correctly.
|
||||
xdescribe('Component vnDatePicker', () => {
|
||||
describe('Component vnDatePicker', () => {
|
||||
let controller;
|
||||
let $attrs;
|
||||
let $element;
|
||||
|
|
|
@ -42,5 +42,6 @@
|
|||
"EXTENSION_INVALID_FORMAT": "Invalid extension",
|
||||
"The secret can't be blank": "The secret can't be blank",
|
||||
"Invalid TIN": "Invalid Tax number",
|
||||
"This ticket can't be invoiced": "This ticket can't be invoiced"
|
||||
"This ticket can't be invoiced": "This ticket can't be invoiced",
|
||||
"The value should be a number": "The value should be a number"
|
||||
}
|
|
@ -1,36 +1,34 @@
|
|||
import './index.js';
|
||||
|
||||
xdescribe('Agency', () => {
|
||||
describe('Component vnZoneCard', () => {
|
||||
let $scope;
|
||||
let controller;
|
||||
let $httpBackend;
|
||||
let $stateParams;
|
||||
describe('Agency Component vnZoneCard', () => {
|
||||
let $scope;
|
||||
let controller;
|
||||
let $httpBackend;
|
||||
let $stateParams;
|
||||
|
||||
beforeEach(ngModule('agency'));
|
||||
beforeEach(ngModule('agency'));
|
||||
|
||||
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => {
|
||||
$httpBackend = _$httpBackend_;
|
||||
$scope = $rootScope.$new();
|
||||
$stateParams = {id: 1};
|
||||
controller = $componentController('vnZoneCard', {$scope, $stateParams});
|
||||
}));
|
||||
beforeEach(angular.mock.inject(($componentController, $rootScope, _$httpBackend_) => {
|
||||
$httpBackend = _$httpBackend_;
|
||||
$scope = $rootScope.$new();
|
||||
$stateParams = {id: 1};
|
||||
controller = $componentController('vnZoneCard', {$scope, $stateParams});
|
||||
}));
|
||||
|
||||
describe('getCard()', () => {
|
||||
it(`should make a query and define zone property`, () => {
|
||||
let filter = {
|
||||
include: [
|
||||
{relation: 'warehouse', fields: ['name']},
|
||||
{relation: 'agencyMode', fields: ['name']}
|
||||
]
|
||||
};
|
||||
let json = encodeURIComponent(JSON.stringify(filter));
|
||||
$httpBackend.expectGET(`/agency/api/Zones/1?filter=${json}`).respond({id: 1});
|
||||
controller.getCard();
|
||||
$httpBackend.flush();
|
||||
describe('getCard()', () => {
|
||||
it(`should make a query and define zone property`, () => {
|
||||
let filter = {
|
||||
include: [
|
||||
{relation: 'warehouse', fields: ['name']},
|
||||
{relation: 'agencyMode', fields: ['name']}
|
||||
]
|
||||
};
|
||||
let json = encodeURIComponent(JSON.stringify(filter));
|
||||
$httpBackend.expectGET(`/agency/api/Zones/1?filter=${json}`).respond({id: 1});
|
||||
controller.getCard();
|
||||
$httpBackend.flush();
|
||||
|
||||
expect(controller.zone).toEqual({id: 1});
|
||||
});
|
||||
expect(controller.zone).toEqual({id: 1});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,40 +1,39 @@
|
|||
import './index';
|
||||
import watcher from 'core/mocks/watcher';
|
||||
|
||||
xdescribe('Agency', () => {
|
||||
describe('Component vnZoneCreate', () => {
|
||||
let $scope;
|
||||
let $state;
|
||||
let controller;
|
||||
describe('Agency Component vnZoneCreate', () => {
|
||||
let $scope;
|
||||
let $state;
|
||||
let controller;
|
||||
|
||||
beforeEach(ngModule('agency'));
|
||||
beforeEach(ngModule('agency'));
|
||||
|
||||
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_) => {
|
||||
$scope = $rootScope.$new();
|
||||
$state = _$state_;
|
||||
$scope.watcher = watcher;
|
||||
$scope.watcher.submit = () => {
|
||||
return {
|
||||
then: callback => {
|
||||
callback({data: {id: 1234}});
|
||||
}
|
||||
};
|
||||
beforeEach(angular.mock.inject(($componentController, $rootScope, _$state_) => {
|
||||
$scope = $rootScope.$new();
|
||||
$state = _$state_;
|
||||
$scope.watcher = watcher;
|
||||
$scope.watcher.submit = () => {
|
||||
return {
|
||||
then: callback => {
|
||||
callback({data: {id: 1234}});
|
||||
}
|
||||
};
|
||||
controller = $componentController('vnZoneCreate', {$scope});
|
||||
}));
|
||||
};
|
||||
controller = $componentController('vnZoneCreate', {$scope});
|
||||
}));
|
||||
|
||||
describe('onSubmit()', () => {
|
||||
it(`should call submit() on the watcher then expect a callback`, () => {
|
||||
spyOn($state, 'go');
|
||||
describe('onSubmit()', () => {
|
||||
it(`should call submit() on the watcher then expect a callback`, () => {
|
||||
spyOn($state, 'go');
|
||||
|
||||
controller.zone = {
|
||||
name: 'Zone One'
|
||||
};
|
||||
controller.zone = {
|
||||
name: 'Zone One'
|
||||
};
|
||||
|
||||
controller.onSubmit();
|
||||
controller.onSubmit();
|
||||
|
||||
expect(controller.$state.go).toHaveBeenCalledWith('zone.card.basicData', {id: 1234});
|
||||
});
|
||||
expect(controller.$state.go).toHaveBeenCalledWith('zone.card.location', Object({id: 1234}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -1,41 +1,39 @@
|
|||
import './index.js';
|
||||
|
||||
xdescribe('Agency', () => {
|
||||
describe('Component vnZoneIndex', () => {
|
||||
let $componentController;
|
||||
let controller;
|
||||
describe('Agency Component vnZoneIndex', () => {
|
||||
let $componentController;
|
||||
let controller;
|
||||
|
||||
beforeEach(ngModule('agency'));
|
||||
beforeEach(ngModule('agency'));
|
||||
|
||||
beforeEach(angular.mock.inject(_$componentController_ => {
|
||||
$componentController = _$componentController_;
|
||||
controller = $componentController('vnZoneIndex');
|
||||
}));
|
||||
beforeEach(angular.mock.inject(_$componentController_ => {
|
||||
$componentController = _$componentController_;
|
||||
controller = $componentController('vnZoneIndex');
|
||||
}));
|
||||
|
||||
describe('exprBuilder()', () => {
|
||||
it('should return a formated object with the id in case of search', () => {
|
||||
let param = 'search';
|
||||
let value = 1;
|
||||
let result = controller.exprBuilder(param, value);
|
||||
describe('exprBuilder()', () => {
|
||||
it('should return a formated object with the id in case of search', () => {
|
||||
let param = 'search';
|
||||
let value = 1;
|
||||
let result = controller.exprBuilder(param, value);
|
||||
|
||||
expect(result).toEqual({id: 1});
|
||||
});
|
||||
expect(result).toEqual({id: 1});
|
||||
});
|
||||
|
||||
it('should return a formated object with the warehouseFk in case of warehouseFk', () => {
|
||||
let param = 'warehouseFk';
|
||||
let value = 'Silla';
|
||||
let result = controller.exprBuilder(param, value);
|
||||
it('should return a formated object with the warehouseFk in case of warehouseFk', () => {
|
||||
let param = 'warehouseFk';
|
||||
let value = 'Silla';
|
||||
let result = controller.exprBuilder(param, value);
|
||||
|
||||
expect(result).toEqual({warehouseFk: 'Silla'});
|
||||
});
|
||||
expect(result).toEqual({warehouseFk: 'Silla'});
|
||||
});
|
||||
|
||||
it('should return a formated object with the warehouseFk in case of warehouseFk', () => {
|
||||
let param = 'agencyModeFk';
|
||||
let value = 'My Delivery';
|
||||
let result = controller.exprBuilder(param, value);
|
||||
it('should return a formated object with the warehouseFk in case of agencyModeFk', () => {
|
||||
let param = 'agencyModeFk';
|
||||
let value = 'My Delivery';
|
||||
let result = controller.exprBuilder(param, value);
|
||||
|
||||
expect(result).toEqual({agencyModeFk: 'My Delivery'});
|
||||
});
|
||||
expect(result).toEqual({agencyModeFk: 'My Delivery'});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import './index.js';
|
||||
|
||||
// #1258 ticket.index sumatorio
|
||||
xdescribe('Component vnTicketIndex', () => {
|
||||
let $element;
|
||||
let controller;
|
||||
|
|
Loading…
Reference in New Issue