fix e2e protractor 3 - public
parent
e267a6f385
commit
44d6ea1926
|
@ -60,21 +60,25 @@ describe('Public', async function(){
|
||||||
utils.common.takeScreenshot('public', 'kanban');
|
utils.common.takeScreenshot('public', 'kanban');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('us detail', function() {
|
it('us detail', async function() {
|
||||||
browser.get(browser.params.glob.host + 'project/project-3/backlog');
|
browser.get(browser.params.glob.host + 'project/project-3/backlog');
|
||||||
|
|
||||||
utils.nav
|
await utils.common.waitLoader();
|
||||||
|
|
||||||
|
await utils.nav
|
||||||
.init()
|
.init()
|
||||||
.us(0)
|
.us(0)
|
||||||
.go();
|
.go();
|
||||||
|
|
||||||
utils.common.takeScreenshot('public', 'us-detail');
|
return utils.common.takeScreenshot('public', 'us-detailb');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('issue detail', function() {
|
it('issue detail', async function() {
|
||||||
browser.get(browser.params.glob.host + 'project/project-3/issues');
|
browser.get(browser.params.glob.host + 'project/project-3/issues');
|
||||||
|
|
||||||
utils.nav
|
await utils.common.waitLoader();
|
||||||
|
|
||||||
|
await utils.nav
|
||||||
.init()
|
.init()
|
||||||
.issue(0)
|
.issue(0)
|
||||||
.go();
|
.go();
|
||||||
|
@ -85,7 +89,9 @@ describe('Public', async function(){
|
||||||
it('task detail', async function() {
|
it('task detail', async function() {
|
||||||
browser.get(browser.params.glob.host + 'project/project-3/backlog');
|
browser.get(browser.params.glob.host + 'project/project-3/backlog');
|
||||||
|
|
||||||
utils.nav
|
await utils.common.waitLoader();
|
||||||
|
|
||||||
|
await utils.nav
|
||||||
.init()
|
.init()
|
||||||
.taskboard(0)
|
.taskboard(0)
|
||||||
.task(0)
|
.task(0)
|
||||||
|
|
|
@ -51,7 +51,7 @@ common.browserSkip = function(browserName, name, fn) {
|
||||||
common.link = async function(el) {
|
common.link = async function(el) {
|
||||||
let oldUrl = await browser.getCurrentUrl();
|
let oldUrl = await browser.getCurrentUrl();
|
||||||
|
|
||||||
browser
|
await browser
|
||||||
.actions()
|
.actions()
|
||||||
.mouseMove(el)
|
.mouseMove(el)
|
||||||
.perform();
|
.perform();
|
||||||
|
@ -62,20 +62,22 @@ common.link = async function(el) {
|
||||||
// aren't fired (we need them for the tg-nav calculation). Moving the cursor
|
// aren't fired (we need them for the tg-nav calculation). Moving the cursor
|
||||||
// "a little bit" tries to ensure the href text is really hovered and the
|
// "a little bit" tries to ensure the href text is really hovered and the
|
||||||
// events are fired
|
// events are fired
|
||||||
browser.actions()
|
await browser.actions()
|
||||||
.mouseMove({x: -10, y: -10})
|
.mouseMove({x: -10, y: -10})
|
||||||
.perform();
|
.perform();
|
||||||
|
|
||||||
browser.actions()
|
await browser.actions()
|
||||||
.mouseMove({x: 10, y: 10})
|
.mouseMove({x: 10, y: 10})
|
||||||
.perform();
|
.perform();
|
||||||
|
|
||||||
|
|
||||||
await browser.wait(async function() {
|
await browser.wait(async function() {
|
||||||
let href = await el.getAttribute('href');
|
let href = await el.getAttribute('href');
|
||||||
return href.length > 1 && href !== browser.params.glob.host + "#";
|
|
||||||
|
return (href.length > 1 && href !== browser.params.glob.host + "#");
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
browser
|
await browser
|
||||||
.actions()
|
.actions()
|
||||||
.mouseMove(el)
|
.mouseMove(el)
|
||||||
.click()
|
.click()
|
||||||
|
@ -83,6 +85,7 @@ common.link = async function(el) {
|
||||||
|
|
||||||
return browser.wait(async function() {
|
return browser.wait(async function() {
|
||||||
let newUrl = await browser.getCurrentUrl();
|
let newUrl = await browser.getCurrentUrl();
|
||||||
|
|
||||||
return oldUrl !== newUrl;
|
return oldUrl !== newUrl;
|
||||||
}, 5000);
|
}, 5000);
|
||||||
};
|
};
|
||||||
|
@ -146,12 +149,16 @@ common.login = function(username, password) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
common.logout = function() {
|
common.logout = async function() {
|
||||||
browser.actions()
|
let dropdown = $('div[tg-dropdown-user]');
|
||||||
.mouseMove($('div[tg-dropdown-user]'))
|
|
||||||
|
await browser.actions()
|
||||||
|
.mouseMove(dropdown)
|
||||||
.perform();
|
.perform();
|
||||||
|
|
||||||
common.link($$('.navbar-dropdown li a').last());
|
await common.waitTransitionTime(dropdown);
|
||||||
|
|
||||||
|
$$('.navbar-dropdown li a').last().click();
|
||||||
|
|
||||||
return browser.driver.wait(async function() {
|
return browser.driver.wait(async function() {
|
||||||
let url = await browser.driver.getCurrentUrl();
|
let url = await browser.driver.getCurrentUrl();
|
||||||
|
|
|
@ -23,10 +23,10 @@ var actions = {
|
||||||
|
|
||||||
return common.waitLoader();
|
return common.waitLoader();
|
||||||
},
|
},
|
||||||
issue: function(index) {
|
issue: async 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);
|
await common.link(issue);
|
||||||
|
|
||||||
return common.waitLoader();
|
return common.waitLoader();
|
||||||
},
|
},
|
||||||
|
@ -35,10 +35,10 @@ var actions = {
|
||||||
|
|
||||||
return common.waitLoader();
|
return common.waitLoader();
|
||||||
},
|
},
|
||||||
us: function(index) {
|
us: async function(index) {
|
||||||
let us = $$('.user-story-name>a').get(index);
|
let us = $$('.user-story-name>a').get(index);
|
||||||
|
|
||||||
common.link(us);
|
await common.link(us);
|
||||||
|
|
||||||
return common.waitLoader();
|
return common.waitLoader();
|
||||||
},
|
},
|
||||||
|
@ -46,15 +46,17 @@ var actions = {
|
||||||
browser.get(browser.params.glob.host);
|
browser.get(browser.params.glob.host);
|
||||||
return common.waitLoader();
|
return common.waitLoader();
|
||||||
},
|
},
|
||||||
taskboard: function(index) {
|
taskboard: async function(index) {
|
||||||
let link = $$('.sprints .button-gray').get(index);
|
let link = $$('.sprints .button-gray').get(index);
|
||||||
|
|
||||||
common.link(link);
|
await common.link(link);
|
||||||
|
|
||||||
return common.waitLoader();
|
return common.waitLoader();
|
||||||
},
|
},
|
||||||
task: function(index) {
|
task: async function(index) {
|
||||||
common.link($$('div[tg-taskboard-task] a.task-name').get(index));
|
let task = $$('div[tg-taskboard-task] a.task-name').get(index);
|
||||||
|
|
||||||
|
await common.link(task);
|
||||||
|
|
||||||
return common.waitLoader();
|
return common.waitLoader();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue