fix public project e2e paths
parent
96f1bb78d4
commit
c08b80c8b7
|
@ -44,7 +44,7 @@
|
|||
}
|
||||
.privacy-project {
|
||||
cursor: pointer;
|
||||
height: 500px;
|
||||
height: 50px;
|
||||
left: -10px;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
|
|
|
@ -58,31 +58,41 @@ describe('Public', async function(){
|
|||
});
|
||||
|
||||
it('us detail', function() {
|
||||
browser.get(browser.params.glob.host + 'project/project-3/us/81');
|
||||
browser.get(browser.params.glob.host + 'project/project-3/backlog');
|
||||
|
||||
utils.common.waitLoader();
|
||||
utils.nav
|
||||
.init()
|
||||
.us(0)
|
||||
.go();
|
||||
|
||||
utils.common.takeScreenshot('public', 'us-detail');
|
||||
});
|
||||
|
||||
it('issue detail', function() {
|
||||
browser.get(browser.params.glob.host + 'project/project-3/issue/95');
|
||||
browser.get(browser.params.glob.host + 'project/project-3/issues');
|
||||
|
||||
utils.common.waitLoader();
|
||||
utils.nav
|
||||
.init()
|
||||
.issue(0)
|
||||
.go();
|
||||
|
||||
utils.common.takeScreenshot('public', 'issue-detail');
|
||||
});
|
||||
|
||||
it('task detail', function() {
|
||||
browser.get(browser.params.glob.host + 'project/project-3/task/2');
|
||||
browser.get(browser.params.glob.host + 'project/project-3/backlog');
|
||||
|
||||
utils.common.waitLoader();
|
||||
utils.nav
|
||||
.init()
|
||||
.taskboard(0)
|
||||
.task(0)
|
||||
.go();
|
||||
|
||||
utils.common.takeScreenshot('public', 'task-detail');
|
||||
});
|
||||
|
||||
it('team', function() {
|
||||
browser.get(browser.params.glob.host + 'project/project-5/team');
|
||||
browser.get(browser.params.glob.host + 'project/project-3/team');
|
||||
|
||||
utils.common.waitLoader();
|
||||
|
||||
|
|
|
@ -10,83 +10,89 @@ var actions = {
|
|||
|
||||
common.link(project);
|
||||
|
||||
common.waitLoader();
|
||||
return common.waitLoader();
|
||||
},
|
||||
issues: function(index) {
|
||||
common.link($('#nav-issues a'));
|
||||
|
||||
common.waitLoader();
|
||||
return common.waitLoader();
|
||||
},
|
||||
issue: function(index) {
|
||||
let issue = $$('section.issues-table .row.table-main .subject a').get(index);
|
||||
|
||||
common.link(issue);
|
||||
|
||||
common.waitLoader();
|
||||
return common.waitLoader();
|
||||
},
|
||||
backlog: function() {
|
||||
common.link($('#nav-backlog a'));
|
||||
|
||||
common.waitLoader();
|
||||
return common.waitLoader();
|
||||
},
|
||||
us: function(index) {
|
||||
let us = $$('.user-story-name>a').get(index);
|
||||
|
||||
common.link(us);
|
||||
|
||||
common.waitLoader();
|
||||
return common.waitLoader();
|
||||
},
|
||||
taskboard: function(index) {
|
||||
let link = $$('.sprints .button-gray').get(index);
|
||||
|
||||
common.link(link);
|
||||
|
||||
common.waitLoader();
|
||||
return common.waitLoader();
|
||||
},
|
||||
task: function(index) {
|
||||
common.link($$('div[tg-taskboard-task] a.task-name').get(index));
|
||||
|
||||
common.waitLoader();
|
||||
return common.waitLoader();
|
||||
}
|
||||
};
|
||||
|
||||
var nav = {
|
||||
actions: [],
|
||||
project: function(index) {
|
||||
this.actions.push(actions.project.bind(null, index));
|
||||
return nav;
|
||||
return this;
|
||||
},
|
||||
issues: function() {
|
||||
this.actions.push(actions.issues);
|
||||
return nav;
|
||||
return this;
|
||||
},
|
||||
issue: function(index) {
|
||||
this.actions.push(actions.issue.bind(null, index));
|
||||
return nav;
|
||||
return this;
|
||||
},
|
||||
backlog: function(index) {
|
||||
this.actions.push(actions.backlog.bind(null, index));
|
||||
return nav;
|
||||
return this;
|
||||
},
|
||||
us: function(index) {
|
||||
this.actions.push(actions.us.bind(null, index));
|
||||
return nav;
|
||||
return this;
|
||||
},
|
||||
taskboard: function(index) {
|
||||
this.actions.push(actions.taskboard.bind(null, index));
|
||||
return nav;
|
||||
return this;
|
||||
},
|
||||
task: function(index) {
|
||||
this.actions.push(actions.task.bind(null, index));
|
||||
return nav;
|
||||
return this;
|
||||
},
|
||||
go: function() {
|
||||
for (let action of this.actions) {
|
||||
action();
|
||||
let promise = this.actions[0]();
|
||||
|
||||
for (let i = 1; i < this.actions.length; i++) {
|
||||
promise = promise.then(this.actions[i]);
|
||||
}
|
||||
|
||||
return promise;
|
||||
}
|
||||
};
|
||||
|
||||
helper.init = function() {
|
||||
return nav;
|
||||
let newNav = Object.create(nav);
|
||||
newNav.actions = [];
|
||||
|
||||
return newNav;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue