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