From 915728397c2c97bc87468abb281b0e947b325f42 Mon Sep 17 00:00:00 2001 From: Carlos Jimenez Ruiz Date: Fri, 23 Oct 2020 15:34:09 +0200 Subject: [PATCH] minor refactor --- e2e/paths/02-client/20_credit_insurance.spec.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/e2e/paths/02-client/20_credit_insurance.spec.js b/e2e/paths/02-client/20_credit_insurance.spec.js index 278eb861a6..904a51145e 100644 --- a/e2e/paths/02-client/20_credit_insurance.spec.js +++ b/e2e/paths/02-client/20_credit_insurance.spec.js @@ -55,15 +55,18 @@ describe('Client credit insurance path', () => { expect(message.text).toEqual('The grade must be similar to the last one'); }); - it('should provide a correct grade and succesfully save a new credit then be redirected to the credit index', async() => { + it('should provide a correct grade and succesfully save a new credit', async() => { await page.write(selectors.clientCreditInsurance.newInsuranceGrade, '999'); await page.waitToClick(selectors.clientCreditInsurance.saveNewInsuranceCredit); const message = await page.waitForSnackbar(); - await page.waitForState('client.card.creditInsurance.insurance.index'); expect(message.text).toEqual('Data saved!'); }); + it('should be redirected to the credit index', async() => { + await page.waitForState('client.card.creditInsurance.insurance.index'); + }); + it('should check the amount of credits is the expected', async() => { const result = await page.countElement(selectors.clientCreditInsurance.anyCreditInsuranceLine);