fix userProfile e2e tests
parent
51ccd1b646
commit
ea91628a13
|
@ -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();
|
||||
})
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue