From f5fab7d79963d29345d1a97aa1678bef5eb9a490 Mon Sep 17 00:00:00 2001 From: douglasrice Date: Mon, 27 Sep 2021 10:34:08 +0100 Subject: [PATCH] Add retries to login section of e2e (CMC-1713) (#198) --- e2e/pages/login.page.js | 4 ++-- e2e/tests/smoke_test.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/pages/login.page.js b/e2e/pages/login.page.js index 0878aad83c..9214ebad62 100644 --- a/e2e/pages/login.page.js +++ b/e2e/pages/login.page.js @@ -9,11 +9,11 @@ module.exports = { submitButton: 'input[value="Sign in"]', signIn(user) { - I.waitForElement(this.fields.username); + I.retry(5).waitForElement(this.fields.username); I.fillField(this.fields.username, user.email); I.fillField(this.fields.password, user.password); - I.waitForElement(this.submitButton); + I.retry(5).waitForElement(this.submitButton); I.click(this.submitButton); }, }; diff --git a/e2e/tests/smoke_test.js b/e2e/tests/smoke_test.js index 9eda256411..f73192eafe 100644 --- a/e2e/tests/smoke_test.js +++ b/e2e/tests/smoke_test.js @@ -3,6 +3,6 @@ const config = require('../config.js'); Feature('Smoke tests @smoke-tests'); Scenario('Sign in as solicitor user', async ({I}) => { - await I.login(config.applicantSolicitorUser); - await I.see('Case list'); + await I.retry(5).login(config.applicantSolicitorUser); + await I.retry(5).see('Case list'); });