From f6c725d0074dd6e7b96a85ac4c6c09cc6713e36d Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Fri, 8 Mar 2019 11:01:10 +0100 Subject: [PATCH] more e2e repairs --- e2e/helpers/selectors.js | 1 + e2e/paths/item-module/10_item_index.spec.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 9c7f71770..d67aa5722 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -172,6 +172,7 @@ export default { firstPaymentConfirmed: 'vn-client-web-payment vn-tr:nth-child(1) vn-icon[icon="check"][aria-hidden="false"]' }, itemsIndex: { + searchIcon: `vn-item-index vn-searchbar vn-icon[icon="search"]`, goBackToModuleIndexButton: `vn-item-descriptor a[href="#!/item/index"]`, createItemButton: `${components.vnFloatButton}`, searchResult: `vn-item-index a.vn-tr`, diff --git a/e2e/paths/item-module/10_item_index.spec.js b/e2e/paths/item-module/10_item_index.spec.js index 36d8d07d8..9c9dc1dce 100644 --- a/e2e/paths/item-module/10_item_index.spec.js +++ b/e2e/paths/item-module/10_item_index.spec.js @@ -6,7 +6,8 @@ describe('Item index path', () => { beforeAll(() => { nightmare - .loginAndModule('salesPerson', 'item'); + .loginAndModule('salesPerson', 'item') + .waitToClick(selectors.itemsIndex.searchIcon); }); it('should click on the fields to show button to open the list of columns to show', async() => { @@ -40,6 +41,7 @@ describe('Item index path', () => { const imageVisible = await nightmare .waitToClick(selectors.itemsIndex.searchResult) .waitToClick(selectors.itemsIndex.goBackToModuleIndexButton) + .waitToClick(selectors.itemsIndex.searchIcon) .wait(selectors.itemsIndex.searchResult) .isVisible(selectors.itemsIndex.firstItemImage); @@ -77,7 +79,8 @@ describe('Item index path', () => { const idVisible = await nightmare .waitToClick(selectors.itemsIndex.searchResult) .waitToClick(selectors.itemsIndex.goBackToModuleIndexButton) - .wait(1999) + .waitToClick(selectors.itemsIndex.searchIcon) + .wait(selectors.itemsIndex.searchResult) .isVisible(selectors.itemsIndex.firstItemId); expect(idVisible).toBeTruthy();