From de5a15778ea020755b404784ab5e321e7d729823 Mon Sep 17 00:00:00 2001 From: Gerard Date: Tue, 19 Feb 2019 16:37:17 +0100 Subject: [PATCH] e2e fixed --- e2e/helpers/selectors.js | 2 +- e2e/paths/order-module/01_edit_basic_data.spec.js | 5 ++--- e2e/paths/ticket-module/11_ticket_diary.spec.js | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 030b80f8d..3c11a5fbb 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -262,7 +262,7 @@ export default { itemDiary: { thirdTicketId: 'vn-item-diary vn-tbody > vn-tr:nth-child(3) > vn-td:nth-child(2) > span', firstBalance: 'vn-item-diary vn-tbody > vn-tr:nth-child(1) > vn-td.balance', - fifthBalance: 'vn-item-diary vn-tbody > vn-tr.ng-scope.isToday.isIn > vn-td.balance > span', + fifthBalance: 'vn-item-diary vn-tbody > vn-tr:nth-child(5) > vn-td.balance', warehouseAutocomplete: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"]', }, ticketSummary: { diff --git a/e2e/paths/order-module/01_edit_basic_data.spec.js b/e2e/paths/order-module/01_edit_basic_data.spec.js index 014941c09..0efcc4f8c 100644 --- a/e2e/paths/order-module/01_edit_basic_data.spec.js +++ b/e2e/paths/order-module/01_edit_basic_data.spec.js @@ -1,8 +1,7 @@ import selectors from '../../helpers/selectors.js'; import createNightmare from '../../helpers/nightmare'; -// Bug #808 order.basic-data -fdescribe('Order edit basic data path', () => { +describe('Order edit basic data path', () => { const nightmare = createNightmare(); describe('when confirmed order', () => { beforeAll(() => { @@ -16,7 +15,6 @@ fdescribe('Order edit basic data path', () => { const result = await nightmare .autocompleteSearch(selectors.orderBasicData.clientAutocomplete, 'Tony Stark') .autocompleteSearch(selectors.orderBasicData.addressAutocomplete, 'Tony Stark') - .wait(1999) .waitToClick(selectors.orderBasicData.saveButton) .waitForLastSnackbar(); @@ -65,6 +63,7 @@ fdescribe('Order edit basic data path', () => { it('should be able to modify all the properties', async() => { const result = await nightmare .autocompleteSearch(selectors.orderBasicData.clientAutocomplete, 'Tony Stark') + .autocompleteSearch(selectors.orderBasicData.addressAutocomplete, 'Tony Stark') .clearInput(selectors.orderBasicData.observationInput) .write(selectors.orderBasicData.observationInput, 'Observation modified') .waitToClick(selectors.orderBasicData.saveButton) diff --git a/e2e/paths/ticket-module/11_ticket_diary.spec.js b/e2e/paths/ticket-module/11_ticket_diary.spec.js index f5bb6fbc7..933628e5d 100644 --- a/e2e/paths/ticket-module/11_ticket_diary.spec.js +++ b/e2e/paths/ticket-module/11_ticket_diary.spec.js @@ -50,7 +50,7 @@ describe('Ticket diary path', () => { it(`should check the fifth line balance is marked as counter`, async() => { const result = await nightmare - .waitToGetProperty(selectors.itemDiary.fifthBalance, 'className'); + .waitToGetProperty(`${selectors.itemDiary.fifthBalance} > span`, 'className'); expect(result).toContain('counter'); });