From 8a9bcc38228e423dcb3f868b76c0de69c460e85f Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Wed, 20 Mar 2019 14:43:38 +0100 Subject: [PATCH] #777 e2e item.log --- e2e/helpers/selectors.js | 2 +- e2e/paths/item-module/11_item_log.spec.js | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index a52a4f9c8..7f9c523b3 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -293,7 +293,7 @@ export default { warehouseAutocomplete: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"]', }, itemLog: { - fourthLineCreatedProperty: 'vn-item-log > vn-log vn-tbody > vn-tr:nth-child(4) > vn-td > vn-one:nth-child(3) > div span:nth-child(3)', + anyLineCreated: 'vn-item-log > vn-log vn-tbody > vn-tr', fifthLineCreatedProperty: 'vn-item-log > vn-log vn-tbody > vn-tr:nth-child(5) > vn-td > vn-one:nth-child(3) > div span:nth-child(3)', }, ticketSummary: { diff --git a/e2e/paths/item-module/11_item_log.spec.js b/e2e/paths/item-module/11_item_log.spec.js index 825efb6ca..4b9593c54 100644 --- a/e2e/paths/item-module/11_item_log.spec.js +++ b/e2e/paths/item-module/11_item_log.spec.js @@ -59,11 +59,12 @@ describe('Item log path', () => { expect(url.hash).toContain('/log'); }); - it(`should confirm the log is showing the created item temporary name`, async() => { - const fourthLineCreatedProperty = await nightmare - .waitToGetProperty(selectors.itemLog.fourthLineCreatedProperty, 'innerText'); + it(`should confirm the log is showing 5 entries`, async() => { + const anyLineCreatedCount = await nightmare + .wait(selectors.itemLog.anyLineCreated) + .countElement(selectors.itemLog.anyLineCreated); - expect(fourthLineCreatedProperty).toEqual('Knowledge artifact'); + expect(anyLineCreatedCount).toEqual(5); }); it(`should confirm the log is showing the intrastat for the created item`, async() => {