From 5653a39e3bf8796a47569b023db6c49c246fe9c0 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 9 Aug 2023 13:10:05 +0200 Subject: [PATCH 1/3] fix fixtures names, socialnames streets --- db/dump/fixtures.sql | 38 +++++++++---------- .../02-client/02_edit_basic_data.spec.js | 4 +- e2e/paths/02-client/19_summary.spec.js | 4 +- e2e/paths/02-client/21_defaulter.spec.js | 2 +- .../15_create_ticket_from_client.spec.js | 2 +- .../components/autocomplete/index.spec.js | 2 +- .../client/specs/extendedListFilter.spec.js | 18 ++++----- .../back/methods/client/specs/filter.spec.js | 18 ++++----- .../back/methods/client/specs/getCard.spec.js | 4 +- .../client/specs/lastActiveTickets.spec.js | 2 +- .../back/methods/client/specs/summary.spec.js | 2 +- .../methods/client/specs/transactions.spec.js | 2 +- .../methods/defaulter/specs/filter.spec.js | 2 +- .../client/front/address/index/index.spec.js | 4 +- modules/client/front/web-access/index.spec.js | 2 +- .../ticket-weekly/specs/filter.spec.js | 4 +- 16 files changed, 55 insertions(+), 55 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 7a572fb04..c278b4e3b 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -103,7 +103,7 @@ INSERT INTO `hedera`.`tpvConfig`(`id`, `currency`, `terminal`, `transactionType` INSERT INTO `account`.`user`(`id`,`name`,`nickname`, `password`,`role`,`active`,`email`,`lang`, `image`) VALUES - (1101, 'BruceWayne', 'Bruce Wayne', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'BruceWayne@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'), + (1101, 'BruceWayne', 'BRUCE WAYNE', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'BruceWayne@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'), (1102, 'PetterParker', 'Petter Parker', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'PetterParker@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'), (1103, 'ClarkKent', 'Clark Kent', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'ClarkKent@mydomain.com', 'fr', 'e7723f0b24ff05b32ed09d95196f2f29'), (1104, 'TonyStark', 'Tony Stark', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'TonyStark@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'), @@ -190,11 +190,11 @@ UPDATE `vn`.`sector` SET mainPrinterFk = 1 WHERE id = 1; INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`, `userFk`,`bossFk`, `phone`) VALUES - (1106, 'LGN', 'David Charles', 'Haller', 1106, 19, 432978106), - (1107, 'ANT', 'Hank' , 'Pym' , 1107, 19, 432978107), - (1108, 'DCX', 'Charles' , 'Xavier', 1108, 19, 432978108), - (1109, 'HLK', 'Bruce' , 'Banner', 1109, 19, 432978109), - (1110, 'JJJ', 'Jessica' , 'Jones' , 1110, 19, 432978110); + (1106, 'LGN', 'DAVID CHARLES', 'HALLER', 1106, 19, 432978106), + (1107, 'ANT', 'HANK' , 'PYM' , 1107, 19, 432978107), + (1108, 'DCX', 'CHARLES' , 'XAVIER', 1108, 19, 432978108), + (1109, 'HLK', 'BRUCE' , 'BANNER', 1109, 19, 432978109), + (1110, 'JJJ', 'JESSICA' , 'JONES' , 1110, 19, 432978110); INSERT INTO `vn`.`parking` (`id`, `column`, `row`, `sectorFk`, `code`, `pickingOrder`) VALUES @@ -360,18 +360,18 @@ INSERT INTO `vn`.`contactChannel`(`id`, `name`) INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`, `hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`, `businessTypeFk`) VALUES - (1101, 'Bruce Wayne', '84612325V', 'BATMAN', 'Alfred', '1007 MOUNTAIN DRIVE, GOTHAM', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), - (1102, 'Petter Parker', '87945234L', 'SPIDER MAN', 'Aunt May', '20 INGRAM STREET, QUEENS, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), - (1103, 'Clark Kent', '06815934E', 'Super man', 'lois lane', '344 Clinton Street, Apartament 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), - (1104, 'Tony Stark', '06089160W', 'Iron man', 'Pepper Potts', '10880 Malibu Point, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), - (1105, 'Max Eisenhardt', '251628698', 'Magneto', 'Rogue', 'Unknown Whereabouts', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'), - (1106, 'DavidCharlesHaller', '53136686Q', 'LEGION', 'Charles Xavier', 'CITY OF NEW YORK, NEW YORK, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'), - (1107, 'Hank Pym', '09854837G', 'ANT MAN', 'Hawk', 'ANTHILL, SAN FRANCISCO, CALIFORNIA', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'), - (1108, 'Charles Xavier', '22641921P', 'Professor X', 'Beast', '3800 Victory Pkwy, Cincinnati, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'), - (1109, 'Bruce Banner', '16104829E', 'Hulk', 'Black widow', 'Somewhere in New York', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'), - (1110, 'Jessica Jones', '58282869H', 'Jessica Jones', 'Luke Cage', 'NYCC 2015 Poster', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'), - (1111, 'Missing', NULL, 'Missing man', 'Anton', 'The space, Universe far away', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'), - (1112, 'Trash', NULL, 'Garbage man', 'Unknown name', 'New York city, Underground', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'); + (1101, 'BRUCE WAYNE', '84612325V', 'BATMAN', 'Alfred', '1007 MOUNTAIN DRIVE, GOTHAM', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), + (1102, 'PETTER PARKER', '87945234L', 'SPIDER MAN', 'Aunt May', '20 INGRAM STREET, QUEENS, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), + (1103, 'CLARK KENT', '06815934E', 'SUPER MAN', 'lois lane', '344 CLINTON STREET, APARTAMENT 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), + (1104, 'TONY STARK', '06089160W', 'IRON MAN', 'Pepper Potts', '10880 MALIBU POINT, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), + (1105, 'MAX EISENHARDT', '251628698', 'MAGNETO', 'Rogue', 'UNKNOWN WHEREABOUTS', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'), + (1106, ' DAVIDCHARLESHALLER', '53136686Q', 'LEGION', 'Charles Xavier', 'CITY OF NEW YORK, NEW YORK, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'), + (1107, 'HANK PYM', '09854837G', 'ANT MAN', 'Hawk', 'ANTHILL, SAN FRANCISCO, CALIFORNIA', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'), + (1108, 'CHARLES XAVIER', '22641921P', 'PROFESSOR X', 'Beast', '3800 VICTORY PKWY, CINCINNATI, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'), + (1109, 'BRUCE BANNER', '16104829E', 'HULK', 'Black widow', 'SOMEWHERE IN NEW YORK', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'), + (1110, 'JESSICA JONES', '58282869H', 'JESSICA JONES', 'Luke Cage', 'NYCC 2015 POSTER', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'), + (1111, 'MISSING', NULL, 'MISSING MAN', 'Anton', 'THE SPACE, UNIVERSE FAR AWAY', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'), + (1112, 'TRASH', NULL, 'GARBAGE MAN', 'Unknown name', 'NEW YORK CITY, UNDERGROUND', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'); INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `gestdocFk`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`) SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'GOTHAM', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, util.VN_CURDATE(), 1 @@ -2955,6 +2955,6 @@ INSERT INTO `vn`.`invoiceInSerial` (`code`, `description`, `cplusTerIdNifFk`, `t ('W', 'Vanaheim', 1, 'WORLD'); -INSERT INTO `hedera`.`imageConfig` (`id`, `maxSize`, `useXsendfile`, `url`) +INSERT INTO `hedera`.`imageConfig` (`id`, `maxSize`, `useXsendfile`, `url`) VALUES (1, 0, 0, 'marvel.com'); diff --git a/e2e/paths/02-client/02_edit_basic_data.spec.js b/e2e/paths/02-client/02_edit_basic_data.spec.js index 3a476e54f..9a0187ae9 100644 --- a/e2e/paths/02-client/02_edit_basic_data.spec.js +++ b/e2e/paths/02-client/02_edit_basic_data.spec.js @@ -8,7 +8,7 @@ describe('Client Edit basicData path', () => { browser = await getBrowser(); page = browser.page; await page.loginAndModule('employee', 'client'); - await page.accessToSearchResult('Bruce Wayne'); + await page.accessToSearchResult('BRUCE WAYNE'); await page.accessToSection('client.card.basicData'); }); @@ -81,7 +81,7 @@ describe('Client Edit basicData path', () => { const result = await page .waitToGetProperty(selectors.clientBasicData.transferor, 'value'); - expect(result).toEqual('Max Eisenhardt'); + expect(result).toEqual('MAX EISENHARDT'); }); }); diff --git a/e2e/paths/02-client/19_summary.spec.js b/e2e/paths/02-client/19_summary.spec.js index b3bf43c5c..7ce7ddd9e 100644 --- a/e2e/paths/02-client/19_summary.spec.js +++ b/e2e/paths/02-client/19_summary.spec.js @@ -21,10 +21,10 @@ describe('Client summary path', () => { }); it('should display details from the client on the header', async() => { - await page.waitForTextInElement(selectors.clientSummary.header, 'Petter Parker'); + await page.waitForTextInElement(selectors.clientSummary.header, 'PETTER PARKER'); const result = await page.waitToGetProperty(selectors.clientSummary.header, 'innerText'); - expect(result).toContain('Petter Parker'); + expect(result).toContain('PETTER PARKER'); }); it('should display some basic data', async() => { diff --git a/e2e/paths/02-client/21_defaulter.spec.js b/e2e/paths/02-client/21_defaulter.spec.js index 2bb3d6254..d4a3123a8 100644 --- a/e2e/paths/02-client/21_defaulter.spec.js +++ b/e2e/paths/02-client/21_defaulter.spec.js @@ -28,7 +28,7 @@ describe('Client defaulter path', () => { const salesPersonName = await page.waitToGetProperty(selectors.clientDefaulter.firstSalesPersonName, 'innerText'); - expect(clientName).toEqual('Bruce Banner'); + expect(clientName).toEqual('BRUCE BANNER'); expect(salesPersonName).toEqual('developer'); }); diff --git a/e2e/paths/05-ticket/15_create_ticket_from_client.spec.js b/e2e/paths/05-ticket/15_create_ticket_from_client.spec.js index 51ead6461..94d040091 100644 --- a/e2e/paths/05-ticket/15_create_ticket_from_client.spec.js +++ b/e2e/paths/05-ticket/15_create_ticket_from_client.spec.js @@ -27,7 +27,7 @@ describe('Ticket create from client path', () => { await page.waitForState('ticket.create'); const values = { - client: 'Petter Parker', + client: 'PETTER PARKER', address: 'Petter Parker' }; const formValues = await page.fetchForm($.form, Object.keys(values)); diff --git a/front/core/components/autocomplete/index.spec.js b/front/core/components/autocomplete/index.spec.js index 847761179..449fe3a74 100644 --- a/front/core/components/autocomplete/index.spec.js +++ b/front/core/components/autocomplete/index.spec.js @@ -1,7 +1,7 @@ describe('Component vnAutocomplete', () => { let $element; let controller; - let data = {id: 1, name: 'Bruce Wayne'}; + let data = {id: 1, name: 'BRUCE WAYNE'}; beforeEach(ngModule('vnCore')); diff --git a/modules/client/back/methods/client/specs/extendedListFilter.spec.js b/modules/client/back/methods/client/specs/extendedListFilter.spec.js index 9a0441656..aec57b40e 100644 --- a/modules/client/back/methods/client/specs/extendedListFilter.spec.js +++ b/modules/client/back/methods/client/specs/extendedListFilter.spec.js @@ -20,20 +20,20 @@ describe('client extendedListFilter()', () => { } }); - it('should return the client "Bruce Wayne" matching the search argument with his name', async() => { + it('should return the client "BRUCE WAYNE" matching the search argument with his name', async() => { const tx = await models.Client.beginTransaction({}); try { const options = {transaction: tx}; - const ctx = {req: {accessToken: {userId: 1}}, args: {search: 'Bruce Wayne'}}; + const ctx = {req: {accessToken: {userId: 1}}, args: {search: 'BRUCE WAYNE'}}; const filter = {}; const result = await models.Client.extendedListFilter(ctx, filter, options); const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('Bruce Wayne'); + expect(firstResult.name).toEqual('BRUCE WAYNE'); await tx.rollback(); } catch (e) { @@ -42,7 +42,7 @@ describe('client extendedListFilter()', () => { } }); - it('should return the client "Bruce Wayne" matching the search argument with his id', async() => { + it('should return the client "BRUCE WAYNE" matching the search argument with his id', async() => { const tx = await models.Client.beginTransaction({}); try { @@ -55,7 +55,7 @@ describe('client extendedListFilter()', () => { const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('Bruce Wayne'); + expect(firstResult.name).toEqual('BRUCE WAYNE'); await tx.rollback(); } catch (e) { @@ -64,20 +64,20 @@ describe('client extendedListFilter()', () => { } }); - it('should return the client "Bruce Wayne" matching the name argument', async() => { + it('should return the client "BRUCE WAYNE" matching the name argument', async() => { const tx = await models.Client.beginTransaction({}); try { const options = {transaction: tx}; - const ctx = {req: {accessToken: {userId: 1}}, args: {name: 'Bruce Wayne'}}; + const ctx = {req: {accessToken: {userId: 1}}, args: {name: 'BRUCE WAYNE'}}; const filter = {}; const result = await models.Client.extendedListFilter(ctx, filter, options); const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('Bruce Wayne'); + expect(firstResult.name).toEqual('BRUCE WAYNE'); await tx.rollback(); } catch (e) { @@ -123,7 +123,7 @@ describe('client extendedListFilter()', () => { const firstClient = result[0]; expect(result.length).toEqual(1); - expect(firstClient.name).toEqual('Max Eisenhardt'); + expect(firstClient.name).toEqual('MAX EISENHARDT'); await tx.rollback(); } catch (e) { diff --git a/modules/client/back/methods/client/specs/filter.spec.js b/modules/client/back/methods/client/specs/filter.spec.js index 679585050..505c1f66f 100644 --- a/modules/client/back/methods/client/specs/filter.spec.js +++ b/modules/client/back/methods/client/specs/filter.spec.js @@ -20,20 +20,20 @@ describe('client filter()', () => { } }); - it('should return the client "Bruce Wayne" matching the search argument with his name', async() => { + it('should return the client "BRUCE WAYNE" matching the search argument with his name', async() => { const tx = await models.Client.beginTransaction({}); try { const options = {transaction: tx}; - const ctx = {req: {accessToken: {userId: 1}}, args: {search: 'Bruce Wayne'}}; + const ctx = {req: {accessToken: {userId: 1}}, args: {search: 'BRUCE WAYNE'}}; const filter = {}; const result = await models.Client.filter(ctx, filter, options); const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('Bruce Wayne'); + expect(firstResult.name).toEqual('BRUCE WAYNE'); await tx.rollback(); } catch (e) { @@ -42,7 +42,7 @@ describe('client filter()', () => { } }); - it('should return the client "Bruce Wayne" matching the search argument with his id', async() => { + it('should return the client "BRUCE WAYNE" matching the search argument with his id', async() => { const tx = await models.Client.beginTransaction({}); try { @@ -55,7 +55,7 @@ describe('client filter()', () => { const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('Bruce Wayne'); + expect(firstResult.name).toEqual('BRUCE WAYNE'); await tx.rollback(); } catch (e) { @@ -64,20 +64,20 @@ describe('client filter()', () => { } }); - it('should return the client "Bruce Wayne" matching the name argument', async() => { + it('should return the client "BRUCE WAYNE" matching the name argument', async() => { const tx = await models.Client.beginTransaction({}); try { const options = {transaction: tx}; - const ctx = {req: {accessToken: {userId: 1}}, args: {name: 'Bruce Wayne'}}; + const ctx = {req: {accessToken: {userId: 1}}, args: {name: 'BRUCE WAYNE'}}; const filter = {}; const result = await models.Client.filter(ctx, filter, options); const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('Bruce Wayne'); + expect(firstResult.name).toEqual('BRUCE WAYNE'); await tx.rollback(); } catch (e) { @@ -123,7 +123,7 @@ describe('client filter()', () => { const firstClient = result[0]; expect(result.length).toEqual(1); - expect(firstClient.name).toEqual('Max Eisenhardt'); + expect(firstClient.name).toEqual('MAX EISENHARDT'); await tx.rollback(); } catch (e) { diff --git a/modules/client/back/methods/client/specs/getCard.spec.js b/modules/client/back/methods/client/specs/getCard.spec.js index 962e0a2d4..db7296c77 100644 --- a/modules/client/back/methods/client/specs/getCard.spec.js +++ b/modules/client/back/methods/client/specs/getCard.spec.js @@ -1,7 +1,7 @@ const models = require('vn-loopback/server/server').models; describe('Client getCard()', () => { - it('should receive a formated card of Bruce Wayne', async() => { + it('should receive a formated card of BRUCE WAYNE', async() => { const tx = await models.Client.beginTransaction({}); try { @@ -12,7 +12,7 @@ describe('Client getCard()', () => { const result = await models.Client.getCard(ctx, id, options); expect(result.id).toEqual(id); - expect(result.name).toEqual('Bruce Wayne'); + expect(result.name).toEqual('BRUCE WAYNE'); expect(result.debt).toEqual(jasmine.any(Number)); await tx.rollback(); diff --git a/modules/client/back/methods/client/specs/lastActiveTickets.spec.js b/modules/client/back/methods/client/specs/lastActiveTickets.spec.js index 7bddb55ee..41d3dbcf8 100644 --- a/modules/client/back/methods/client/specs/lastActiveTickets.spec.js +++ b/modules/client/back/methods/client/specs/lastActiveTickets.spec.js @@ -1,7 +1,7 @@ const models = require('vn-loopback/server/server').models; describe('Client last active tickets', () => { - it('should receive an array of last active tickets of Bruce Wayne', async() => { + it('should receive an array of last active tickets of BRUCE WAYNE', async() => { const tx = await models.Client.beginTransaction({}); try { diff --git a/modules/client/back/methods/client/specs/summary.spec.js b/modules/client/back/methods/client/specs/summary.spec.js index 227f4c398..83d82e609 100644 --- a/modules/client/back/methods/client/specs/summary.spec.js +++ b/modules/client/back/methods/client/specs/summary.spec.js @@ -12,7 +12,7 @@ describe('client summary()', () => { const result = await models.Client.summary(ctx, clientId, options); expect(result.id).toEqual(clientId); - expect(result.name).toEqual('Bruce Wayne'); + expect(result.name).toEqual('BRUCE WAYNE'); await tx.rollback(); } catch (e) { diff --git a/modules/client/back/methods/client/specs/transactions.spec.js b/modules/client/back/methods/client/specs/transactions.spec.js index b4af40195..45fffc1de 100644 --- a/modules/client/back/methods/client/specs/transactions.spec.js +++ b/modules/client/back/methods/client/specs/transactions.spec.js @@ -1,7 +1,7 @@ const models = require('vn-loopback/server/server').models; describe('Client transactions', () => { - it('should call transactions() method to receive a list of Web Payments from Bruce Wayne', async() => { + it('should call transactions() method to receive a list of Web Payments from BRUCE WAYNE', async() => { const tx = await models.Client.beginTransaction({}); try { diff --git a/modules/client/back/methods/defaulter/specs/filter.spec.js b/modules/client/back/methods/defaulter/specs/filter.spec.js index 0a970823e..99b3016af 100644 --- a/modules/client/back/methods/defaulter/specs/filter.spec.js +++ b/modules/client/back/methods/defaulter/specs/filter.spec.js @@ -52,7 +52,7 @@ describe('defaulter filter()', () => { const result = await models.Defaulter.filter(ctx, null, options); const firstRow = result[0]; - expect(firstRow.clientName).toEqual('Petter Parker'); + expect(firstRow.clientName).toEqual('PETTER PARKER'); await tx.rollback(); } catch (e) { diff --git a/modules/client/front/address/index/index.spec.js b/modules/client/front/address/index/index.spec.js index 2a1f0d19e..0ca534231 100644 --- a/modules/client/front/address/index/index.spec.js +++ b/modules/client/front/address/index/index.spec.js @@ -75,9 +75,9 @@ describe('Client', () => { }); it('should return a filter based on a search by name', () => { - const filter = controller.exprBuilder('search', 'Bruce Wayne'); + const filter = controller.exprBuilder('search', 'BRUCE WAYNE'); - expect(filter).toEqual({nickname: {like: '%Bruce Wayne%'}}); + expect(filter).toEqual({nickname: {like: '%BRUCE WAYNE%'}}); }); }); }); diff --git a/modules/client/front/web-access/index.spec.js b/modules/client/front/web-access/index.spec.js index 7325bf932..1407bbdb3 100644 --- a/modules/client/front/web-access/index.spec.js +++ b/modules/client/front/web-access/index.spec.js @@ -22,7 +22,7 @@ describe('Component VnClientWebAccess', () => { describe('$onChanges()', () => { it(`should pass client's account data to account then call isCustomer function`, () => { jest.spyOn(controller, 'isCustomer'); - controller.client = {client: 'Bruce Wayne', account: 'Wayne Industries'}; + controller.client = {client: 'BRUCE WAYNE', account: 'Wayne Industries'}; controller.account = {}; controller.$onChanges(); diff --git a/modules/ticket/back/methods/ticket-weekly/specs/filter.spec.js b/modules/ticket/back/methods/ticket-weekly/specs/filter.spec.js index 2587b6657..a6426e54d 100644 --- a/modules/ticket/back/methods/ticket-weekly/specs/filter.spec.js +++ b/modules/ticket/back/methods/ticket-weekly/specs/filter.spec.js @@ -57,7 +57,7 @@ describe('ticket-weekly filter()', () => { const result = await models.TicketWeekly.filter(ctx, null, options); const firstRow = result[0]; - expect(firstRow.clientName).toEqual('Bruce Wayne'); + expect(firstRow.clientName).toEqual('BRUCE WAYNE'); await tx.rollback(); } catch (e) { @@ -78,7 +78,7 @@ describe('ticket-weekly filter()', () => { const firstRow = result[0]; expect(firstRow.clientFk).toEqual(1101); - expect(firstRow.clientName).toEqual('Bruce Wayne'); + expect(firstRow.clientName).toEqual('BRUCE WAYNE'); await tx.rollback(); } catch (e) { From aff6668dc9b44def077f20ecf2eaa4324d75a521 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 9 Aug 2023 13:33:06 +0200 Subject: [PATCH 2/3] remove names upper --- db/dump/fixtures.sql | 12 ++++++------ e2e/paths/05-ticket/16_summary.spec.js | 4 ++-- e2e/paths/06-claim/05_summary.spec.js | 4 ++-- e2e/paths/07-order/02_basic_data.spec.js | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index c278b4e3b..c3a5a73ec 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -103,7 +103,7 @@ INSERT INTO `hedera`.`tpvConfig`(`id`, `currency`, `terminal`, `transactionType` INSERT INTO `account`.`user`(`id`,`name`,`nickname`, `password`,`role`,`active`,`email`,`lang`, `image`) VALUES - (1101, 'BruceWayne', 'BRUCE WAYNE', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'BruceWayne@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'), + (1101, 'BruceWayne', 'Bruce Wayne', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'BruceWayne@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'), (1102, 'PetterParker', 'Petter Parker', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'PetterParker@mydomain.com', 'en', 'e7723f0b24ff05b32ed09d95196f2f29'), (1103, 'ClarkKent', 'Clark Kent', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'ClarkKent@mydomain.com', 'fr', 'e7723f0b24ff05b32ed09d95196f2f29'), (1104, 'TonyStark', 'Tony Stark', '$2b$10$UzQHth.9UUQ1T5aiQJ21lOU0oVlbxoqH4PFM9V8T90KNSAcg0eEL2', 2, 1, 'TonyStark@mydomain.com', 'es', 'e7723f0b24ff05b32ed09d95196f2f29'), @@ -190,11 +190,11 @@ UPDATE `vn`.`sector` SET mainPrinterFk = 1 WHERE id = 1; INSERT INTO `vn`.`worker`(`id`, `code`, `firstName`, `lastName`, `userFk`,`bossFk`, `phone`) VALUES - (1106, 'LGN', 'DAVID CHARLES', 'HALLER', 1106, 19, 432978106), - (1107, 'ANT', 'HANK' , 'PYM' , 1107, 19, 432978107), - (1108, 'DCX', 'CHARLES' , 'XAVIER', 1108, 19, 432978108), - (1109, 'HLK', 'BRUCE' , 'BANNER', 1109, 19, 432978109), - (1110, 'JJJ', 'JESSICA' , 'JONES' , 1110, 19, 432978110); + (1106, 'LGN', 'David Charles', 'Haller', 1106, 19, 432978106), + (1107, 'ANT', 'Hank' , 'Pym' , 1107, 19, 432978107), + (1108, 'DCX', 'Charles' , 'Xavier', 1108, 19, 432978108), + (1109, 'HLK', 'Bruce' , 'Banner', 1109, 19, 432978109), + (1110, 'JJJ', 'Jessica' , 'Jones' , 1110, 19, 432978110); INSERT INTO `vn`.`parking` (`id`, `column`, `row`, `sectorFk`, `code`, `pickingOrder`) VALUES diff --git a/e2e/paths/05-ticket/16_summary.spec.js b/e2e/paths/05-ticket/16_summary.spec.js index a6017e454..6904c6b6d 100644 --- a/e2e/paths/05-ticket/16_summary.spec.js +++ b/e2e/paths/05-ticket/16_summary.spec.js @@ -22,11 +22,11 @@ describe('Ticket Summary path', () => { }); it(`should display details from the ticket and it's client on the top of the header`, async() => { - await page.waitForTextInElement(selectors.ticketSummary.header, 'Bruce Banner'); + await page.waitForTextInElement(selectors.ticketSummary.header, 'BRUCE BANNER'); const result = await page.waitToGetProperty(selectors.ticketSummary.header, 'innerText'); expect(result).toContain(`Ticket #${ticketId}`); - expect(result).toContain('Bruce Banner (1109)'); + expect(result).toContain('BRUCE BANNER (1109)'); expect(result).toContain('Somewhere in Thailand'); }); diff --git a/e2e/paths/06-claim/05_summary.spec.js b/e2e/paths/06-claim/05_summary.spec.js index 1333ed01a..15a67ad1e 100644 --- a/e2e/paths/06-claim/05_summary.spec.js +++ b/e2e/paths/06-claim/05_summary.spec.js @@ -23,11 +23,11 @@ describe('Claim summary path', () => { }); it(`should display details from the claim and it's client on the top of the header`, async() => { - await page.waitForTextInElement(selectors.claimSummary.header, 'Tony Stark'); + await page.waitForTextInElement(selectors.claimSummary.header, 'TONY STARK'); const result = await page.waitToGetProperty(selectors.claimSummary.header, 'innerText'); expect(result).toContain('4 -'); - expect(result).toContain('Tony Stark'); + expect(result).toContain('TONY STARK'); }); it('should display the claim state', async() => { diff --git a/e2e/paths/07-order/02_basic_data.spec.js b/e2e/paths/07-order/02_basic_data.spec.js index b2c21b071..abdfa4dd4 100644 --- a/e2e/paths/07-order/02_basic_data.spec.js +++ b/e2e/paths/07-order/02_basic_data.spec.js @@ -53,7 +53,7 @@ describe('Order edit basic data path', () => { await page.accessToSection('order.card.basicData'); const values = { - client: 'Tony Stark', + client: 'TONY STARK', address: 'Tony Stark', agencyMode: 'Other agency' }; From 8807b9f87f6bf60c080d4c75cd124ea3efae7365 Mon Sep 17 00:00:00 2001 From: carlossa Date: Thu, 10 Aug 2023 09:58:48 +0200 Subject: [PATCH 3/3] fix upper --- db/dump/fixtures.sql | 24 +++++++++---------- .../02-client/02_edit_basic_data.spec.js | 4 ++-- e2e/paths/02-client/19_summary.spec.js | 4 ++-- e2e/paths/02-client/21_defaulter.spec.js | 2 +- .../15_create_ticket_from_client.spec.js | 2 +- e2e/paths/05-ticket/16_summary.spec.js | 4 ++-- e2e/paths/06-claim/05_summary.spec.js | 4 ++-- e2e/paths/07-order/02_basic_data.spec.js | 2 +- .../components/autocomplete/index.spec.js | 2 +- .../client/specs/extendedListFilter.spec.js | 18 +++++++------- .../back/methods/client/specs/filter.spec.js | 18 +++++++------- .../back/methods/client/specs/getCard.spec.js | 4 ++-- .../back/methods/client/specs/summary.spec.js | 2 +- .../methods/defaulter/specs/filter.spec.js | 2 +- .../client/front/address/index/index.spec.js | 4 ++-- modules/client/front/web-access/index.spec.js | 2 +- .../ticket-weekly/specs/filter.spec.js | 4 ++-- 17 files changed, 51 insertions(+), 51 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index c3a5a73ec..b01c07461 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -360,18 +360,18 @@ INSERT INTO `vn`.`contactChannel`(`id`, `name`) INSERT INTO `vn`.`client`(`id`,`name`,`fi`,`socialName`,`contact`,`street`,`city`,`postcode`,`phone`,`mobile`,`isRelevant`,`email`,`iban`,`dueDay`,`accountingAccount`,`isEqualizated`,`provinceFk`,`hasToInvoice`,`credit`,`countryFk`,`isActive`,`gestdocFk`,`quality`,`payMethodFk`,`created`,`isToBeMailed`,`contactChannelFk`,`hasSepaVnl`,`hasCoreVnl`,`hasCoreVnh`,`riskCalculated`,`clientTypeFk`, `hasToInvoiceByAddress`,`isTaxDataChecked`,`isFreezed`,`creditInsurance`,`isCreatedAsServed`,`hasInvoiceSimplified`,`salesPersonFk`,`isVies`,`eypbc`, `businessTypeFk`) VALUES - (1101, 'BRUCE WAYNE', '84612325V', 'BATMAN', 'Alfred', '1007 MOUNTAIN DRIVE, GOTHAM', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), - (1102, 'PETTER PARKER', '87945234L', 'SPIDER MAN', 'Aunt May', '20 INGRAM STREET, QUEENS, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), - (1103, 'CLARK KENT', '06815934E', 'SUPER MAN', 'lois lane', '344 CLINTON STREET, APARTAMENT 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), - (1104, 'TONY STARK', '06089160W', 'IRON MAN', 'Pepper Potts', '10880 MALIBU POINT, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), - (1105, 'MAX EISENHARDT', '251628698', 'MAGNETO', 'Rogue', 'UNKNOWN WHEREABOUTS', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'), - (1106, ' DAVIDCHARLESHALLER', '53136686Q', 'LEGION', 'Charles Xavier', 'CITY OF NEW YORK, NEW YORK, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'), - (1107, 'HANK PYM', '09854837G', 'ANT MAN', 'Hawk', 'ANTHILL, SAN FRANCISCO, CALIFORNIA', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'), - (1108, 'CHARLES XAVIER', '22641921P', 'PROFESSOR X', 'Beast', '3800 VICTORY PKWY, CINCINNATI, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'), - (1109, 'BRUCE BANNER', '16104829E', 'HULK', 'Black widow', 'SOMEWHERE IN NEW YORK', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'), - (1110, 'JESSICA JONES', '58282869H', 'JESSICA JONES', 'Luke Cage', 'NYCC 2015 POSTER', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'), - (1111, 'MISSING', NULL, 'MISSING MAN', 'Anton', 'THE SPACE, UNIVERSE FAR AWAY', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'), - (1112, 'TRASH', NULL, 'GARBAGE MAN', 'Unknown name', 'NEW YORK CITY, UNDERGROUND', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'); + (1101, 'Bruce Wayne', '84612325V', 'BATMAN', 'Alfred', '1007 MOUNTAIN DRIVE, GOTHAM', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceWayne@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), + (1102, 'Petter Parker', '87945234L', 'SPIDER MAN', 'Aunt May', '20 INGRAM STREET, QUEENS, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'PetterParker@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), + (1103, 'Clark Kent', '06815934E', 'SUPER MAN', 'lois lane', '344 CLINTON STREET, APARTAMENT 3-D', 'Gotham', 46460, 1111111111, 222222222, 1, 'ClarkKent@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 0, 19, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), + (1104, 'Tony Stark', '06089160W', 'IRON MAN', 'Pepper Potts', '10880 MALIBU POINT, 90265', 'Gotham', 46460, 1111111111, 222222222, 1, 'TonyStark@mydomain.com', NULL, 0, 1234567890, 0, 2, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 18, 0, 1, 'florist'), + (1105, 'Max Eisenhardt', '251628698', 'MAGNETO', 'Rogue', 'UNKNOWN WHEREABOUTS', 'Gotham', 46460, 1111111111, 222222222, 1, 'MaxEisenhardt@mydomain.com', NULL, 0, 1234567890, 0, 3, 1, 300, 8, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 18, 0, 1, 'florist'), + (1106, 'DavidCharlesHaller', '53136686Q', 'LEGION', 'Charles Xavier', 'CITY OF NEW YORK, NEW YORK, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'DavidCharlesHaller@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 0, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 0, NULL, 0, 0, 19, 0, 1, 'florist'), + (1107, 'Hank Pym', '09854837G', 'ANT MAN', 'Hawk', 'ANTHILL, SAN FRANCISCO, CALIFORNIA', 'Gotham', 46460, 1111111111, 222222222, 1, 'HankPym@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 19, 0, 1, 'florist'), + (1108, 'Charles Xavier', '22641921P', 'PROFESSOR X', 'Beast', '3800 VICTORY PKWY, CINCINNATI, OH 45207, USA', 'Gotham', 46460, 1111111111, 222222222, 1, 'CharlesXavier@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 1, 1, NULL, 0, 0, 19, 0, 1, 'florist'), + (1109, 'Bruce Banner', '16104829E', 'HULK', 'Black widow', 'SOMEWHERE IN NEW YORK', 'Gotham', 46460, 1111111111, 222222222, 1, 'BruceBanner@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, 9, 0, 1, 'florist'), + (1110, 'Jessica Jones', '58282869H', 'JESSICA JONES', 'Luke Cage', 'NYCC 2015 POSTER', 'Gotham', 46460, 1111111111, 222222222, 1, 'JessicaJones@mydomain.com', NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 1, 1, 0, 0, NULL, 0, 0, NULL, 0, 1, 'florist'), + (1111, 'Missing', NULL, 'MISSING MAN', 'Anton', 'THE SPACE, UNIVERSE FAR AWAY', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'), + (1112, 'Trash', NULL, 'GARBAGE MAN', 'Unknown name', 'NEW YORK CITY, UNDERGROUND', 'Gotham', 46460, 1111111111, 222222222, 1, NULL, NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1, NULL, 10, 5, util.VN_CURDATE(), 1, 5, 1, 1, 1, '0000-00-00', 4, 0, 1, 0, NULL, 1, 0, NULL, 0, 1, 'others'); INSERT INTO `vn`.`client`(`id`, `name`, `fi`, `socialName`, `contact`, `street`, `city`, `postcode`, `isRelevant`, `email`, `iban`,`dueDay`,`accountingAccount`, `isEqualizated`, `provinceFk`, `hasToInvoice`, `credit`, `countryFk`, `isActive`, `gestdocFk`, `quality`, `payMethodFk`,`created`, `isTaxDataChecked`) SELECT id, name, CONCAT(RPAD(CONCAT(id,9),8,id),'A'), CONCAT(name, 'Social'), CONCAT(name, 'Contact'), CONCAT(name, 'Street'), 'GOTHAM', 46460, 1, CONCAT(name,'@mydomain.com'), NULL, 0, 1234567890, 0, 1, 1, 300, 1, 1,NULL, 10, 5, util.VN_CURDATE(), 1 diff --git a/e2e/paths/02-client/02_edit_basic_data.spec.js b/e2e/paths/02-client/02_edit_basic_data.spec.js index 9a0187ae9..3a476e54f 100644 --- a/e2e/paths/02-client/02_edit_basic_data.spec.js +++ b/e2e/paths/02-client/02_edit_basic_data.spec.js @@ -8,7 +8,7 @@ describe('Client Edit basicData path', () => { browser = await getBrowser(); page = browser.page; await page.loginAndModule('employee', 'client'); - await page.accessToSearchResult('BRUCE WAYNE'); + await page.accessToSearchResult('Bruce Wayne'); await page.accessToSection('client.card.basicData'); }); @@ -81,7 +81,7 @@ describe('Client Edit basicData path', () => { const result = await page .waitToGetProperty(selectors.clientBasicData.transferor, 'value'); - expect(result).toEqual('MAX EISENHARDT'); + expect(result).toEqual('Max Eisenhardt'); }); }); diff --git a/e2e/paths/02-client/19_summary.spec.js b/e2e/paths/02-client/19_summary.spec.js index 7ce7ddd9e..b3bf43c5c 100644 --- a/e2e/paths/02-client/19_summary.spec.js +++ b/e2e/paths/02-client/19_summary.spec.js @@ -21,10 +21,10 @@ describe('Client summary path', () => { }); it('should display details from the client on the header', async() => { - await page.waitForTextInElement(selectors.clientSummary.header, 'PETTER PARKER'); + await page.waitForTextInElement(selectors.clientSummary.header, 'Petter Parker'); const result = await page.waitToGetProperty(selectors.clientSummary.header, 'innerText'); - expect(result).toContain('PETTER PARKER'); + expect(result).toContain('Petter Parker'); }); it('should display some basic data', async() => { diff --git a/e2e/paths/02-client/21_defaulter.spec.js b/e2e/paths/02-client/21_defaulter.spec.js index d4a3123a8..2bb3d6254 100644 --- a/e2e/paths/02-client/21_defaulter.spec.js +++ b/e2e/paths/02-client/21_defaulter.spec.js @@ -28,7 +28,7 @@ describe('Client defaulter path', () => { const salesPersonName = await page.waitToGetProperty(selectors.clientDefaulter.firstSalesPersonName, 'innerText'); - expect(clientName).toEqual('BRUCE BANNER'); + expect(clientName).toEqual('Bruce Banner'); expect(salesPersonName).toEqual('developer'); }); diff --git a/e2e/paths/05-ticket/15_create_ticket_from_client.spec.js b/e2e/paths/05-ticket/15_create_ticket_from_client.spec.js index 94d040091..51ead6461 100644 --- a/e2e/paths/05-ticket/15_create_ticket_from_client.spec.js +++ b/e2e/paths/05-ticket/15_create_ticket_from_client.spec.js @@ -27,7 +27,7 @@ describe('Ticket create from client path', () => { await page.waitForState('ticket.create'); const values = { - client: 'PETTER PARKER', + client: 'Petter Parker', address: 'Petter Parker' }; const formValues = await page.fetchForm($.form, Object.keys(values)); diff --git a/e2e/paths/05-ticket/16_summary.spec.js b/e2e/paths/05-ticket/16_summary.spec.js index 6904c6b6d..a6017e454 100644 --- a/e2e/paths/05-ticket/16_summary.spec.js +++ b/e2e/paths/05-ticket/16_summary.spec.js @@ -22,11 +22,11 @@ describe('Ticket Summary path', () => { }); it(`should display details from the ticket and it's client on the top of the header`, async() => { - await page.waitForTextInElement(selectors.ticketSummary.header, 'BRUCE BANNER'); + await page.waitForTextInElement(selectors.ticketSummary.header, 'Bruce Banner'); const result = await page.waitToGetProperty(selectors.ticketSummary.header, 'innerText'); expect(result).toContain(`Ticket #${ticketId}`); - expect(result).toContain('BRUCE BANNER (1109)'); + expect(result).toContain('Bruce Banner (1109)'); expect(result).toContain('Somewhere in Thailand'); }); diff --git a/e2e/paths/06-claim/05_summary.spec.js b/e2e/paths/06-claim/05_summary.spec.js index 15a67ad1e..1333ed01a 100644 --- a/e2e/paths/06-claim/05_summary.spec.js +++ b/e2e/paths/06-claim/05_summary.spec.js @@ -23,11 +23,11 @@ describe('Claim summary path', () => { }); it(`should display details from the claim and it's client on the top of the header`, async() => { - await page.waitForTextInElement(selectors.claimSummary.header, 'TONY STARK'); + await page.waitForTextInElement(selectors.claimSummary.header, 'Tony Stark'); const result = await page.waitToGetProperty(selectors.claimSummary.header, 'innerText'); expect(result).toContain('4 -'); - expect(result).toContain('TONY STARK'); + expect(result).toContain('Tony Stark'); }); it('should display the claim state', async() => { diff --git a/e2e/paths/07-order/02_basic_data.spec.js b/e2e/paths/07-order/02_basic_data.spec.js index abdfa4dd4..b2c21b071 100644 --- a/e2e/paths/07-order/02_basic_data.spec.js +++ b/e2e/paths/07-order/02_basic_data.spec.js @@ -53,7 +53,7 @@ describe('Order edit basic data path', () => { await page.accessToSection('order.card.basicData'); const values = { - client: 'TONY STARK', + client: 'Tony Stark', address: 'Tony Stark', agencyMode: 'Other agency' }; diff --git a/front/core/components/autocomplete/index.spec.js b/front/core/components/autocomplete/index.spec.js index 449fe3a74..847761179 100644 --- a/front/core/components/autocomplete/index.spec.js +++ b/front/core/components/autocomplete/index.spec.js @@ -1,7 +1,7 @@ describe('Component vnAutocomplete', () => { let $element; let controller; - let data = {id: 1, name: 'BRUCE WAYNE'}; + let data = {id: 1, name: 'Bruce Wayne'}; beforeEach(ngModule('vnCore')); diff --git a/modules/client/back/methods/client/specs/extendedListFilter.spec.js b/modules/client/back/methods/client/specs/extendedListFilter.spec.js index aec57b40e..9a0441656 100644 --- a/modules/client/back/methods/client/specs/extendedListFilter.spec.js +++ b/modules/client/back/methods/client/specs/extendedListFilter.spec.js @@ -20,20 +20,20 @@ describe('client extendedListFilter()', () => { } }); - it('should return the client "BRUCE WAYNE" matching the search argument with his name', async() => { + it('should return the client "Bruce Wayne" matching the search argument with his name', async() => { const tx = await models.Client.beginTransaction({}); try { const options = {transaction: tx}; - const ctx = {req: {accessToken: {userId: 1}}, args: {search: 'BRUCE WAYNE'}}; + const ctx = {req: {accessToken: {userId: 1}}, args: {search: 'Bruce Wayne'}}; const filter = {}; const result = await models.Client.extendedListFilter(ctx, filter, options); const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('BRUCE WAYNE'); + expect(firstResult.name).toEqual('Bruce Wayne'); await tx.rollback(); } catch (e) { @@ -42,7 +42,7 @@ describe('client extendedListFilter()', () => { } }); - it('should return the client "BRUCE WAYNE" matching the search argument with his id', async() => { + it('should return the client "Bruce Wayne" matching the search argument with his id', async() => { const tx = await models.Client.beginTransaction({}); try { @@ -55,7 +55,7 @@ describe('client extendedListFilter()', () => { const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('BRUCE WAYNE'); + expect(firstResult.name).toEqual('Bruce Wayne'); await tx.rollback(); } catch (e) { @@ -64,20 +64,20 @@ describe('client extendedListFilter()', () => { } }); - it('should return the client "BRUCE WAYNE" matching the name argument', async() => { + it('should return the client "Bruce Wayne" matching the name argument', async() => { const tx = await models.Client.beginTransaction({}); try { const options = {transaction: tx}; - const ctx = {req: {accessToken: {userId: 1}}, args: {name: 'BRUCE WAYNE'}}; + const ctx = {req: {accessToken: {userId: 1}}, args: {name: 'Bruce Wayne'}}; const filter = {}; const result = await models.Client.extendedListFilter(ctx, filter, options); const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('BRUCE WAYNE'); + expect(firstResult.name).toEqual('Bruce Wayne'); await tx.rollback(); } catch (e) { @@ -123,7 +123,7 @@ describe('client extendedListFilter()', () => { const firstClient = result[0]; expect(result.length).toEqual(1); - expect(firstClient.name).toEqual('MAX EISENHARDT'); + expect(firstClient.name).toEqual('Max Eisenhardt'); await tx.rollback(); } catch (e) { diff --git a/modules/client/back/methods/client/specs/filter.spec.js b/modules/client/back/methods/client/specs/filter.spec.js index 505c1f66f..679585050 100644 --- a/modules/client/back/methods/client/specs/filter.spec.js +++ b/modules/client/back/methods/client/specs/filter.spec.js @@ -20,20 +20,20 @@ describe('client filter()', () => { } }); - it('should return the client "BRUCE WAYNE" matching the search argument with his name', async() => { + it('should return the client "Bruce Wayne" matching the search argument with his name', async() => { const tx = await models.Client.beginTransaction({}); try { const options = {transaction: tx}; - const ctx = {req: {accessToken: {userId: 1}}, args: {search: 'BRUCE WAYNE'}}; + const ctx = {req: {accessToken: {userId: 1}}, args: {search: 'Bruce Wayne'}}; const filter = {}; const result = await models.Client.filter(ctx, filter, options); const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('BRUCE WAYNE'); + expect(firstResult.name).toEqual('Bruce Wayne'); await tx.rollback(); } catch (e) { @@ -42,7 +42,7 @@ describe('client filter()', () => { } }); - it('should return the client "BRUCE WAYNE" matching the search argument with his id', async() => { + it('should return the client "Bruce Wayne" matching the search argument with his id', async() => { const tx = await models.Client.beginTransaction({}); try { @@ -55,7 +55,7 @@ describe('client filter()', () => { const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('BRUCE WAYNE'); + expect(firstResult.name).toEqual('Bruce Wayne'); await tx.rollback(); } catch (e) { @@ -64,20 +64,20 @@ describe('client filter()', () => { } }); - it('should return the client "BRUCE WAYNE" matching the name argument', async() => { + it('should return the client "Bruce Wayne" matching the name argument', async() => { const tx = await models.Client.beginTransaction({}); try { const options = {transaction: tx}; - const ctx = {req: {accessToken: {userId: 1}}, args: {name: 'BRUCE WAYNE'}}; + const ctx = {req: {accessToken: {userId: 1}}, args: {name: 'Bruce Wayne'}}; const filter = {}; const result = await models.Client.filter(ctx, filter, options); const firstResult = result[0]; expect(result.length).toEqual(1); - expect(firstResult.name).toEqual('BRUCE WAYNE'); + expect(firstResult.name).toEqual('Bruce Wayne'); await tx.rollback(); } catch (e) { @@ -123,7 +123,7 @@ describe('client filter()', () => { const firstClient = result[0]; expect(result.length).toEqual(1); - expect(firstClient.name).toEqual('MAX EISENHARDT'); + expect(firstClient.name).toEqual('Max Eisenhardt'); await tx.rollback(); } catch (e) { diff --git a/modules/client/back/methods/client/specs/getCard.spec.js b/modules/client/back/methods/client/specs/getCard.spec.js index db7296c77..962e0a2d4 100644 --- a/modules/client/back/methods/client/specs/getCard.spec.js +++ b/modules/client/back/methods/client/specs/getCard.spec.js @@ -1,7 +1,7 @@ const models = require('vn-loopback/server/server').models; describe('Client getCard()', () => { - it('should receive a formated card of BRUCE WAYNE', async() => { + it('should receive a formated card of Bruce Wayne', async() => { const tx = await models.Client.beginTransaction({}); try { @@ -12,7 +12,7 @@ describe('Client getCard()', () => { const result = await models.Client.getCard(ctx, id, options); expect(result.id).toEqual(id); - expect(result.name).toEqual('BRUCE WAYNE'); + expect(result.name).toEqual('Bruce Wayne'); expect(result.debt).toEqual(jasmine.any(Number)); await tx.rollback(); diff --git a/modules/client/back/methods/client/specs/summary.spec.js b/modules/client/back/methods/client/specs/summary.spec.js index 83d82e609..227f4c398 100644 --- a/modules/client/back/methods/client/specs/summary.spec.js +++ b/modules/client/back/methods/client/specs/summary.spec.js @@ -12,7 +12,7 @@ describe('client summary()', () => { const result = await models.Client.summary(ctx, clientId, options); expect(result.id).toEqual(clientId); - expect(result.name).toEqual('BRUCE WAYNE'); + expect(result.name).toEqual('Bruce Wayne'); await tx.rollback(); } catch (e) { diff --git a/modules/client/back/methods/defaulter/specs/filter.spec.js b/modules/client/back/methods/defaulter/specs/filter.spec.js index 99b3016af..0a970823e 100644 --- a/modules/client/back/methods/defaulter/specs/filter.spec.js +++ b/modules/client/back/methods/defaulter/specs/filter.spec.js @@ -52,7 +52,7 @@ describe('defaulter filter()', () => { const result = await models.Defaulter.filter(ctx, null, options); const firstRow = result[0]; - expect(firstRow.clientName).toEqual('PETTER PARKER'); + expect(firstRow.clientName).toEqual('Petter Parker'); await tx.rollback(); } catch (e) { diff --git a/modules/client/front/address/index/index.spec.js b/modules/client/front/address/index/index.spec.js index 0ca534231..2a1f0d19e 100644 --- a/modules/client/front/address/index/index.spec.js +++ b/modules/client/front/address/index/index.spec.js @@ -75,9 +75,9 @@ describe('Client', () => { }); it('should return a filter based on a search by name', () => { - const filter = controller.exprBuilder('search', 'BRUCE WAYNE'); + const filter = controller.exprBuilder('search', 'Bruce Wayne'); - expect(filter).toEqual({nickname: {like: '%BRUCE WAYNE%'}}); + expect(filter).toEqual({nickname: {like: '%Bruce Wayne%'}}); }); }); }); diff --git a/modules/client/front/web-access/index.spec.js b/modules/client/front/web-access/index.spec.js index 1407bbdb3..7325bf932 100644 --- a/modules/client/front/web-access/index.spec.js +++ b/modules/client/front/web-access/index.spec.js @@ -22,7 +22,7 @@ describe('Component VnClientWebAccess', () => { describe('$onChanges()', () => { it(`should pass client's account data to account then call isCustomer function`, () => { jest.spyOn(controller, 'isCustomer'); - controller.client = {client: 'BRUCE WAYNE', account: 'Wayne Industries'}; + controller.client = {client: 'Bruce Wayne', account: 'Wayne Industries'}; controller.account = {}; controller.$onChanges(); diff --git a/modules/ticket/back/methods/ticket-weekly/specs/filter.spec.js b/modules/ticket/back/methods/ticket-weekly/specs/filter.spec.js index a6426e54d..2587b6657 100644 --- a/modules/ticket/back/methods/ticket-weekly/specs/filter.spec.js +++ b/modules/ticket/back/methods/ticket-weekly/specs/filter.spec.js @@ -57,7 +57,7 @@ describe('ticket-weekly filter()', () => { const result = await models.TicketWeekly.filter(ctx, null, options); const firstRow = result[0]; - expect(firstRow.clientName).toEqual('BRUCE WAYNE'); + expect(firstRow.clientName).toEqual('Bruce Wayne'); await tx.rollback(); } catch (e) { @@ -78,7 +78,7 @@ describe('ticket-weekly filter()', () => { const firstRow = result[0]; expect(firstRow.clientFk).toEqual(1101); - expect(firstRow.clientName).toEqual('BRUCE WAYNE'); + expect(firstRow.clientName).toEqual('Bruce Wayne'); await tx.rollback(); } catch (e) {