fix watchers e2e
parent
18b5041dd1
commit
8f27a774af
|
@ -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();
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue