fix e2e test when there is no watchers at the begining
parent
d0c02b66df
commit
d097ae4b88
|
@ -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() {
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
el.$('.icon-delete').click();
|
if (await el.$('.icon-delete').isPresent()) {
|
||||||
await utils.lightbox.confirm.ok();
|
el.$('.icon-delete').click();
|
||||||
await browser.waitForAngular();
|
await utils.lightbox.confirm.ok();
|
||||||
|
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 --;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue