fix backlog e2e tests

stable
Juanfran 2015-08-10 09:04:47 +02:00
parent 4be66c8b70
commit 3f5e259503
6 changed files with 30 additions and 10 deletions

View File

@ -505,15 +505,15 @@ describe('backlog', function() {
newUsCount = await backlogHelper.userStories().count();
expect(newUsCount).to.be.equal(usCount);
backlogHelper.goBackFilters();
});
it('filter by tags', async function() {
let usCount = await backlogHelper.userStories().count();
let htmlChanges = await utils.common.outerHtmlChanges('.backlog-table-body');
$$('.filters-cats a').get(1).click();
await browser.waitForAngular();
$$('.filter-list a').first().click();

View File

@ -8,14 +8,12 @@ var expect = chai.expect;
describe('search page', function() {
before(async function(){
browser.get('http://localhost:9001/');
browser.get('http://localhost:9001/project/project-0/');
await utils.common.waitLoader();
});
it('lightbox', async function() {
await utils.common.goToFirstProject();
$('#nav-search').click();
let searchLb = $('div[tg-search-box]');

View File

@ -158,3 +158,7 @@ helper.getSprintsRefs = function(sprint) {
helper.getSprintsTitles = function() {
return $$('div[tg-backlog-sprint="sprint"] .sprint-name span').getText();
};
helper.goBackFilters = function() {
return $$('.filters-step-cat .breadcrumb a').first().click();
};

View File

@ -232,10 +232,8 @@ helper.block = function() {
block: function() {
el.$('.item-block').click();
},
unblock: async function() {
el.$('.item-unblock').click();
await browser.waitForAngular();
}
};
@ -251,7 +249,7 @@ helper.blockLightbox = function() {
return utils.lightbox.open(el);
},
waitClose: function() {
return utils.lightbox.close(el);
return utils.notifications.success.close();
},
fill: function(text) {
el.$('textarea').sendKeys(text);

View File

@ -111,17 +111,23 @@ helper.historyTesting = async function() {
expect(activitiesCounter).to.be.least(newCommentsCounter);
}
helper.blockTesting = function() {
helper.blockTesting = async function() {
let blockHelper = detailHelper.block();
let blockLightboxHelper = detailHelper.blockLightbox();
blockHelper.block();
blockLightboxHelper.waitOpen();
blockLightboxHelper.fill('This is a testing block reason');
blockLightboxHelper.submit();
blockLightboxHelper.waitClose();
await blockLightboxHelper.waitClose();
expect($('.block-description').getText()).to.be.eventually.equal('This is a testing block reason');
expect($('.block-description').isDisplayed()).to.be.eventually.true;
blockHelper.unblock();
expect($('.block-description').isDisplayed()).to.be.eventually.false;
}

View File

@ -19,6 +19,20 @@ notifications.success.open = function() {
});
};
notifications.success.close = function() {
var el = $('.notification-message-success');
return browser
.wait(function() {
return common.hasClass(el, 'inactive');
}, 4000)
.then(function(active) {
return browser.sleep(transition).then(function() {
return active;
});
});
};
notifications.error = {};
notifications.error.open = function() {
var el = $('.notification-message-error');