detail url e2e test

stable
Juanfran 2015-09-14 14:24:10 +02:00
parent 2b395ace87
commit 8c2a1eea4a
3 changed files with 15 additions and 27 deletions

View File

@ -7,19 +7,13 @@ chai.use(chaiAsPromised);
var expect = chai.expect; var expect = chai.expect;
describe('Issue detail', async function(){ describe('Issue detail', async function(){
let issuesUrl = ""; let issueUrl = 'http://localhost:9001/project/project-3/issue/92';
before(async function(){ before(async function(){
await utils.common.goHome(); browser.get(issueUrl);
await utils.common.goToFirstProject(); await utils.common.waitLoader();
await utils.common.goToIssues();
issuesUrl = await browser.getCurrentUrl();
await utils.common.goToFirstIssue();
}); });
it('screenshot', async function() { it('screenshot', async function() {
await utils.common.takeScreenshot("issues", "detail"); await utils.common.takeScreenshot("issues", "detail");
}); });
@ -50,6 +44,6 @@ describe('Issue detail', async function(){
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).not.to.be.equal(issueUrl);
}); });
}); });

View File

@ -8,15 +8,11 @@ chai.use(chaiAsPromised);
var expect = chai.expect; var expect = chai.expect;
describe('Task detail', function(){ describe('Task detail', function(){
let sprintUrl = ""; let taskUrl = 'http://localhost:9001/project/project-3/task/7';
before(async function(){ before(async function(){
await utils.common.goHome(); browser.get(taskUrl);
await utils.common.goToFirstProject(); await utils.common.waitLoader();
await utils.common.goToBacklog();
await utils.common.goToFirstSprint();
sprintUrl = await browser.getCurrentUrl();
await utils.common.goToFirstTask();
}); });
it('screenshot', async function() { it('screenshot', async function() {
@ -53,7 +49,7 @@ describe('Task detail', function(){
it('block', utils.detail.blockTesting); it('block', utils.detail.blockTesting);
it('attachments', utils.detail.attachmentTesting) it('attachments', utils.detail.attachmentTesting);
it('screenshot', async function() { it('screenshot', async function() {
await utils.common.takeScreenshot("tasks", "detail updated"); await utils.common.takeScreenshot("tasks", "detail updated");
@ -63,7 +59,7 @@ describe('Task detail', function(){
it('redirected', async function (){ it('redirected', async function (){
let url = await browser.getCurrentUrl(); let url = await browser.getCurrentUrl();
expect(url.endsWith(sprintUrl)).to.be.true; expect(url).not.to.be.equal(taskUrl);
}); });
}) })

View File

@ -8,13 +8,11 @@ chai.use(chaiAsPromised);
var expect = chai.expect; var expect = chai.expect;
describe('User story detail', function(){ describe('User story detail', function(){
let backlogUrl = ""; let usUrl = 'http://localhost:9001/project/project-3/us/81';
before(async function(){ before(async function(){
await utils.common.goHome(); browser.get(usUrl);
await utils.common.goToFirstProject(); await utils.common.waitLoader();
await utils.common.goToBacklog();
backlogUrl = await browser.getCurrentUrl();
await utils.common.goToFirstUserStory();
}); });
it('screenshot', async function() { it('screenshot', async function() {
@ -77,6 +75,6 @@ describe('User story detail', function(){
it('redirected', async function (){ it('redirected', async function (){
let url = await browser.getCurrentUrl(); let url = await browser.getCurrentUrl();
expect(url.endsWith(backlogUrl+"?no-milestone=1")).to.be.true; expect(url).not.to.be.equal(usUrl);
}); });
}) })