From 98ed5e93d58047ff1ccf15c5c7af73ba062e992e Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 31 Mar 2020 10:02:25 +0200 Subject: [PATCH] E2E fixes: client balance, ticket index --- e2e/helpers/selectors.js | 2 +- e2e/paths/02-client/14_balance.spec.js | 4 ++-- e2e/paths/05-ticket/18_index_payout.spec.js | 4 +--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 9d6992be0..4e94c73ff 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -372,7 +372,7 @@ export default { payoutButton: 'vn-ticket-index vn-button[icon="icon-recovery"]', payoutCompany: '.vn-dialog vn-autocomplete[ng-model="$ctrl.receipt.companyFk"]', payoutBank: '.vn-dialog vn-autocomplete[ng-model="$ctrl.receipt.bankFk"]', - submitPayout: '.vn-dialog vn-button[label="Save"]', + submitPayout: '.vn-dialog button[response="accept"]', searchWeeklyResult: 'vn-ticket-weekly-index vn-table vn-tbody > vn-tr', searchResultDate: 'vn-ticket-summary [label=Landed] span', topbarSearch: 'vn-searchbar', diff --git a/e2e/paths/02-client/14_balance.spec.js b/e2e/paths/02-client/14_balance.spec.js index 15486b72c..eb3608f47 100644 --- a/e2e/paths/02-client/14_balance.spec.js +++ b/e2e/paths/02-client/14_balance.spec.js @@ -1,7 +1,7 @@ import selectors from '../../helpers/selectors'; import getBrowser from '../../helpers/puppeteer'; -describe('Client balance path', () => { +fdescribe('Client balance path', () => { let browser; let page; beforeAll(async() => { @@ -108,7 +108,7 @@ describe('Client balance path', () => { it('should now search for the user Petter Parker', async() => { await page.accessToSearchResult('Petter Parker'); - await page.waitForState('client.card.balance.index'); + await page.accessToSection('client.card.balance.index'); }); it('should not be able to click the new payment button as it isnt present', async() => { diff --git a/e2e/paths/05-ticket/18_index_payout.spec.js b/e2e/paths/05-ticket/18_index_payout.spec.js index 749428c44..3bbe4b550 100644 --- a/e2e/paths/05-ticket/18_index_payout.spec.js +++ b/e2e/paths/05-ticket/18_index_payout.spec.js @@ -16,9 +16,7 @@ describe('Ticket index payout path', () => { it('should navigate to the ticket index', async() => { await page.loginAndModule('administrative', 'ticket'); - let url = await page.expectURL('#!/ticket/index'); - - expect(url).toBe(true); + await page.waitForState('ticket.index'); }); it('should check three tickets 2 of a clinet and 1 of another', async() => {