From 8c2a1eea4a91dcf3865f3770e3111ff9e026ceb6 Mon Sep 17 00:00:00 2001 From: Juanfran Date: Mon, 14 Sep 2015 14:24:10 +0200 Subject: [PATCH] detail url e2e test --- e2e/full/issues/issue-detail.e2e.js | 16 +++++----------- e2e/full/tasks/task-detail.e2e.js | 14 +++++--------- e2e/full/user-stories/user-story-detail.e2e.js | 12 +++++------- 3 files changed, 15 insertions(+), 27 deletions(-) diff --git a/e2e/full/issues/issue-detail.e2e.js b/e2e/full/issues/issue-detail.e2e.js index 9a37addb..018a1e7e 100644 --- a/e2e/full/issues/issue-detail.e2e.js +++ b/e2e/full/issues/issue-detail.e2e.js @@ -7,19 +7,13 @@ chai.use(chaiAsPromised); var expect = chai.expect; describe('Issue detail', async function(){ - let issuesUrl = ""; + let issueUrl = 'http://localhost:9001/project/project-3/issue/92'; + before(async function(){ - await utils.common.goHome(); - await utils.common.goToFirstProject(); - - await utils.common.goToIssues(); - - issuesUrl = await browser.getCurrentUrl(); - - await utils.common.goToFirstIssue(); + browser.get(issueUrl); + await utils.common.waitLoader(); }); - it('screenshot', async function() { await utils.common.takeScreenshot("issues", "detail"); }); @@ -50,6 +44,6 @@ describe('Issue detail', async function(){ it('redirected', async function (){ let url = await browser.getCurrentUrl(); - expect(url.endsWith(issuesUrl)).to.be.true; + expect(url).not.to.be.equal(issueUrl); }); }); diff --git a/e2e/full/tasks/task-detail.e2e.js b/e2e/full/tasks/task-detail.e2e.js index 4e6e74f9..c127e8f2 100644 --- a/e2e/full/tasks/task-detail.e2e.js +++ b/e2e/full/tasks/task-detail.e2e.js @@ -8,15 +8,11 @@ chai.use(chaiAsPromised); var expect = chai.expect; describe('Task detail', function(){ - let sprintUrl = ""; + let taskUrl = 'http://localhost:9001/project/project-3/task/7'; before(async function(){ - await utils.common.goHome(); - await utils.common.goToFirstProject(); - await utils.common.goToBacklog(); - await utils.common.goToFirstSprint(); - sprintUrl = await browser.getCurrentUrl(); - await utils.common.goToFirstTask(); + browser.get(taskUrl); + await utils.common.waitLoader(); }); it('screenshot', async function() { @@ -53,7 +49,7 @@ describe('Task detail', function(){ it('block', utils.detail.blockTesting); - it('attachments', utils.detail.attachmentTesting) + it('attachments', utils.detail.attachmentTesting); it('screenshot', async function() { await utils.common.takeScreenshot("tasks", "detail updated"); @@ -63,7 +59,7 @@ describe('Task detail', function(){ it('redirected', async function (){ let url = await browser.getCurrentUrl(); - expect(url.endsWith(sprintUrl)).to.be.true; + expect(url).not.to.be.equal(taskUrl); }); }) diff --git a/e2e/full/user-stories/user-story-detail.e2e.js b/e2e/full/user-stories/user-story-detail.e2e.js index 9fd86dcb..38cd8051 100644 --- a/e2e/full/user-stories/user-story-detail.e2e.js +++ b/e2e/full/user-stories/user-story-detail.e2e.js @@ -8,13 +8,11 @@ chai.use(chaiAsPromised); var expect = chai.expect; describe('User story detail', function(){ - let backlogUrl = ""; + let usUrl = 'http://localhost:9001/project/project-3/us/81'; + before(async function(){ - await utils.common.goHome(); - await utils.common.goToFirstProject(); - await utils.common.goToBacklog(); - backlogUrl = await browser.getCurrentUrl(); - await utils.common.goToFirstUserStory(); + browser.get(usUrl); + await utils.common.waitLoader(); }); it('screenshot', async function() { @@ -77,6 +75,6 @@ describe('User story detail', function(){ it('redirected', async function (){ let url = await browser.getCurrentUrl(); - expect(url.endsWith(backlogUrl+"?no-milestone=1")).to.be.true; + expect(url).not.to.be.equal(usUrl); }); })