diff --git a/e2e/suites/user-profile/change-password.e2e.js b/e2e/suites/user-profile/change-password.e2e.js index 301ab3e4..6ba3247d 100644 --- a/e2e/suites/user-profile/change-password.e2e.js +++ b/e2e/suites/user-profile/change-password.e2e.js @@ -25,9 +25,11 @@ describe('change password', function() { await $('#new-password').sendKeys('123456'); await $('#retype-password').sendKeys('000'); - $('button[type="submit"]').click(); + $('.submit-button').click(); - expect(utils.notifications.error.open()).to.be.eventually.equal(true); + let waitErrorOpen = await utils.notifications.error.open(); + + expect(waitErrorOpen).to.be.ok; }); it('incorrect current password', async function() { @@ -37,7 +39,9 @@ describe('change password', function() { $('button[type="submit"]').click(); - expect(utils.notifications.error.open()).to.be.eventually.equal(true); + let waitErrorOpen = await utils.notifications.error.open(); + + expect(waitErrorOpen).to.be.ok; }); it('change password', async function() { @@ -47,7 +51,9 @@ describe('change password', function() { $('button[type="submit"]').click(); - expect(utils.notifications.success.open()).to.be.eventually.equal(true); + let waitSuccessOpen = await utils.notifications.success.open(); + + expect(waitSuccessOpen).to.be.ok; }); after(async function() { @@ -61,6 +67,8 @@ describe('change password', function() { $('button[type="submit"]').click(); + await utils.notifications.success.open(); + await browser.waitForAngular(); - }) + }); }); diff --git a/e2e/suites/user-profile/edit-user-profile.e2e.js b/e2e/suites/user-profile/edit-user-profile.e2e.js index 3c22a3c2..cb601fc6 100644 --- a/e2e/suites/user-profile/edit-user-profile.e2e.js +++ b/e2e/suites/user-profile/edit-user-profile.e2e.js @@ -20,7 +20,9 @@ describe('edit user profile', function() { $('button[type="submit"]').click(); - expect(utils.notifications.success.open()).to.be.eventually.equal(true); + let successOpen = await utils.notifications.success.open(); + + expect(successOpen).to.be.ok; // debounce :( await browser.sleep(2000); @@ -91,7 +93,7 @@ describe('edit user profile', function() { await htmlChanges(); - let avatar = imageContainer.$('.avatar'); + let avatar = imageContainer.$('.image'); let src = await avatar.getAttribute('src'); diff --git a/e2e/suites/user-profile/email-notification.e2e.js b/e2e/suites/user-profile/email-notification.e2e.js index d97620db..c84d3806 100644 --- a/e2e/suites/user-profile/email-notification.e2e.js +++ b/e2e/suites/user-profile/email-notification.e2e.js @@ -20,7 +20,9 @@ describe('email notification', function() { row.$$('label').get(0).click(); - expect(utils.notifications.success.open()).to.be.eventually.equal(true); + let notificationOpen = await utils.notifications.success.open(); + + expect(notificationOpen).to.be.true; await utils.notifications.success.close(); }); @@ -30,7 +32,9 @@ describe('email notification', function() { row.$$('label').get(2).click(); - expect(utils.notifications.success.open()).to.be.eventually.equal(true); + let notificationOpen = await utils.notifications.success.open(); + + expect(notificationOpen).to.be.true; await utils.notifications.success.close(); }); @@ -40,7 +44,9 @@ describe('email notification', function() { row.$$('label').get(1).click(); - expect(utils.notifications.success.open()).to.be.eventually.equal(true); + let notificationOpen = await utils.notifications.success.open(); + + expect(notificationOpen).to.be.true; await utils.notifications.success.close(); }); diff --git a/e2e/suites/user-profile/feedback.e2e.js b/e2e/suites/user-profile/feedback.e2e.js index 0d71722c..3e297e6f 100644 --- a/e2e/suites/user-profile/feedback.e2e.js +++ b/e2e/suites/user-profile/feedback.e2e.js @@ -26,6 +26,8 @@ describe('feedback', function() { feedbackLightbox.$('button[type=submit]').click(); - expect(utils.notifications.success.open()).to.be.eventually.equal(true); + let notificationOpen = await utils.notifications.success.open(); + + expect(notificationOpen).to.be.true; }); }); diff --git a/e2e/suites/user-profile/user-profile-activity.e2e.js b/e2e/suites/user-profile/user-profile-activity.e2e.js index 3a21b4fa..191cd46a 100644 --- a/e2e/suites/user-profile/user-profile-activity.e2e.js +++ b/e2e/suites/user-profile/user-profile-activity.e2e.js @@ -53,7 +53,9 @@ describe('user profile - activity', function() { utils.common.takeScreenshot('user-profile', 'image-hover'); - expect(profileEdition.isDisplayed()).to.be.eventually.true; + let isDisplayed = await profileEdition.isDisplayed(); + + expect(isDisplayed).to.be.true; }); }); diff --git a/e2e/suites/user-profile/user-profile-contacts.e2e.js b/e2e/suites/user-profile/user-profile-contacts.e2e.js index d7c6e95e..0b608037 100644 --- a/e2e/suites/user-profile/user-profile-contacts.e2e.js +++ b/e2e/suites/user-profile/user-profile-contacts.e2e.js @@ -15,7 +15,7 @@ describe('user profile - contacts', function() { $$('.tab').get(4).click(); - browser.waitForAngular(); + await browser.waitForAngular(); utils.common.takeScreenshot('user-profile', 'current-user-contacts'); }); @@ -35,7 +35,7 @@ describe('user profile - contacts', function() { $$('.tab').get(5).click(); - browser.waitForAngular(); + await browser.waitForAngular(); utils.common.takeScreenshot('user-profile', 'other-user-contacts'); }); diff --git a/e2e/suites/user-profile/user-profile-projects.e2e.js b/e2e/suites/user-profile/user-profile-projects.e2e.js index c60e3009..9cff8f67 100644 --- a/e2e/suites/user-profile/user-profile-projects.e2e.js +++ b/e2e/suites/user-profile/user-profile-projects.e2e.js @@ -15,7 +15,7 @@ describe('user profile - projects', function() { $$('.tab').get(1).click(); - browser.waitForAngular(); + await browser.waitForAngular(); utils.common.takeScreenshot('user-profile', 'other-user-projects'); }); diff --git a/e2e/suites/user-profile/user-profile-votes.e2e.js b/e2e/suites/user-profile/user-profile-votes.e2e.js index f09c0f44..44ede43d 100644 --- a/e2e/suites/user-profile/user-profile-votes.e2e.js +++ b/e2e/suites/user-profile/user-profile-votes.e2e.js @@ -15,7 +15,7 @@ describe('user profile - votes', function() { $$('.tab').get(2).click(); - browser.waitForAngular(); + await browser.waitForAngular(); utils.common.takeScreenshot('user-profile', 'current-user-votes'); }); @@ -105,7 +105,7 @@ describe('user profile - votes', function() { $$('.tab').get(3).click(); - browser.waitForAngular(); + await browser.waitForAngular(); utils.common.takeScreenshot('user-profile', 'other-user-votes'); });