Test status edition in detail pages
parent
30ece994d4
commit
9ad0caa247
|
@ -19,6 +19,7 @@ describe('Issue detail', async function(){
|
|||
await utils.common.goToFirstIssue();
|
||||
});
|
||||
|
||||
|
||||
it('screenshot', async function() {
|
||||
await utils.common.takeScreenshot("issues", "detail");
|
||||
});
|
||||
|
@ -29,6 +30,8 @@ describe('Issue detail', async function(){
|
|||
|
||||
it('description edition', utils.detail.descriptionTesting);
|
||||
|
||||
it('status edition', utils.detail.statusTesting);
|
||||
|
||||
it('assigned to edition', utils.detail.assignedToTesting);
|
||||
|
||||
it('watchers edition', utils.detail.watchersTesting);
|
||||
|
|
|
@ -29,6 +29,8 @@ describe('Task detail', function(){
|
|||
|
||||
it('description edition', utils.detail.descriptionTesting);
|
||||
|
||||
it('status edition', utils.detail.statusTesting);
|
||||
|
||||
it('assigned to edition', utils.detail.assignedToTesting);
|
||||
|
||||
it('watchers edition', utils.detail.watchersTesting);
|
||||
|
|
|
@ -7,7 +7,7 @@ var chaiAsPromised = require('chai-as-promised');
|
|||
chai.use(chaiAsPromised);
|
||||
var expect = chai.expect;
|
||||
|
||||
describe.only('User story detail', function(){
|
||||
describe('User story detail', function(){
|
||||
let backlogUrl = "";
|
||||
before(async function(){
|
||||
await utils.common.goHome();
|
||||
|
@ -27,6 +27,8 @@ describe.only('User story detail', function(){
|
|||
|
||||
it('description edition', utils.detail.descriptionTesting);
|
||||
|
||||
it('status edition', utils.detail.statusTesting);
|
||||
|
||||
it('assigned to edition', utils.detail.assignedToTesting);
|
||||
|
||||
it('team requirement edition', async function() {
|
||||
|
|
|
@ -87,6 +87,28 @@ helper.tags = function() {
|
|||
return obj;
|
||||
};
|
||||
|
||||
helper.statusSelector = function() {
|
||||
let el = $('.us-status');
|
||||
|
||||
let obj = {
|
||||
el: el,
|
||||
|
||||
setStatus: async function(value) {
|
||||
let status = el.$('.status-data');
|
||||
await utils.popover.open(status, value);
|
||||
return this.getSelectedStatus()
|
||||
},
|
||||
getSelectedStatus: async function(){
|
||||
return el.$$('.status-status').getInnerHtml();
|
||||
},
|
||||
getGeneralStatus: async function(){
|
||||
return el.$$('.us-detail-status').getInnerHtml();
|
||||
},
|
||||
};
|
||||
|
||||
return obj;
|
||||
};
|
||||
|
||||
helper.assignedTo = function() {
|
||||
let el = $('.assigned-to');
|
||||
|
||||
|
|
|
@ -41,6 +41,30 @@ helper.descriptionTesting = async function() {
|
|||
expect(newDescription).to.be.not.equal(description);
|
||||
}
|
||||
|
||||
helper.statusTesting = async function() {
|
||||
let statusHelper = detailHelper.statusSelector();
|
||||
|
||||
// Current status
|
||||
let selectedStatus = await statusHelper.getSelectedStatus();
|
||||
let genericStatus = await statusHelper.getGeneralStatus();
|
||||
expect(selectedStatus+"").to.be.equal(genericStatus+"");
|
||||
|
||||
// Status 1
|
||||
await statusHelper.setStatus(1);
|
||||
|
||||
selectedStatus = await statusHelper.getSelectedStatus();
|
||||
genericStatus = await statusHelper.getGeneralStatus();
|
||||
expect(selectedStatus+"").to.be.equal(genericStatus+"");
|
||||
|
||||
// Status 2
|
||||
await statusHelper.setStatus(2);
|
||||
|
||||
let newSelectedStatus = await statusHelper.getSelectedStatus();
|
||||
let newGenericStatus = await statusHelper.getGeneralStatus();
|
||||
expect(newSelectedStatus+"").to.be.equal(newGenericStatus+"");
|
||||
expect(newSelectedStatus+"").to.be.not.equal(selectedStatus+"");
|
||||
expect(newGenericStatus+"").to.be.not.equal(genericStatus+"");
|
||||
}
|
||||
|
||||
helper.assignedToTesting = async function() {
|
||||
let assignedTo = detailHelper.assignedTo();
|
||||
|
|
Loading…
Reference in New Issue