diff --git a/e2e/full/home.e2e.js b/e2e/full/home.e2e.js index 3541b7fb..7c3f4110 100644 --- a/e2e/full/home.e2e.js +++ b/e2e/full/home.e2e.js @@ -77,5 +77,19 @@ describe('home', function() { expect(firstElementText).to.be.eventually.equal(draggedElementText); }); + after(async function() { + //restore project position + let dragableElements = element.all(by.css('.project-list-single')); + let dragElement = dragableElements.get(0); + let dragElementLink = dragElement.element(by.css('a')); + + await utils.common.waitLoader(); + + draggedElementText = await dragElementLink.getText(); + + await utils.common.drag(dragElement, dragableElements.get(3)); + await browser.waitForAngular(); + }); + }); }); diff --git a/e2e/full/user-stories/user-story-detail.e2e.js b/e2e/full/user-stories/user-story-detail.e2e.js index 26e490d9..9fd86dcb 100644 --- a/e2e/full/user-stories/user-story-detail.e2e.js +++ b/e2e/full/user-stories/user-story-detail.e2e.js @@ -67,7 +67,7 @@ describe('User story detail', function(){ it('block', utils.detail.blockTesting); - it('attachments', utils.detail.attachmentTesting) + it('attachments', utils.detail.attachmentTesting); it('screenshot', async function() { await utils.common.takeScreenshot("user-stories", "detail updated"); diff --git a/e2e/helpers/detail-helper.js b/e2e/helpers/detail-helper.js index 6823c4f8..7fa7a8ce 100644 --- a/e2e/helpers/detail-helper.js +++ b/e2e/helpers/detail-helper.js @@ -110,7 +110,7 @@ helper.statusSelector = function() { }; helper.assignedTo = function() { - let el = $('.assigned-to'); + let el = $('.menu-secondary .assigned-to'); let obj = { el: el, @@ -430,6 +430,9 @@ helper.watchersLightbox = function() { selectFirst: async function() { el.$$('div[data-user-id]').first().click(); await browser.waitForAngular(); + }, + getFirstName: function() { + return el.$$('div[data-user-id] .watcher-name').first().getText(); } }; diff --git a/e2e/utils/detail.js b/e2e/utils/detail.js index c5e75b3e..ef75b79d 100644 --- a/e2e/utils/detail.js +++ b/e2e/utils/detail.js @@ -72,9 +72,9 @@ helper.assignedToTesting = async function() { let userName = detailHelper.assignedTo().getUserName(); await assignedTo.clear(); assignedTo.assign(); - assignToLightbox.waitOpen(); + await assignToLightbox.waitOpen(); assignToLightbox.selectFirst(); - assignToLightbox.waitClose(); + await assignToLightbox.waitClose(); let newUserName = assignedTo.getUserName(); expect(newUserName).to.be.not.equal(userName); } @@ -191,12 +191,13 @@ helper.watchersTesting = async function() { //Add watcher watchersHelper.addWatcher(); - watchersLightboxHelper.waitOpen(); + await watchersLightboxHelper.waitOpen(); + let newWatcherName = await watchersLightboxHelper.getFirstName(); watchersLightboxHelper.selectFirst(); - watchersLightboxHelper.waitClose(); + await watchersLightboxHelper.waitClose(); let newUserNames = await watchersHelper.getWatchersUserNames(); - expect(newUserNames.join()).to.be.equal(userNames + ',Administrator'); + expect(newUserNames.join()).to.be.equal(userNames + ',' + newWatcherName); //Clear watchers await watchersHelper.removeAllWathchers();