From e34cb8ce84282faca2f3bc7d7a6d5a2db0f2c4de Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Wed, 17 Apr 2019 09:37:55 +0200 Subject: [PATCH] #1351 e2e order.catalog --- db/dump/fixtures.sql | 18 +++++++++--------- e2e/paths/04-item-module/01_summary.spec.js | 12 ++++++------ e2e/paths/04-item-module/02_basic_data.spec.js | 2 +- .../back/methods/item/specs/filter.spec.js | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index dda99aea5..0df460c3d 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -614,22 +614,22 @@ INSERT INTO `vn`.`ticketPackaging`(`id`, `ticketFk`, `packagingFk`, `quantity`, INSERT INTO `vn`.`sale`(`id`, `itemFk`, `ticketFk`, `concept`, `quantity`, `price`, `discount`, `reserved`, `isPicked`, `created`) VALUES (1, 1, 1, 'Ranged weapon longbow 2m', 5, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)), - (2, 2, 1, 'Melee weapon combat first 15cm', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)), + (2, 2, 1, 'Melee weapon combat fist 15cm', 10, 1.07, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)), (3, 1, 1, 'Ranged weapon longbow 2m', 2, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)), (4, 4, 1, 'Melee weapon heavy shield 1x0.5m', 20, 3.06, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -15 DAY)), (5, 1, 2, 'Ranged weapon longbow 2m', 10, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -10 DAY)), (6, 1, 3, 'Ranged weapon longbow 2m', 15, 6.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -5 DAY)), - (7, 2, 11, 'Melee weapon combat first 15cm', 15, 1.46, 0, 0, 0, CURDATE()), + (7, 2, 11, 'Melee weapon combat fist 15cm', 15, 1.46, 0, 0, 0, CURDATE()), (8, 4, 11, 'Melee weapon heavy shield 1x0.5m', 10, 3.04, 0, 0, 0, CURDATE()), (9, 1, 16, 'Ranged weapon longbow 2m', 5, 9.10, 0, 0, 0, CURDATE()), - (10, 2, 16, 'Melee weapon combat first 15cm', 10, 1.07, 0, 0, 0, CURDATE()), + (10, 2, 16, 'Melee weapon combat fist 15cm', 10, 1.07, 0, 0, 0, CURDATE()), (11, 1, 16, 'Ranged weapon longbow 2m', 2, 9.10, 0, 0, 0, CURDATE()), (12, 4, 16, 'Melee weapon heavy shield 1x0.5m', 20, 3.06, 0, 0, 0, CURDATE()), - (13, 2, 8, 'Melee weapon combat first 15cm', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)), + (13, 2, 8, 'Melee weapon combat fist 15cm', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)), (14, 1, 8, 'Ranged weapon longbow 2m', 10, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)), (15, 1, 19, 'Ranged weapon longbow 2m', 10, 1.50, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)), - (16, 2, 20, 'Melee weapon combat first 15cm', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)), - (17, 2, 22, 'Melee weapon combat first 15cm', 30, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)), + (16, 2, 20, 'Melee weapon combat fist 15cm', 15, 1.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)), + (17, 2, 22, 'Melee weapon combat fist 15cm', 30, 2.30, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)), (18, 4, 22, 'Melee weapon heavy shield 1x0.5m', 20, 3.00, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL +1 DAY)), (19, 1, 4, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -4 DAY)), (20, 1, 5, 'Ranged weapon longbow 2m', 1, 9.10, 0, 0, 0, DATE_ADD(CURDATE(), INTERVAL -3 DAY)), @@ -816,7 +816,7 @@ INSERT INTO `vn`.`itemTag`(`id`,`itemFk`,`tagFk`,`value`,`priority`) (6 , 1, 67, 'precission', 6), (7 , 1, 23, '1', 7), (8 , 2, 56, 'Melee weapon', 1), - (9 , 2, 58, 'combat first', 2), + (9 , 2, 58, 'combat fist', 2), (10, 2, 27, '15cm', 3), (11, 2, 36, 'Stark Industries', 4), (12, 2, 1, 'Silver', 5), @@ -1211,9 +1211,9 @@ INSERT INTO `vn2008`.`workerTeam`(`id`, `team`, `user`) INSERT INTO `vn`.`ticketRequest`(`id`, `description`, `requesterFk`, `atenderFk`, `quantity`, `itemFk`, `price`, `isOk`, `saleFk`, `ticketFk`, `created`) VALUES (1, 'Ranged weapon longbow 2m', 18, 35, 5, 1, 9.10, 1, 1, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)), - (2, 'Melee weapon combat first 15cm', 18, 35, 10, 2, 1.07, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)), + (2, 'Melee weapon combat fist 15cm', 18, 35, 10, 2, 1.07, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)), (3, 'Melee weapon heavy shield 1x0.5m', 18, 35, 20, 4, 3.06, 0, NULL, 1, DATE_ADD(CURDATE(), INTERVAL -15 DAY)), - (4, 'Melee weapon combat first 15cm', 18, 35, 15, 2, 1.30, NULL, NULL, 11, CURDATE()); + (4, 'Melee weapon combat fist 15cm', 18, 35, 15, 2, 1.30, NULL, NULL, 11, CURDATE()); INSERT INTO `vn`.`ticketService`(`id`, `description`, `quantity`, `price`, `taxClassFk`, `ticketFk`) VALUES diff --git a/e2e/paths/04-item-module/01_summary.spec.js b/e2e/paths/04-item-module/01_summary.spec.js index e4b27d127..1cbfc4af8 100644 --- a/e2e/paths/04-item-module/01_summary.spec.js +++ b/e2e/paths/04-item-module/01_summary.spec.js @@ -84,7 +84,7 @@ describe('Item summary path', () => { const result = await nightmare .clearInput('vn-item-index vn-searchbar input') .waitToClick(selectors.itemsIndex.searchButton) - .write(selectors.itemsIndex.searchItemInput, 'Melee weapon combat first 15cm') + .write(selectors.itemsIndex.searchItemInput, 'Melee weapon combat fist 15cm') .waitToClick(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) .countElement(selectors.itemsIndex.searchResult); @@ -94,7 +94,7 @@ describe('Item summary path', () => { it(`should now click on the search result summary button to open the item summary popup`, async() => { const isVisibleBefore = await nightmare - .waitForTextInElement(selectors.itemsIndex.searchResult, 'Melee weapon combat first 15cm') + .waitForTextInElement(selectors.itemsIndex.searchResult, 'Melee weapon combat fist 15cm') .isVisible(selectors.itemSummary.basicData); const isVisibleAfter = await nightmare @@ -108,10 +108,10 @@ describe('Item summary path', () => { it(`should now check the item summary preview shows fields from basic data`, async() => { const result = await nightmare - .waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat first 15cm') + .waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat fist 15cm') .waitToGetProperty(selectors.itemSummary.basicData, 'innerText'); - expect(result).toContain('Melee weapon combat first 15cm'); + expect(result).toContain('Melee weapon combat fist 15cm'); }); it(`should now check the item summary preview shows fields from tags`, async() => { @@ -172,10 +172,10 @@ describe('Item summary path', () => { it(`should check the item summary shows fields from basic data section`, async() => { const result = await nightmare - .waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat first 15cm') + .waitForTextInElement(selectors.itemSummary.basicData, 'Melee weapon combat fist 15cm') .waitToGetProperty(selectors.itemSummary.basicData, 'innerText'); - expect(result).toContain('Melee weapon combat first 15cm'); + expect(result).toContain('Melee weapon combat fist 15cm'); }); it(`should check the item summary shows fields from tags section`, async() => { diff --git a/e2e/paths/04-item-module/02_basic_data.spec.js b/e2e/paths/04-item-module/02_basic_data.spec.js index 8e6ecacfc..ebab836bf 100644 --- a/e2e/paths/04-item-module/02_basic_data.spec.js +++ b/e2e/paths/04-item-module/02_basic_data.spec.js @@ -7,7 +7,7 @@ describe('Item Edit basic data path', () => { beforeAll(() => { nightmare .loginAndModule('buyer', 'item') - .accessToSearchResult('Melee weapon combat first 15cm') + .accessToSearchResult('Melee weapon combat fist 15cm') .accessToSection('item.card.basicData'); }); diff --git a/modules/item/back/methods/item/specs/filter.spec.js b/modules/item/back/methods/item/specs/filter.spec.js index 7efb50033..7344b3116 100644 --- a/modules/item/back/methods/item/specs/filter.spec.js +++ b/modules/item/back/methods/item/specs/filter.spec.js @@ -22,12 +22,12 @@ describe('item filter()', () => { order: 'isActive ASC, name', limit: 8 }; - let tags = [{value: 'combat first', tagFk: 58}]; + let tags = [{value: 'combat fist', tagFk: 58}]; let result = await app.models.Item.filter({args: {filter: filter, typeFk: 2, tags: tags}}); expect(result.length).toEqual(1); expect(result[0].id).toEqual(2); - expect(result[0].name).toEqual('Melee weapon combat first 15cm'); + expect(result[0].name).toEqual('Melee weapon combat fist 15cm'); expect(result[0].type).toEqual('Anthurium'); }); });