From 09c98368b8b914e4d0fcd79f1fd46540d396bc81 Mon Sep 17 00:00:00 2001 From: Joan Date: Thu, 24 May 2018 15:02:38 +0200 Subject: [PATCH] Tests fix && renamed .list to .index states --- client/client/src/address/create/address-create.spec.js | 4 ++-- client/client/src/address/edit/address-edit.spec.js | 4 ++-- .../credit-insurance/index/credit-insurance-index.spec.js | 4 ++-- .../insurance/index/credit-insurance-list.spec.js | 4 ++-- client/client/src/credit/create/credit-create.spec.js | 2 +- client/client/src/greuge/create/greuge-create.spec.js | 2 +- client/client/src/note/index/notes.spec.js | 6 +++--- client/client/src/recovery/create/index.js | 2 +- client/client/src/recovery/create/recovery-create.spec.js | 2 +- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/client/client/src/address/create/address-create.spec.js b/client/client/src/address/create/address-create.spec.js index da18ee783..cbd0ebabe 100644 --- a/client/client/src/address/create/address-create.spec.js +++ b/client/client/src/address/create/address-create.spec.js @@ -1,7 +1,7 @@ import './index'; describe('Client', () => { - describe('Component vnAddressCreate', () => { + describe('Component vnClientAddressCreate', () => { let controller; let $componentController; let $state; @@ -14,7 +14,7 @@ describe('Client', () => { $componentController = _$componentController_; $state = _$state_; $state.params.id = '1234'; - controller = $componentController('vnAddressCreate', {$state}); + controller = $componentController('vnClientAddressCreate', {$state}); })); it('should define and set address property', () => { diff --git a/client/client/src/address/edit/address-edit.spec.js b/client/client/src/address/edit/address-edit.spec.js index 16e981c6b..c48108b99 100644 --- a/client/client/src/address/edit/address-edit.spec.js +++ b/client/client/src/address/edit/address-edit.spec.js @@ -1,7 +1,7 @@ import './index'; describe('Client', () => { - describe('Component vnAddressEdit', () => { + describe('Component vnClientAddressEdit', () => { let $componentController; let $state; let controller; @@ -16,7 +16,7 @@ describe('Client', () => { $state = _$state_; $httpBackend = _$httpBackend_; $state.params.addressId = '1'; - controller = $componentController('vnAddressEdit', {$state: $state}); + controller = $componentController('vnClientAddressEdit', {$state: $state}); })); it('should define and set address property', () => { diff --git a/client/client/src/credit-insurance/index/credit-insurance-index.spec.js b/client/client/src/credit-insurance/index/credit-insurance-index.spec.js index 9f9743318..2a87132be 100644 --- a/client/client/src/credit-insurance/index/credit-insurance-index.spec.js +++ b/client/client/src/credit-insurance/index/credit-insurance-index.spec.js @@ -1,7 +1,7 @@ import './index'; describe('Client', () => { - describe('Component vnClientCreditClassificationList', () => { + describe('Component vnClientCreditInsuranceIndex', () => { let $componentController; let controller; let $httpBackend; @@ -13,7 +13,7 @@ describe('Client', () => { beforeEach(angular.mock.inject((_$componentController_, _$httpBackend_) => { $componentController = _$componentController_; $httpBackend = _$httpBackend_; - controller = $componentController('vnClientCreditClassificationList'); + controller = $componentController('vnClientCreditInsuranceIndex'); })); describe('_getClassifications()', () => { diff --git a/client/client/src/credit-insurance/insurance/index/credit-insurance-list.spec.js b/client/client/src/credit-insurance/insurance/index/credit-insurance-list.spec.js index a9b28d6ec..a6723d3b6 100644 --- a/client/client/src/credit-insurance/insurance/index/credit-insurance-list.spec.js +++ b/client/client/src/credit-insurance/insurance/index/credit-insurance-list.spec.js @@ -1,7 +1,7 @@ import './index'; describe('Client', () => { - describe('Component vnClientCreditInsuranceList', () => { + describe('Component vnClientCreditInsuranceInsuranceIndex', () => { let $componentController; let controller; let $httpBackend; @@ -14,7 +14,7 @@ describe('Client', () => { $componentController = _$componentController_; let $state = {params: {classificationId: 1}}; $httpBackend = _$httpBackend_; - controller = $componentController('vnClientCreditInsuranceList', {$state: $state}); + controller = $componentController('vnClientCreditInsuranceInsuranceIndex', {$state: $state}); })); it('should perform a query to GET credit the credit classification', () => { diff --git a/client/client/src/credit/create/credit-create.spec.js b/client/client/src/credit/create/credit-create.spec.js index a22521426..cff48be7d 100644 --- a/client/client/src/credit/create/credit-create.spec.js +++ b/client/client/src/credit/create/credit-create.spec.js @@ -78,7 +78,7 @@ describe('Client', () => { client.credit = 1; controller.addCredit(); - expect(controller.$state.go).toHaveBeenCalledWith('client.card.credit.list'); + expect(controller.$state.go).toHaveBeenCalledWith('client.card.credit.index'); }); }); }); diff --git a/client/client/src/greuge/create/greuge-create.spec.js b/client/client/src/greuge/create/greuge-create.spec.js index db2167742..cd7bc8e0a 100644 --- a/client/client/src/greuge/create/greuge-create.spec.js +++ b/client/client/src/greuge/create/greuge-create.spec.js @@ -32,7 +32,7 @@ describe('Client', () => { spyOn($state, 'go'); controller.onSubmit(); - expect(controller.$state.go).toHaveBeenCalledWith('client.card.greuge.list'); + expect(controller.$state.go).toHaveBeenCalledWith('client.card.greuge.index'); }); }); }); diff --git a/client/client/src/note/index/notes.spec.js b/client/client/src/note/index/notes.spec.js index ea8a1884e..017d9aea0 100644 --- a/client/client/src/note/index/notes.spec.js +++ b/client/client/src/note/index/notes.spec.js @@ -1,7 +1,7 @@ import './index'; describe('Client', () => { - describe('Component vnClientNotes', () => { + describe('Component vnClientNote', () => { let $componentController; let $state; let $httpBackend; @@ -16,7 +16,7 @@ describe('Client', () => { $state = _$state_; $httpBackend = _$httpBackend_; $httpBackend.when('GET', /\/locale\/\w+\/[a-z]{2}\.json/).respond({}); - controller = $componentController('vnClientNotes', {$state: $state}); + controller = $componentController('vnClientNote', {$state: $state}); })); describe('$onChanges()', () => { @@ -51,7 +51,7 @@ describe('Client', () => { spyOn(controller.$state, 'go'); controller.newObservation(); - expect(controller.$state.go).toHaveBeenCalledWith('client.card.notes.create', Object({id: '1234'})); + expect(controller.$state.go).toHaveBeenCalledWith('client.card.note.create', Object({id: '1234'})); }); }); }); diff --git a/client/client/src/recovery/create/index.js b/client/client/src/recovery/create/index.js index 71ec7acc7..873d0e947 100644 --- a/client/client/src/recovery/create/index.js +++ b/client/client/src/recovery/create/index.js @@ -12,7 +12,7 @@ class Controller { this.recovery.clientFk = this.$state.params.id; this.$.watcher.submit().then( () => { - this.$state.go('client.card.recovery.list'); + this.$state.go('client.card.recovery.index'); } ); } diff --git a/client/client/src/recovery/create/recovery-create.spec.js b/client/client/src/recovery/create/recovery-create.spec.js index 5561d6f7d..5ff1582d8 100644 --- a/client/client/src/recovery/create/recovery-create.spec.js +++ b/client/client/src/recovery/create/recovery-create.spec.js @@ -32,7 +32,7 @@ describe('Client', () => { spyOn($state, 'go'); controller.onSubmit(); - expect(controller.$state.go).toHaveBeenCalledWith('client.card.recovery.list'); + expect(controller.$state.go).toHaveBeenCalledWith('client.card.recovery.index'); }); }); });