fix e2e test when there is no watchers at the begining

stable
Juanfran 2015-09-10 14:22:56 +02:00
parent d0c02b66df
commit d097ae4b88
4 changed files with 19 additions and 7 deletions

View File

@ -33,6 +33,8 @@ describe('modules', function() {
expect(utils.notifications.success.open()).to.be.eventually.equal(true); expect(utils.notifications.success.open()).to.be.eventually.equal(true);
expect(active).to.be.false; expect(active).to.be.false;
await utils.notifications.success.close();
}); });
it('enable module', async function() { it('enable module', async function() {
@ -53,6 +55,8 @@ describe('modules', function() {
expect(utils.notifications.success.open()).to.be.eventually.equal(true); expect(utils.notifications.success.open()).to.be.eventually.equal(true);
expect(active).to.be.true; expect(active).to.be.true;
await utils.notifications.success.close();
}); });
it('enable videoconference', async function() { it('enable videoconference', async function() {

View File

@ -99,7 +99,10 @@ describe('taskboard', function() {
createTaskLightbox.subject().sendKeys(formFields.subject); createTaskLightbox.subject().sendKeys(formFields.subject);
await createTaskLightbox.description().sendKeys(formFields.description); await createTaskLightbox.description().sendKeys(formFields.description);
utils.common.takeScreenshot('taskboard', 'edit-task-filled'); await utils.common.takeScreenshot('taskboard', 'edit-task-filled');
// send form fail when all tests are launched
await browser.sleep(1000);
}); });
it('send form', async function() { it('send form', async function() {

View File

@ -118,9 +118,11 @@ helper.assignedTo = function() {
clear: async function() { clear: async function() {
await browser.actions().mouseMove(el).perform(); await browser.actions().mouseMove(el).perform();
if (await el.$('.icon-delete').isPresent()) {
el.$('.icon-delete').click(); el.$('.icon-delete').click();
await utils.lightbox.confirm.ok(); await utils.lightbox.confirm.ok();
await browser.waitForAngular(); await browser.waitForAngular();
}
}, },
assign: function() { assign: function() {
@ -408,11 +410,11 @@ helper.watchers = function() {
}, },
removeAllWathchers: async function() { removeAllWathchers: async function() {
let deleteIcons = await el.$$('.icon-delete') let deleteIcons = await el.$$('.icon-delete');
let totalWatchers = deleteIcons.length; let totalWatchers = deleteIcons.length;
while (totalWatchers > 0) { while (totalWatchers > 0) {
el.$$('.icon-delete').first().click() el.$$('.icon-delete').first().click();
await utils.lightbox.confirm.ok(); await utils.lightbox.confirm.ok();
await browser.waitForAngular(); await browser.waitForAngular();
totalWatchers --; totalWatchers --;

View File

@ -197,7 +197,10 @@ helper.watchersTesting = async function() {
await watchersLightboxHelper.waitClose(); await watchersLightboxHelper.waitClose();
let newUserNames = await watchersHelper.getWatchersUserNames(); let newUserNames = await watchersHelper.getWatchersUserNames();
expect(newUserNames.join()).to.be.equal(userNames + ',' + newWatcherName);
userNames.push(newWatcherName);
expect(newUserNames.join(',')).to.be.equal(userNames.join(','));
//Clear watchers //Clear watchers
await watchersHelper.removeAllWathchers(); await watchersHelper.removeAllWathchers();