From c796132e77aaf9abe72e2e647921ce69c36b90d0 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Wed, 2 Sep 2020 15:20:28 +0200 Subject: [PATCH] e2e + fixtures amended + refactor --- db/dump/fixtures.sql | 34 +++++++++++----------- e2e/helpers/selectors.js | 24 +++++++-------- e2e/paths/04-item/10_index.spec.js | 1 - modules/entry/front/latest-buys/index.html | 8 ++--- 4 files changed, 33 insertions(+), 34 deletions(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 4dc540955..22fa2076a 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -735,23 +735,23 @@ INSERT INTO `vn`.`intrastat`(`id`, `description`, `taxClassFk`, `taxCodeFk`) INSERT INTO `vn`.`item`(`id`, `typeFk`, `size`, `inkFk`, `stems`, `originFk`, `description`, `producerFk`, `intrastatFk`, `isOnOffer`, `expenceFk`, `isBargain`, `comment`, `relevancy`, `image`, `taxClassFk`, `subName`, `minPrice`) VALUES - (1, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, NULL, 0), - (2, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, NULL, 0), - (3, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, NULL, 0), - (4, 1, 60, 'AMR', 1, 1, 'Increases block', 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, NULL, 0), - (5, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), - (6, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), - (7, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), - (8, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66540, 1, NULL, 0), - (9, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 65540, 1, NULL, 0), - (10, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 61692, 1, NULL, 0), - (11, 1, 60, 'AMR', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 66090, 2, NULL, 0), - (12, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), - (13, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), - (14, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), - (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), - (16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), - (71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0); + (1, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 67, 1, NULL, 0), + (2, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 66, 1, NULL, 0), + (3, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 65, 1, NULL, 0), + (4, 1, 60, 'AMR', 1, 1, 'Increases block', 1, 05080000, 1, 4751000000, 0, NULL, 0, 69, 2, NULL, 0), + (5, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 74, 2, NULL, 0), + (6, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 62, 2, NULL, 0), + (7, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 64, 2, NULL, 0), + (8, 2, 70, 'AMA', 1, 1, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 75, 1, NULL, 0), + (9, 2, 70, 'AZL', 1, 2, NULL, 1, 06021010, 0, 2000000000, 0, NULL, 0, 76, 1, NULL, 0), + (10, 1, 60, 'AMR', 1, 3, NULL, 1, 05080000, 0, 4751000000, 0, NULL, 0, 77, 1, NULL, 0), + (11, 1, 60, 'AMR', 1, 1, NULL, 1, 05080000, 1, 4751000000, 0, NULL, 0, 78, 2, NULL, 0), + (12, 3, 30, 'GRE', 1, 2, NULL, 2, 06021010, 1, 4751000000, 0, NULL, 0, 82, 2, NULL, 0), + (13, 5, 30, 'GRE', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 83, 2, NULL, 0), + (14, 5, 90, 'AZL', 1, 2, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 84, 2, NULL, 0), + (15, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), + (16, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 0, 4751000000, 0, NULL, 0, 67350, 2, NULL, 0), + (71, 4, NULL, NULL, NULL, 1, NULL, NULL, 06021010, 1, 4751000000, 0, NULL, 0, 88, 2, NULL, 0); INSERT INTO `vn`.`expedition`(`id`, `agencyModeFk`, `ticketFk`, `isBox`, `created`, `itemFk`, `counter`, `checked`, `workerFk`) VALUES diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 3a48d881e..607ace096 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -225,18 +225,18 @@ export default { firstItemImage: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(1) > img', firstItemImageTd: 'vn-item-index vn-table a:nth-child(1) vn-td:nth-child(1)', firstItemId: 'vn-item-index vn-tbody > a:nth-child(1) > vn-td:nth-child(2)', - idCheckbox: '.vn-popover.shown vn-horizontal:nth-child(2) > vn-check', - stemsCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check', - sizeCheckbox: '.vn-popover.shown vn-horizontal:nth-child(4) > vn-check', - nicheCheckbox: '.vn-popover.shown vn-horizontal:nth-child(5) > vn-check', - typeCheckbox: '.vn-popover.shown vn-horizontal:nth-child(6) > vn-check', - categoryCheckbox: '.vn-popover.shown vn-horizontal:nth-child(7) > vn-check', - intrastadCheckbox: '.vn-popover.shown vn-horizontal:nth-child(8) > vn-check', - originCheckbox: '.vn-popover.shown vn-horizontal:nth-child(9) > vn-check', - buyerCheckbox: '.vn-popover.shown vn-horizontal:nth-child(10) > vn-check', - destinyCheckbox: '.vn-popover.shown vn-horizontal:nth-child(11) > vn-check', - taxClassCheckbox: '.vn-popover.shown vn-horizontal:nth-child(12) > vn-check', - saveFieldsButton: '.vn-popover.shown vn-horizontal:nth-child(16) > vn-button > button' + idCheckbox: '.vn-popover.shown vn-horizontal:nth-child(1) > vn-check', + stemsCheckbox: '.vn-popover.shown vn-horizontal:nth-child(2) > vn-check', + sizeCheckbox: '.vn-popover.shown vn-horizontal:nth-child(3) > vn-check', + nicheCheckbox: '.vn-popover.shown vn-horizontal:nth-child(4) > vn-check', + typeCheckbox: '.vn-popover.shown vn-horizontal:nth-child(5) > vn-check', + categoryCheckbox: '.vn-popover.shown vn-horizontal:nth-child(6) > vn-check', + intrastadCheckbox: '.vn-popover.shown vn-horizontal:nth-child(7) > vn-check', + originCheckbox: '.vn-popover.shown vn-horizontal:nth-child(8) > vn-check', + buyerCheckbox: '.vn-popover.shown vn-horizontal:nth-child(9) > vn-check', + destinyCheckbox: '.vn-popover.shown vn-horizontal:nth-child(10) > vn-check', + taxClassCheckbox: '.vn-popover.shown vn-horizontal:nth-child(11) > vn-check', + saveFieldsButton: '.vn-popover.shown vn-button[label="Save"] > button' }, itemCreateView: { temporalName: 'vn-item-create vn-textfield[ng-model="$ctrl.item.provisionalName"]', diff --git a/e2e/paths/04-item/10_index.spec.js b/e2e/paths/04-item/10_index.spec.js index b4c4b636e..60e807246 100644 --- a/e2e/paths/04-item/10_index.spec.js +++ b/e2e/paths/04-item/10_index.spec.js @@ -55,7 +55,6 @@ describe('Item index path', () => { }); it('should mark all unchecked boxes to leave the index as it was', async() => { - await page.waitFor(3000); // otherwise the snackbar doesnt appear some times. await page.waitToClick(selectors.itemsIndex.fieldsToShowButton); await page.waitToClick(selectors.itemsIndex.idCheckbox); await page.waitToClick(selectors.itemsIndex.stemsCheckbox); diff --git a/modules/entry/front/latest-buys/index.html b/modules/entry/front/latest-buys/index.html index 4386971ad..4aa3aeae2 100644 --- a/modules/entry/front/latest-buys/index.html +++ b/modules/entry/front/latest-buys/index.html @@ -24,13 +24,13 @@ vn-smart-table="latestBuys"> - + - - Id + Picture + Id Packing Grouping Description @@ -89,7 +89,7 @@ {{::buy.grouping | dashIfEmpty}} - + {{::buy.description | dashIfEmpty}} {{::buy.size}}