From 59c67290ca1747e6abe7a18801ffd644ba7d1f52 Mon Sep 17 00:00:00 2001 From: Joan Date: Wed, 21 Nov 2018 14:30:32 +0100 Subject: [PATCH 1/2] Modules index do not load data automatically --- client/agency/src/zone/index/index.html | 4 +-- client/claim/src/index/index.html | 7 ++-- client/claim/src/locale/es.yml | 1 + client/client/src/index/index.html | 4 +++ client/client/src/locale/es.yml | 1 + .../src/components/searchbar/searchbar.js | 23 ++++++++---- client/core/src/components/table/index.js | 2 +- client/item/src/index/index.html | 4 +++ client/item/src/locale/es.yml | 1 + client/order/src/index/index.html | 5 +-- client/order/src/locale/es.yml | 1 + client/route/src/locale/es.yml | 3 +- client/salix/src/styles/misc.scss | 5 ++- client/ticket/src/index/index.html | 4 +-- client/ticket/src/index/index.spec.js | 3 -- client/travel/src/index/index.html | 4 +-- client/travel/src/locale/es.yml | 2 ++ .../claim-module/01_edit_basic_data.spec.js | 2 +- .../client-module/01_create_client.spec.js | 4 +-- .../client-module/02_edit_basic_data.spec.js | 4 +-- .../client-module/03_edit_fiscal_data.spec.js | 4 +-- .../client-module/04_edit_pay_method.spec.js | 2 +- .../client-module/05_add_address.spec.js | 2 +- .../06_add_address_notes.spec.js | 2 +- .../client-module/07_edit_web_access.spec.js | 2 +- e2e/paths/client-module/08_add_notes.spec.js | 2 +- e2e/paths/client-module/09_add_credit.spec.js | 2 +- e2e/paths/client-module/10_add_greuge.spec.js | 2 +- e2e/paths/client-module/11_mandate.spec.js | 2 +- .../12_lock_of_verified_data.spec.js | 10 +++--- e2e/paths/client-module/13_log.spec.js | 2 +- e2e/paths/client-module/14_risk.spec.js | 4 +-- e2e/paths/item-module/01_item_summary.spec.js | 2 +- .../02_edit_item_basic_data.spec.js | 2 +- .../item-module/03_edit_item_tax.spec.js | 2 +- .../item-module/04_create_item_tags.spec.js | 2 +- .../item-module/05_create_item_niche.spec.js | 2 +- .../06_create_item_botanical.spec.js | 2 +- .../07_create_item_barcode.spec.js | 2 +- .../08_item_create_and_clone.spec.js | 6 ++-- .../item-module/09_regularize_item.spec.js | 10 +++--- .../01_create_ticket_observations.spec.js | 24 ++++++------- .../02_delete_ticket_expeditions.spec.js | 2 +- e2e/paths/ticket-module/03_list_sale.spec.js | 4 +-- .../04_create_ticket_packages.spec.js | 4 +-- .../05_create_new_tracking_state.spec.js | 36 +++++++++---------- .../06_edit_basic_data_steps.spec.js | 4 +-- e2e/paths/ticket-module/07_edit_sale.spec.js | 30 ++++++++-------- .../ticket-module/08_list_components.spec.js | 4 +-- .../ticket-module/09_ticket_weekly.spec.js | 14 ++++---- .../ticket-module/10_ticket_request.spec.js | 4 +-- .../ticket-module/11_ticket_diary.spec.js | 4 +-- .../12_delete_ticket_from_descriptor.spec.js | 6 ++-- .../loopback/common/methods/ticket/filter.js | 15 ++++---- 54 files changed, 163 insertions(+), 138 deletions(-) diff --git a/client/agency/src/zone/index/index.html b/client/agency/src/zone/index/index.html index a0e479c66..547dc528d 100644 --- a/client/agency/src/zone/index/index.html +++ b/client/agency/src/zone/index/index.html @@ -47,8 +47,8 @@ - - No results + + Enter a new search diff --git a/client/claim/src/index/index.html b/client/claim/src/index/index.html index 329199b0c..0b574d78d 100644 --- a/client/claim/src/index/index.html +++ b/client/claim/src/index/index.html @@ -13,6 +13,7 @@ panel="vn-claim-search-panel" model="model" expr-builder="$ctrl.exprBuilder(param, value)" + auto-load="true" vn-focus> @@ -42,15 +43,15 @@ {{::claim.claimState.description}} - - No results + + Enter a new search diff --git a/client/claim/src/locale/es.yml b/client/claim/src/locale/es.yml index 09ef3a3a7..e5266af5d 100644 --- a/client/claim/src/locale/es.yml +++ b/client/claim/src/locale/es.yml @@ -6,6 +6,7 @@ Responsible: Responsable Remove sale: Borrar linea Claim Id: Id reclamación Created: Creado +Enter a new search: Introduce una nueva búsqueda #sections Claims: Reclamaciones diff --git a/client/client/src/index/index.html b/client/client/src/index/index.html index 482393f1b..c82338aad 100644 --- a/client/client/src/index/index.html +++ b/client/client/src/index/index.html @@ -22,6 +22,10 @@ ng-repeat="client in clients track by client.id" client="::client"> + + Enter a new search + + + Enter a new search + @@ -55,8 +56,8 @@ - - No results + + Enter a new search diff --git a/client/order/src/locale/es.yml b/client/order/src/locale/es.yml index 8e602c775..a7ac7f9f3 100644 --- a/client/order/src/locale/es.yml +++ b/client/order/src/locale/es.yml @@ -3,6 +3,7 @@ Catalog: Catálogo from: desde results: resultados No results: Sin resultados +Enter a new search: Introduce una nueva búsqueda Plant: Planta Flower: Flor Handmade: Confección diff --git a/client/route/src/locale/es.yml b/client/route/src/locale/es.yml index 097dcc517..63efa8289 100644 --- a/client/route/src/locale/es.yml +++ b/client/route/src/locale/es.yml @@ -1,2 +1,3 @@ Routes: Rutas -List: Listado \ No newline at end of file +List: Listado +Enter a new search: Introduce una nueva búsqueda \ No newline at end of file diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss index 0e9647433..568ced898 100644 --- a/client/salix/src/styles/misc.scss +++ b/client/salix/src/styles/misc.scss @@ -239,10 +239,13 @@ vn-main-block { margin: 0 auto; } +a.vn-list-item { + @extend %clickable; +} + .vn-list-item { @extend .pad-medium; @extend .border-solid-bottom; - @extend %clickable; display: block; text-decoration: none; diff --git a/client/ticket/src/index/index.html b/client/ticket/src/index/index.html index 85d173184..a4aea9f6b 100644 --- a/client/ticket/src/index/index.html +++ b/client/ticket/src/index/index.html @@ -87,8 +87,8 @@ - - No results + + Enter a new search diff --git a/client/ticket/src/index/index.spec.js b/client/ticket/src/index/index.spec.js index 6f9858e0d..e202de3d7 100644 --- a/client/ticket/src/index/index.spec.js +++ b/client/ticket/src/index/index.spec.js @@ -23,9 +23,6 @@ describe('Component vnTicketIndex', () => { $window = _$window_; $element = $compile('')($rootScope); controller = $element.controller('vnTicketIndex'); - - $httpBackend.whenGET(/\/ticket\/api\/Tickets\/filter.*/).respond(tickets); - $httpBackend.flush(); })); afterEach(() => { diff --git a/client/travel/src/index/index.html b/client/travel/src/index/index.html index 2f60f14fb..82df60185 100644 --- a/client/travel/src/index/index.html +++ b/client/travel/src/index/index.html @@ -47,8 +47,8 @@ - - No results + + Enter a new search diff --git a/client/travel/src/locale/es.yml b/client/travel/src/locale/es.yml index 90fe3aecf..26506ceba 100644 --- a/client/travel/src/locale/es.yml +++ b/client/travel/src/locale/es.yml @@ -7,6 +7,8 @@ Landed: F. llegada Delivered: Enviado Received: Recibido Travel id: Id envío +Enter a new search: Introduce una nueva búsqueda + #sections Travels: Envíos List: Listado diff --git a/e2e/paths/claim-module/01_edit_basic_data.spec.js b/e2e/paths/claim-module/01_edit_basic_data.spec.js index 189dff00f..12afbf54b 100644 --- a/e2e/paths/claim-module/01_edit_basic_data.spec.js +++ b/e2e/paths/claim-module/01_edit_basic_data.spec.js @@ -22,7 +22,7 @@ describe('Claim edit basic data path', () => { it('should search for the claim with id 1', async () => { const resultCount = await nightmare - .wait(selectors.claimsIndex.searchResult) + .wait(selectors.claimsIndex.searchClaimInput) .type(selectors.claimsIndex.searchClaimInput, '1') .click(selectors.claimsIndex.searchButton) .waitForNumberOfElements(selectors.claimsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/01_create_client.spec.js b/e2e/paths/client-module/01_create_client.spec.js index 9d3599313..544913b97 100644 --- a/e2e/paths/client-module/01_create_client.spec.js +++ b/e2e/paths/client-module/01_create_client.spec.js @@ -20,7 +20,7 @@ describe('Client create path', () => { it(`should search for the user Carol Danvers to confirm it isn't created yet`, async () => { const result = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Carol Danvers') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 0) @@ -112,7 +112,7 @@ describe('Client create path', () => { it(`should search for the user Carol Danvers to confirm it exists`, async () => { const result = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Carol Danvers') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/02_edit_basic_data.spec.js b/e2e/paths/client-module/02_edit_basic_data.spec.js index 16d65ec90..419a077d7 100644 --- a/e2e/paths/client-module/02_edit_basic_data.spec.js +++ b/e2e/paths/client-module/02_edit_basic_data.spec.js @@ -22,7 +22,7 @@ describe('Client Edit basicData path', () => { it('should search for the user Bruce Wayne', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Bruce Wayne') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) @@ -139,7 +139,7 @@ describe('Client Edit basicData path', () => { it('should now search for the user Ptonomy Wallace', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Ptonomy Wallace') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/03_edit_fiscal_data.spec.js b/e2e/paths/client-module/03_edit_fiscal_data.spec.js index 2e4f14cb6..4c9282e4f 100644 --- a/e2e/paths/client-module/03_edit_fiscal_data.spec.js +++ b/e2e/paths/client-module/03_edit_fiscal_data.spec.js @@ -22,7 +22,7 @@ describe('Client Edit fiscalData path', () => { it('should search for the user Bruce Banner', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) @@ -106,7 +106,7 @@ describe('Client Edit fiscalData path', () => { it('should now search for the user Bruce Banner', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/04_edit_pay_method.spec.js b/e2e/paths/client-module/04_edit_pay_method.spec.js index 5e6b0b67b..612995949 100644 --- a/e2e/paths/client-module/04_edit_pay_method.spec.js +++ b/e2e/paths/client-module/04_edit_pay_method.spec.js @@ -22,7 +22,7 @@ describe('Client Edit pay method path', () => { it('should search for the user Bruce Banner', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/05_add_address.spec.js b/e2e/paths/client-module/05_add_address.spec.js index c4b7eab39..0e8b54d9b 100644 --- a/e2e/paths/client-module/05_add_address.spec.js +++ b/e2e/paths/client-module/05_add_address.spec.js @@ -22,7 +22,7 @@ describe('Client Add address path', () => { it('should search for the user Bruce Banner', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/06_add_address_notes.spec.js b/e2e/paths/client-module/06_add_address_notes.spec.js index 857f77e80..1ac6dca8b 100644 --- a/e2e/paths/client-module/06_add_address_notes.spec.js +++ b/e2e/paths/client-module/06_add_address_notes.spec.js @@ -22,7 +22,7 @@ describe('Client add address notes path', () => { it('should search for the user Petter Parker', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/07_edit_web_access.spec.js b/e2e/paths/client-module/07_edit_web_access.spec.js index 3cb5c8b90..79077a74c 100644 --- a/e2e/paths/client-module/07_edit_web_access.spec.js +++ b/e2e/paths/client-module/07_edit_web_access.spec.js @@ -22,7 +22,7 @@ describe('Client Edit web access path', () => { it('should search for the user Bruce Banner', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/08_add_notes.spec.js b/e2e/paths/client-module/08_add_notes.spec.js index a6721906e..56f1cadf5 100644 --- a/e2e/paths/client-module/08_add_notes.spec.js +++ b/e2e/paths/client-module/08_add_notes.spec.js @@ -22,7 +22,7 @@ describe('Client Add notes path', () => { it('should search for the user Bruce Banner', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Bruce Banner') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/09_add_credit.spec.js b/e2e/paths/client-module/09_add_credit.spec.js index 17a321ece..a34abdfaa 100644 --- a/e2e/paths/client-module/09_add_credit.spec.js +++ b/e2e/paths/client-module/09_add_credit.spec.js @@ -22,7 +22,7 @@ describe('Client Add credit path', () => { it('should search for the user Hank Pym', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Hank Pym') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/10_add_greuge.spec.js b/e2e/paths/client-module/10_add_greuge.spec.js index 1ba67afa0..9d2ba56e8 100644 --- a/e2e/paths/client-module/10_add_greuge.spec.js +++ b/e2e/paths/client-module/10_add_greuge.spec.js @@ -22,7 +22,7 @@ describe('Client Add greuge path', () => { it('should search for the user Petter Parker', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/11_mandate.spec.js b/e2e/paths/client-module/11_mandate.spec.js index dc48abb1c..ec7e792cb 100644 --- a/e2e/paths/client-module/11_mandate.spec.js +++ b/e2e/paths/client-module/11_mandate.spec.js @@ -22,7 +22,7 @@ describe('Client mandate path', () => { it('should search for the user Petter Parker', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/12_lock_of_verified_data.spec.js b/e2e/paths/client-module/12_lock_of_verified_data.spec.js index 706795f00..30f52a22e 100644 --- a/e2e/paths/client-module/12_lock_of_verified_data.spec.js +++ b/e2e/paths/client-module/12_lock_of_verified_data.spec.js @@ -23,7 +23,7 @@ describe('Client lock verified data path', () => { it('should search for the user Petter Parker', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) @@ -105,7 +105,7 @@ describe('Client lock verified data path', () => { it('should search again for the user Petter Parker', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) @@ -209,7 +209,7 @@ describe('Client lock verified data path', () => { it('should again search for the user Petter Parker', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) @@ -280,7 +280,7 @@ describe('Client lock verified data path', () => { it('should now search again for the user Petter Parker', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) @@ -362,7 +362,7 @@ describe('Client lock verified data path', () => { it('should once again search for the user Petter Parker', async () => { const resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/13_log.spec.js b/e2e/paths/client-module/13_log.spec.js index c694a9c39..fe167e3b1 100644 --- a/e2e/paths/client-module/13_log.spec.js +++ b/e2e/paths/client-module/13_log.spec.js @@ -22,7 +22,7 @@ describe('Client log path', () => { it('should search for the user David Charles Haller', async () => { let resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'DavidCharlesHaller') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/client-module/14_risk.spec.js b/e2e/paths/client-module/14_risk.spec.js index 04a7b5652..c605cbbf6 100644 --- a/e2e/paths/client-module/14_risk.spec.js +++ b/e2e/paths/client-module/14_risk.spec.js @@ -22,7 +22,7 @@ describe('Client risk path', () => { it('should search for the user Petter Parker', async () => { let resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) @@ -137,7 +137,7 @@ describe('Client risk path', () => { it('should now search for the user Petter Parker', async () => { let resultCount = await nightmare - .wait(selectors.clientsIndex.searchResult) + .wait(selectors.clientsIndex.searchClientInput) .type(selectors.clientsIndex.searchClientInput, 'Petter Parker') .click(selectors.clientsIndex.searchButton) .waitForNumberOfElements(selectors.clientsIndex.searchResult, 1) diff --git a/e2e/paths/item-module/01_item_summary.spec.js b/e2e/paths/item-module/01_item_summary.spec.js index 309343ece..6b7038806 100644 --- a/e2e/paths/item-module/01_item_summary.spec.js +++ b/e2e/paths/item-module/01_item_summary.spec.js @@ -20,7 +20,7 @@ describe('Item summary path', () => { it('should search for the item Gem of Time', async () => { const result = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) diff --git a/e2e/paths/item-module/02_edit_item_basic_data.spec.js b/e2e/paths/item-module/02_edit_item_basic_data.spec.js index 1d375c296..86ed10ba4 100644 --- a/e2e/paths/item-module/02_edit_item_basic_data.spec.js +++ b/e2e/paths/item-module/02_edit_item_basic_data.spec.js @@ -20,7 +20,7 @@ describe('Item Edit basic data path', () => { it('should search for the item Gem of Mind', async () => { const resultCount = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Gem of Mind') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) diff --git a/e2e/paths/item-module/03_edit_item_tax.spec.js b/e2e/paths/item-module/03_edit_item_tax.spec.js index 5ad0cb39b..e0cf5aaad 100644 --- a/e2e/paths/item-module/03_edit_item_tax.spec.js +++ b/e2e/paths/item-module/03_edit_item_tax.spec.js @@ -20,7 +20,7 @@ describe('Item edit tax path', () => { it('should search for the item Gem of Time', async () => { const resultCount = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) diff --git a/e2e/paths/item-module/04_create_item_tags.spec.js b/e2e/paths/item-module/04_create_item_tags.spec.js index 541bb543b..2830077d3 100644 --- a/e2e/paths/item-module/04_create_item_tags.spec.js +++ b/e2e/paths/item-module/04_create_item_tags.spec.js @@ -20,7 +20,7 @@ describe('Item create tags path', () => { it('should search for the item Gem of Time', async () => { const resultCount = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) diff --git a/e2e/paths/item-module/05_create_item_niche.spec.js b/e2e/paths/item-module/05_create_item_niche.spec.js index b659a464f..fe14f4735 100644 --- a/e2e/paths/item-module/05_create_item_niche.spec.js +++ b/e2e/paths/item-module/05_create_item_niche.spec.js @@ -20,7 +20,7 @@ describe('Item create niche path', () => { it('should search for the item Gem of Time', async () => { const resultCount = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) diff --git a/e2e/paths/item-module/06_create_item_botanical.spec.js b/e2e/paths/item-module/06_create_item_botanical.spec.js index cb1e3e498..1c3880f88 100644 --- a/e2e/paths/item-module/06_create_item_botanical.spec.js +++ b/e2e/paths/item-module/06_create_item_botanical.spec.js @@ -20,7 +20,7 @@ describe('Item Create botanical path', () => { it('should search for the item Mjolnir', async () => { const result = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Mjolnir') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) diff --git a/e2e/paths/item-module/07_create_item_barcode.spec.js b/e2e/paths/item-module/07_create_item_barcode.spec.js index 52432687e..7e4eb7fa4 100644 --- a/e2e/paths/item-module/07_create_item_barcode.spec.js +++ b/e2e/paths/item-module/07_create_item_barcode.spec.js @@ -20,7 +20,7 @@ describe('Item Create barcodes path', () => { it('should search for the item Gem of Time', async () => { const result = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Gem of Time') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) diff --git a/e2e/paths/item-module/08_item_create_and_clone.spec.js b/e2e/paths/item-module/08_item_create_and_clone.spec.js index d33424405..f7cb7024e 100644 --- a/e2e/paths/item-module/08_item_create_and_clone.spec.js +++ b/e2e/paths/item-module/08_item_create_and_clone.spec.js @@ -20,7 +20,7 @@ describe('Item Create/Clone path', () => { it(`should search for the item Infinity Gauntlet to confirm it isn't created yet`, async () => { const result = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 0) @@ -110,7 +110,7 @@ describe('Item Create/Clone path', () => { it(`should search for the item Infinity Gauntlet`, async () => { const result = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) @@ -133,7 +133,7 @@ describe('Item Create/Clone path', () => { it('should search for the item Infinity Gauntlet and find two', async () => { const result = await nightmare .waitToClick(selectors.itemTags.goToItemIndexButton) - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Infinity Gauntlet') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 2) diff --git a/e2e/paths/item-module/09_regularize_item.spec.js b/e2e/paths/item-module/09_regularize_item.spec.js index bb0f3ba2d..5b8e1d896 100644 --- a/e2e/paths/item-module/09_regularize_item.spec.js +++ b/e2e/paths/item-module/09_regularize_item.spec.js @@ -19,7 +19,7 @@ describe('Item regularize path', () => { it('should search for the item Mjolnir', async () => { const resultCount = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Mjolnir') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) @@ -57,7 +57,7 @@ describe('Item regularize path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -104,7 +104,7 @@ describe('Item regularize path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.itemsButton) - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .parsedUrl(); expect(url.hash).toEqual('#!/item/index'); @@ -112,7 +112,7 @@ describe('Item regularize path', () => { it('should search for the item Mjolnir once again', async () => { const resultCount = await nightmare - .wait(selectors.itemsIndex.searchResult) + .wait(selectors.itemsIndex.searchItemInput) .type(selectors.itemsIndex.searchItemInput, 'Mjolnir') .click(selectors.itemsIndex.searchButton) .waitForNumberOfElements(selectors.itemsIndex.searchResult, 1) @@ -150,7 +150,7 @@ describe('Item regularize path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); diff --git a/e2e/paths/ticket-module/01_create_ticket_observations.spec.js b/e2e/paths/ticket-module/01_create_ticket_observations.spec.js index f6564f998..3f7b973c7 100644 --- a/e2e/paths/ticket-module/01_create_ticket_observations.spec.js +++ b/e2e/paths/ticket-module/01_create_ticket_observations.spec.js @@ -10,44 +10,44 @@ describe('Ticket', () => { .waitForLogin('employee'); }); - it('should access to the tickets index by clicking the tickets button', (done) => { + it('should access to the tickets index by clicking the tickets button', done => { return nightmare .click(selectors.moduleAccessView.ticketsSectionButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl() - .then((url) => { + .then(url => { expect(url.hash).toEqual('#!/ticket/index'); done(); }).catch(done.fail); }); - it('should search for the ticket with id 1', (done) => { + it('should search for the ticket with id 1', done => { return nightmare .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:1') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .countElement(selectors.ticketsIndex.searchResult) - .then((result) => { + .then(result => { expect(result).toEqual(1); done(); }).catch(done.fail); }); - it(`should click on the search result to access to the ticket notes`, (done) => { + it(`should click on the search result to access to the ticket notes`, done => { return nightmare .waitForTextInElement(selectors.ticketsIndex.searchResult, '1') .waitToClick(selectors.ticketsIndex.searchResult) .waitToClick(selectors.ticketNotes.notesButton) .waitForURL('observation') .url() - .then((url) => { + .then(url => { expect(url).toContain('observation'); done(); }).catch(done.fail); }); - it(`should click create a new note and delete a former one`, (done) => { + it(`should click create a new note and delete a former one`, done => { return nightmare .waitToClick(selectors.ticketNotes.firstNoteRemoveButton) .waitToClick(selectors.ticketNotes.addNoteButton) @@ -56,24 +56,24 @@ describe('Ticket', () => { .type(selectors.ticketNotes.firstDescriptionInput, 'description') .click(selectors.ticketNotes.submitNotesButton) .waitForLastSnackbar() - .then((result) => { + .then(result => { expect(result).toEqual('Data saved!'); done(); }).catch(done.fail); }); - it(`should confirm the note is the expected one`, (done) => { + it(`should confirm the note is the expected one`, done => { return nightmare .click(selectors.ticketPackages.packagesButton) .wait(selectors.ticketPackages.firstPackageSelect) .click(selectors.ticketNotes.notesButton) .waitProperty(selectors.ticketNotes.firstNoteSelect, 'value') - .then((result) => { + .then(result => { expect(result).toEqual('observation one'); return nightmare .getProperty(selectors.ticketNotes.firstDescriptionInput, 'value'); }) - .then((result) => { + .then(result => { expect(result).toEqual('description'); done(); }).catch(done.fail); diff --git a/e2e/paths/ticket-module/02_delete_ticket_expeditions.spec.js b/e2e/paths/ticket-module/02_delete_ticket_expeditions.spec.js index 459463708..d5f5ccc70 100644 --- a/e2e/paths/ticket-module/02_delete_ticket_expeditions.spec.js +++ b/e2e/paths/ticket-module/02_delete_ticket_expeditions.spec.js @@ -13,7 +13,7 @@ describe('Ticket', () => { it('should access to the tickets index by clicking the tickets button', async () => { const url = await nightmare .click(selectors.moduleAccessView.ticketsSectionButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); diff --git a/e2e/paths/ticket-module/03_list_sale.spec.js b/e2e/paths/ticket-module/03_list_sale.spec.js index 00579a4c9..06de70a4d 100644 --- a/e2e/paths/ticket-module/03_list_sale.spec.js +++ b/e2e/paths/ticket-module/03_list_sale.spec.js @@ -14,7 +14,7 @@ describe('Ticket List sale path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -22,7 +22,7 @@ describe('Ticket List sale path', () => { it('should search for the ticket 8', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:8') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) diff --git a/e2e/paths/ticket-module/04_create_ticket_packages.spec.js b/e2e/paths/ticket-module/04_create_ticket_packages.spec.js index 18ada323d..bde9a3505 100644 --- a/e2e/paths/ticket-module/04_create_ticket_packages.spec.js +++ b/e2e/paths/ticket-module/04_create_ticket_packages.spec.js @@ -14,7 +14,7 @@ describe('Ticket Create packages path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -22,7 +22,7 @@ describe('Ticket Create packages path', () => { it('should search for the ticket 1', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:1') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) diff --git a/e2e/paths/ticket-module/05_create_new_tracking_state.spec.js b/e2e/paths/ticket-module/05_create_new_tracking_state.spec.js index aace93d8c..3fab84ec8 100644 --- a/e2e/paths/ticket-module/05_create_new_tracking_state.spec.js +++ b/e2e/paths/ticket-module/05_create_new_tracking_state.spec.js @@ -10,97 +10,97 @@ describe('Ticket', () => { .waitForLogin('production'); }); - it('should click on the Tickets button of the top bar menu', (done) => { + it('should click on the Tickets button of the top bar menu', done => { return nightmare .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl() - .then((url) => { + .then(url => { expect(url.hash).toEqual('#!/ticket/index'); done(); }).catch(done.fail); }); - it('should search for the ticket 1', (done) => { + it('should search for the ticket 1', done => { return nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:1') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) .countElement(selectors.ticketsIndex.searchResult) - .then((result) => { + .then(result => { expect(result).toEqual(1); done(); }).catch(done.fail); }); - it(`should click on the search result to access to the ticket Tracking`, (done) => { + it(`should click on the search result to access to the ticket Tracking`, done => { return nightmare .waitForTextInElement(selectors.ticketsIndex.searchResult, 'address 21') .waitToClick(selectors.ticketsIndex.searchResult) .waitToClick(selectors.ticketTracking.trackingButton) .waitForURL('tracking/index') .url() - .then((url) => { + .then(url => { expect(url).toContain('tracking/index'); done(); }).catch(done.fail); }); - it('should access to the create state view by clicking the create floating button', (done) => { + it('should access to the create state view by clicking the create floating button', done => { return nightmare .click(selectors.ticketTracking.createStateButton) .wait(selectors.createStateView.stateInput) .parsedUrl() - .then((url) => { + .then(url => { expect(url.hash).toContain('tracking/edit'); done(); }).catch(done.fail); }); - it(`should attempt create a new state but receive an error if state is empty`, (done) => { + it(`should attempt create a new state but receive an error if state is empty`, done => { return nightmare .click(selectors.createStateView.saveStateButton) .waitForLastSnackbar() - .then((result) => { + .then(result => { expect(result).toEqual('No changes to save'); done(); }).catch(done.fail); }); - it(`should attempt create a new state then clear and save it`, (done) => { + it(`should attempt create a new state then clear and save it`, done => { return nightmare .waitToClick(selectors.createStateView.stateInput) .waitToClick(selectors.createStateView.stateInputOptionOne) .waitToClick(selectors.createStateView.clearStateInputButton) .click(selectors.createStateView.saveStateButton) .waitForLastSnackbar() - .then((result) => { + .then(result => { expect(result).toEqual('Data saved!'); done(); }).catch(done.fail); }); - it('should again access to the create state view by clicking the create floating button', (done) => { + it('should again access to the create state view by clicking the create floating button', done => { return nightmare .click(selectors.ticketTracking.createStateButton) .wait(selectors.createStateView.stateInput) .parsedUrl() - .then((url) => { + .then(url => { expect(url.hash).toContain('tracking/edit'); done(); }).catch(done.fail); }); - it(`should create a new state`, (done) => { + it(`should create a new state`, done => { return nightmare .waitToClick(selectors.createStateView.stateInput) .waitToClick(selectors.createStateView.stateInputOptionOne) .click(selectors.createStateView.saveStateButton) .waitForLastSnackbar() - .then((result) => { + .then(result => { expect(result).toEqual('Data saved!'); done(); }).catch(done.fail); diff --git a/e2e/paths/ticket-module/06_edit_basic_data_steps.spec.js b/e2e/paths/ticket-module/06_edit_basic_data_steps.spec.js index 24e479787..111db197c 100644 --- a/e2e/paths/ticket-module/06_edit_basic_data_steps.spec.js +++ b/e2e/paths/ticket-module/06_edit_basic_data_steps.spec.js @@ -15,7 +15,7 @@ describe('Ticket', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl() .then(url => { expect(url.hash).toEqual('#!/ticket/index'); @@ -25,7 +25,7 @@ describe('Ticket', () => { it('should search for the ticket 11', done => { return nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:11') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) diff --git a/e2e/paths/ticket-module/07_edit_sale.spec.js b/e2e/paths/ticket-module/07_edit_sale.spec.js index 44a310673..cbbe1a4bd 100644 --- a/e2e/paths/ticket-module/07_edit_sale.spec.js +++ b/e2e/paths/ticket-module/07_edit_sale.spec.js @@ -14,7 +14,7 @@ describe('Ticket Edit sale path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -22,7 +22,7 @@ describe('Ticket Edit sale path', () => { it('should search for a specific ticket', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:16') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -57,7 +57,7 @@ describe('Ticket Edit sale path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -65,7 +65,7 @@ describe('Ticket Edit sale path', () => { it('should again search for a specific ticket', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:16') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -154,7 +154,7 @@ describe('Ticket Edit sale path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:16') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -275,7 +275,7 @@ describe('Ticket Edit sale path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -283,7 +283,7 @@ describe('Ticket Edit sale path', () => { it('should search the ticket', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:16') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -354,7 +354,7 @@ describe('Ticket Edit sale path', () => { it('should go back to the original ticket sales section', async () => { const url = await nightmare .waitToClick(selectors.itemsIndex.goBackToModuleIndexButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:16') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -378,7 +378,7 @@ describe('Ticket Edit sale path', () => { it('should go back to the receiver ticket sales section', async () => { const url = await nightmare .waitToClick(selectors.itemsIndex.goBackToModuleIndexButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:12') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -422,7 +422,7 @@ describe('Ticket Edit sale path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -430,7 +430,7 @@ describe('Ticket Edit sale path', () => { it('should search for a specific created ticket', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'nickname:(address 21) stateFk:2') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -507,7 +507,7 @@ describe('Ticket Edit sale path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -515,7 +515,7 @@ describe('Ticket Edit sale path', () => { it('should now search for a specific ticket', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:16') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -599,7 +599,7 @@ describe('Ticket Edit sale path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -607,7 +607,7 @@ describe('Ticket Edit sale path', () => { it('should once again search for a specific ticket', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:16') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) diff --git a/e2e/paths/ticket-module/08_list_components.spec.js b/e2e/paths/ticket-module/08_list_components.spec.js index c983e4bc7..41ac6d5af 100644 --- a/e2e/paths/ticket-module/08_list_components.spec.js +++ b/e2e/paths/ticket-module/08_list_components.spec.js @@ -14,7 +14,7 @@ describe('Ticket List components path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -22,7 +22,7 @@ describe('Ticket List components path', () => { it('should search for the ticket 1', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:1') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) diff --git a/e2e/paths/ticket-module/09_ticket_weekly.spec.js b/e2e/paths/ticket-module/09_ticket_weekly.spec.js index b180dea9e..d729b8428 100644 --- a/e2e/paths/ticket-module/09_ticket_weekly.spec.js +++ b/e2e/paths/ticket-module/09_ticket_weekly.spec.js @@ -14,7 +14,7 @@ describe('Ticket descriptor path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -35,7 +35,7 @@ describe('Ticket descriptor path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -43,7 +43,7 @@ describe('Ticket descriptor path', () => { it('should search for the ticket 11', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:11') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -76,7 +76,7 @@ describe('Ticket descriptor path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -97,7 +97,7 @@ describe('Ticket descriptor path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -105,7 +105,7 @@ describe('Ticket descriptor path', () => { it('should now search for the ticket 11', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:11') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -138,7 +138,7 @@ describe('Ticket descriptor path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); diff --git a/e2e/paths/ticket-module/10_ticket_request.spec.js b/e2e/paths/ticket-module/10_ticket_request.spec.js index 1aa3d61ac..2989e5505 100644 --- a/e2e/paths/ticket-module/10_ticket_request.spec.js +++ b/e2e/paths/ticket-module/10_ticket_request.spec.js @@ -14,7 +14,7 @@ describe('Ticket purchase request path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -22,7 +22,7 @@ describe('Ticket purchase request path', () => { it('should search for a specific ticket', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:16') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) diff --git a/e2e/paths/ticket-module/11_ticket_diary.spec.js b/e2e/paths/ticket-module/11_ticket_diary.spec.js index bdd7076d8..39904786e 100644 --- a/e2e/paths/ticket-module/11_ticket_diary.spec.js +++ b/e2e/paths/ticket-module/11_ticket_diary.spec.js @@ -15,7 +15,7 @@ describe('Ticket diary path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -23,7 +23,7 @@ describe('Ticket diary path', () => { it('should search for a specific ticket', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:1') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) diff --git a/e2e/paths/ticket-module/12_delete_ticket_from_descriptor.spec.js b/e2e/paths/ticket-module/12_delete_ticket_from_descriptor.spec.js index b8d0b6bae..00940e4a4 100644 --- a/e2e/paths/ticket-module/12_delete_ticket_from_descriptor.spec.js +++ b/e2e/paths/ticket-module/12_delete_ticket_from_descriptor.spec.js @@ -14,7 +14,7 @@ describe('Ticket descriptor path', () => { .waitToClick(selectors.globalItems.applicationsMenuButton) .wait(selectors.globalItems.applicationsMenuVisible) .waitToClick(selectors.globalItems.ticketsButton) - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .parsedUrl(); expect(url.hash).toEqual('#!/ticket/index'); @@ -22,7 +22,7 @@ describe('Ticket descriptor path', () => { it('should search for a specific ticket', async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:17') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) @@ -60,7 +60,7 @@ describe('Ticket descriptor path', () => { it(`should search for the deleted ticket and check it's date`, async () => { const result = await nightmare - .wait(selectors.ticketsIndex.searchResult) + .wait(selectors.ticketsIndex.searchTicketInput) .type(selectors.ticketsIndex.searchTicketInput, 'id:17') .click(selectors.ticketsIndex.searchButton) .waitForNumberOfElements(selectors.ticketsIndex.searchResult, 1) diff --git a/services/loopback/common/methods/ticket/filter.js b/services/loopback/common/methods/ticket/filter.js index 61a63938f..7dfc955d7 100644 --- a/services/loopback/common/methods/ticket/filter.js +++ b/services/loopback/common/methods/ticket/filter.js @@ -149,14 +149,6 @@ module.exports = Self => { stmt.merge(conn.makeSuffix(filter)); stmts.push(stmt); - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticket'); - stmts.push(` - CREATE TEMPORARY TABLE tmp.ticket - (INDEX (ticketFk)) - ENGINE = MEMORY - SELECT id ticketFk FROM tmp.filter`); - stmts.push('CALL ticketGetTotal()'); - stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticketGetProblems'); stmts.push(` CREATE TEMPORARY TABLE tmp.ticketGetProblems @@ -166,6 +158,13 @@ module.exports = Self => { FROM tmp.filter`); stmts.push('CALL ticketGetProblems()'); + stmts.push('DROP TEMPORARY TABLE IF EXISTS tmp.ticket'); + stmts.push(` + CREATE TEMPORARY TABLE tmp.ticket + (INDEX (ticketFk)) ENGINE = MEMORY + SELECT id ticketFk FROM tmp.filter`); + stmts.push('CALL ticketGetTotal()'); + stmt = new ParameterizedSQL(` SELECT f.*, From add94d233b8425e65a96726f2dfd0f3195d1ca88 Mon Sep 17 00:00:00 2001 From: Gerard Date: Wed, 21 Nov 2018 14:56:33 +0100 Subject: [PATCH 2/2] #842 add salesPerson field to the client.index search panel --- client/client/src/index/index.js | 1 + client/client/src/search-panel/index.html | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/client/client/src/index/index.js b/client/client/src/index/index.js index 2bcf77084..0c7fd098f 100644 --- a/client/client/src/index/index.js +++ b/client/client/src/index/index.js @@ -28,6 +28,7 @@ export default class Controller { case 'fi': case 'postcode': case 'email': + case 'salesPersonFk': return {[param]: value}; } } diff --git a/client/client/src/search-panel/index.html b/client/client/src/search-panel/index.html index 14619ed94..e7313fe4e 100644 --- a/client/client/src/search-panel/index.html +++ b/client/client/src/search-panel/index.html @@ -25,6 +25,15 @@ vn-one label="Name" model="filter.name"> + + {{firstName}} {{name}} +