Adding block testing
parent
4f01ceb2f2
commit
bc172f6d80
|
@ -34,11 +34,12 @@ describe('Issue detail', async function(){
|
||||||
await utils.common.takeScreenshot("issues", "detail updated");
|
await utils.common.takeScreenshot("issues", "detail updated");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('block', utils.detail.blockTesting);
|
||||||
|
|
||||||
it('delete', utils.detail.deleteTesting);
|
it('delete', utils.detail.deleteTesting);
|
||||||
|
|
||||||
it('redirected', async function (){
|
it('redirected', async function (){
|
||||||
let url = await browser.getCurrentUrl();
|
let url = await browser.getCurrentUrl();
|
||||||
expect(url.endsWith(issuesUrl)).to.be.true;
|
expect(url.endsWith(issuesUrl)).to.be.true;
|
||||||
});
|
});
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -30,11 +30,13 @@ describe('Task detail', function(){
|
||||||
it('assigned to edition', utils.detail.assignedToTesting);
|
it('assigned to edition', utils.detail.assignedToTesting);
|
||||||
|
|
||||||
it('history', utils.detail.historyTesting);
|
it('history', utils.detail.historyTesting);
|
||||||
|
|
||||||
it('screenshot', async function() {
|
it('screenshot', async function() {
|
||||||
await utils.common.takeScreenshot("tasks", "detail updated");
|
await utils.common.takeScreenshot("tasks", "detail updated");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('block', utils.detail.blockTesting);
|
||||||
|
|
||||||
it('delete', utils.detail.deleteTesting);
|
it('delete', utils.detail.deleteTesting);
|
||||||
|
|
||||||
it('redirected', async function (){
|
it('redirected', async function (){
|
||||||
|
|
|
@ -29,11 +29,13 @@ describe('User story detail', function(){
|
||||||
it('assigned to edition', utils.detail.assignedToTesting);
|
it('assigned to edition', utils.detail.assignedToTesting);
|
||||||
|
|
||||||
it('history', utils.detail.historyTesting);
|
it('history', utils.detail.historyTesting);
|
||||||
|
|
||||||
it('screenshot', async function() {
|
it('screenshot', async function() {
|
||||||
await utils.common.takeScreenshot("user-stories", "detail updated");
|
await utils.common.takeScreenshot("user-stories", "detail updated");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('block', utils.detail.blockTesting);
|
||||||
|
|
||||||
it('delete', utils.detail.deleteTesting);
|
it('delete', utils.detail.deleteTesting);
|
||||||
|
|
||||||
it('redirected', async function (){
|
it('redirected', async function (){
|
||||||
|
|
|
@ -200,6 +200,47 @@ helper.history = function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
helper.block = function() {
|
||||||
|
let el = $('tg-block-button');
|
||||||
|
|
||||||
|
let obj = {
|
||||||
|
el:el,
|
||||||
|
block: function() {
|
||||||
|
el.$('.item-block').click();
|
||||||
|
},
|
||||||
|
|
||||||
|
unblock: async function() {
|
||||||
|
el.$('.item-unblock').click();
|
||||||
|
await browser.waitForAngular();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
helper.blockLightbox = function() {
|
||||||
|
let el = $('div[tg-lb-block]');
|
||||||
|
|
||||||
|
let obj = {
|
||||||
|
el: el,
|
||||||
|
waitOpen: function() {
|
||||||
|
return utils.lightbox.open(el);
|
||||||
|
},
|
||||||
|
waitClose: function() {
|
||||||
|
return utils.lightbox.close(el);
|
||||||
|
},
|
||||||
|
fill: function(text) {
|
||||||
|
el.$('textarea').sendKeys(text);
|
||||||
|
},
|
||||||
|
submit: async function() {
|
||||||
|
el.$('a.button-green').click();
|
||||||
|
await browser.waitForAngular();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
|
||||||
helper.delete = function() {
|
helper.delete = function() {
|
||||||
let el = $('tg-delete-button');
|
let el = $('tg-delete-button');
|
||||||
|
|
||||||
|
|
|
@ -83,6 +83,20 @@ helper.historyTesting = async function() {
|
||||||
expect(activitiesCounter).to.be.least(newCommentsCounter);
|
expect(activitiesCounter).to.be.least(newCommentsCounter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
helper.blockTesting = 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();
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
helper.deleteTesting = async function() {
|
helper.deleteTesting = async function() {
|
||||||
let deleteHelper = detailHelper.delete();
|
let deleteHelper = detailHelper.delete();
|
||||||
await deleteHelper.delete();
|
await deleteHelper.delete();
|
||||||
|
|
Loading…
Reference in New Issue