From 2ca85394f3d322cfa3350c9b0b4395b5961f2b99 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Fri, 26 Apr 2019 16:10:51 +0200 Subject: [PATCH] #1385 excluded tests --- .../04-item-module/09_regularize.spec.js | 2 +- .../05-ticket-module/07_edit_sale.spec.js | 2 +- .../date-picker/date-picker.spec.js | 3 +- loopback/locale/en.json | 3 +- modules/agency/front/card/index.spec.js | 52 +++++++++--------- modules/agency/front/create/index.spec.js | 53 +++++++++--------- modules/agency/front/index/index.spec.js | 54 +++++++++---------- modules/ticket/front/index/index.spec.js | 2 +- 8 files changed, 83 insertions(+), 88 deletions(-) diff --git a/e2e/paths/04-item-module/09_regularize.spec.js b/e2e/paths/04-item-module/09_regularize.spec.js index 23d8904e4..7b5f71009 100644 --- a/e2e/paths/04-item-module/09_regularize.spec.js +++ b/e2e/paths/04-item-module/09_regularize.spec.js @@ -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(() => { diff --git a/e2e/paths/05-ticket-module/07_edit_sale.spec.js b/e2e/paths/05-ticket-module/07_edit_sale.spec.js index f339f6a57..3deffa33b 100644 --- a/e2e/paths/05-ticket-module/07_edit_sale.spec.js +++ b/e2e/paths/05-ticket-module/07_edit_sale.spec.js @@ -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(); diff --git a/front/core/components/date-picker/date-picker.spec.js b/front/core/components/date-picker/date-picker.spec.js index 0a81136a0..55bfb0f83 100644 --- a/front/core/components/date-picker/date-picker.spec.js +++ b/front/core/components/date-picker/date-picker.spec.js @@ -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; diff --git a/loopback/locale/en.json b/loopback/locale/en.json index 26252d825..f7792a56a 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -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" } \ No newline at end of file diff --git a/modules/agency/front/card/index.spec.js b/modules/agency/front/card/index.spec.js index 15e8fada9..072ce5175 100644 --- a/modules/agency/front/card/index.spec.js +++ b/modules/agency/front/card/index.spec.js @@ -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}); }); }); }); diff --git a/modules/agency/front/create/index.spec.js b/modules/agency/front/create/index.spec.js index 70e061612..5b2a022f8 100644 --- a/modules/agency/front/create/index.spec.js +++ b/modules/agency/front/create/index.spec.js @@ -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})); }); }); }); + diff --git a/modules/agency/front/index/index.spec.js b/modules/agency/front/index/index.spec.js index 2e5e5d013..8ded387bd 100644 --- a/modules/agency/front/index/index.spec.js +++ b/modules/agency/front/index/index.spec.js @@ -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'}); }); }); }); diff --git a/modules/ticket/front/index/index.spec.js b/modules/ticket/front/index/index.spec.js index b3d3a0f02..bc246ef21 100644 --- a/modules/ticket/front/index/index.spec.js +++ b/modules/ticket/front/index/index.spec.js @@ -1,5 +1,5 @@ import './index.js'; - +// #1258 ticket.index sumatorio xdescribe('Component vnTicketIndex', () => { let $element; let controller;