From 46122072f71af5504f7a85bc695ba65ebdacb5fe Mon Sep 17 00:00:00 2001 From: Juanfran Date: Wed, 23 Sep 2015 12:30:51 +0200 Subject: [PATCH] custom e2e host --- conf.e2e.js | 9 ++++++-- e2e/auth/auth.e2e.js | 22 +++++++++---------- .../admin/attributes/custom-fields.e2e.js | 20 +++++++++++------ e2e/full/admin/attributes/points.e2e.js | 2 +- e2e/full/admin/attributes/priorities.e2e.js | 2 +- e2e/full/admin/attributes/severities.e2e.js | 2 +- e2e/full/admin/attributes/status.e2e.js | 2 +- e2e/full/admin/attributes/types.e2e.js | 2 +- e2e/full/admin/integrations/bitbucket.e2e.js | 2 +- e2e/full/admin/integrations/github.e2e.js | 2 +- e2e/full/admin/integrations/gitlab.e2e.js | 2 +- e2e/full/admin/integrations/webhooks.e2e.js | 2 +- e2e/full/admin/members.e2e.js | 2 +- e2e/full/admin/permissions.e2e.js | 2 +- e2e/full/admin/project/create-delete.e2e.js | 4 ++-- e2e/full/admin/project/default-values.e2e.js | 2 +- e2e/full/admin/project/modules.e2e.js | 2 +- e2e/full/admin/project/project-detail.e2e.js | 2 +- e2e/full/admin/project/reports.e2e.js | 2 +- e2e/full/backlog.e2e.js | 2 +- e2e/full/home.e2e.js | 6 ++--- e2e/full/issues.e2e.js | 2 +- e2e/full/issues/issue-detail.e2e.js | 2 +- e2e/full/kanban.e2e.js | 2 +- e2e/full/project-home.e2e.js | 2 +- e2e/full/search.e2e.js | 4 ++-- e2e/full/taskboard.e2e.js | 2 +- e2e/full/tasks/task-detail.e2e.js | 2 +- e2e/full/team.e2e.js | 4 ++-- e2e/full/user-profile/change-password.e2e.js | 6 ++--- .../user-profile/edit-user-profile.e2e.js | 2 +- .../user-profile/email-notification.e2e.js | 2 +- e2e/full/user-profile/feedback.e2e.js | 2 +- e2e/full/user-profile/user-profile.e2e.js | 4 ++-- .../user-stories/user-story-detail.e2e.js | 2 +- e2e/full/wiki.e2e.js | 6 ++--- e2e/public/public.e2e.js | 18 +++++++-------- e2e/utils/common.js | 10 ++++----- e2e/utils/detail.js | 2 +- 39 files changed, 89 insertions(+), 78 deletions(-) diff --git a/conf.e2e.js b/conf.e2e.js index 1bd58646..2473a224 100644 --- a/conf.e2e.js +++ b/conf.e2e.js @@ -7,6 +7,11 @@ var utils = require('./e2e/utils'); exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', framework: 'mocha', + params: { + glob: { + host: 'http://localhost:9001/' + } + }, mochaOpts: { timeout: 30000, compilers: 'js:babel/register' @@ -26,7 +31,7 @@ exports.config = { browser.browserName = cap.caps_.browserName; }); - browser.get('http://localhost:9001/login'); + browser.get(browser.params.glob.host + 'login'); var username = $('input[name="username"]'); username.sendKeys('admin'); @@ -42,7 +47,7 @@ exports.config = { return browser.driver.getCurrentUrl(); }) .then(function(url) { - return url === 'http://localhost:9001/'; + return url === browser.params.glob.host; }); }, 10000) .then(function() { diff --git a/e2e/auth/auth.e2e.js b/e2e/auth/auth.e2e.js index 59082059..b9050c9d 100644 --- a/e2e/auth/auth.e2e.js +++ b/e2e/auth/auth.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('auth', function() { it('login', async function() { - browser.get('http://localhost:9001/login'); + browser.get(browser.params.glob.host + 'login'); await utils.common.waitLoader(); @@ -22,7 +22,7 @@ describe('auth', function() { $('.submit-button').click(); - expect(browser.getCurrentUrl()).to.be.eventually.equal('http://localhost:9001/'); + expect(browser.getCurrentUrl()).to.be.eventually.equal(browser.params.glob.host); }); describe("user", function() { @@ -30,7 +30,7 @@ describe('auth', function() { describe("register", function() { it('screenshot', async function() { - browser.get('http://localhost:9001/register'); + browser.get(browser.params.glob.host + 'register'); await utils.common.waitLoader(); @@ -38,7 +38,7 @@ describe('auth', function() { }); it('register validation', function() { - browser.get('http://localhost:9001/register'); + browser.get(browser.params.glob.host + 'register'); $('.submit-button').click(); @@ -48,7 +48,7 @@ describe('auth', function() { }); it('register ok', function() { - browser.get('http://localhost:9001/register'); + browser.get(browser.params.glob.host + 'register'); user.username = "username-" + Math.random(); user.fullname = "fullname-" + Math.random(); @@ -62,7 +62,7 @@ describe('auth', function() { $('.submit-button').click(); - expect(browser.getCurrentUrl()).to.be.eventually.equal('http://localhost:9001/'); + expect(browser.getCurrentUrl()).to.be.eventually.equal(browser.params.glob.host); }); }); @@ -70,7 +70,7 @@ describe('auth', function() { beforeEach(async function() { await utils.common.login(user.username, user.password); - browser.get('http://localhost:9001/user-settings/user-change-password'); + browser.get(browser.params.glob.host + 'user-settings/user-change-password'); }); it("error", function() { @@ -96,7 +96,7 @@ describe('auth', function() { describe("remember password", function() { beforeEach(function() { - browser.get('http://localhost:9001/forgot-password'); + browser.get(browser.params.glob.host + 'forgot-password'); }); it ("screenshot", async function() { @@ -133,13 +133,13 @@ describe('auth', function() { browser.actions().mouseMove($('div[tg-dropdown-user]')).perform(); $$('.dropdown-user li a').last().click(); - expect(browser.getCurrentUrl()).to.be.eventually.equal('http://localhost:9001/login'); + expect(browser.getCurrentUrl()).to.be.eventually.equal(browser.params.glob.host + 'login'); }); it("delete account", async function() { await utils.common.login(user.username, user.password); - browser.get('http://localhost:9001/user-settings/user-profile'); + browser.get(browser.params.glob.host + 'user-settings/user-profile'); $('.delete-account').click(); await utils.lightbox.open('.lightbox-delete-account'); @@ -149,7 +149,7 @@ describe('auth', function() { $('#unsuscribe').click(); $('.lightbox-delete-account .button-green').click(); - expect(browser.getCurrentUrl()).to.be.eventually.equal('http://localhost:9001/login'); + expect(browser.getCurrentUrl()).to.be.eventually.equal(browser.params.glob.host + 'login'); }); }); }); diff --git a/e2e/full/admin/attributes/custom-fields.e2e.js b/e2e/full/admin/attributes/custom-fields.e2e.js index 053d2186..14246e73 100644 --- a/e2e/full/admin/attributes/custom-fields.e2e.js +++ b/e2e/full/admin/attributes/custom-fields.e2e.js @@ -9,7 +9,7 @@ var expect = chai.expect; describe('custom-fields', function() { before(async function() { - browser.get('http://localhost:9001/project/project-3/admin/project-values/custom-fields'); + browser.get(browser.params.glob.host + 'project/project-3/admin/project-values/custom-fields'); await utils.common.waitLoader(); utils.common.takeScreenshot('attributes', 'custom-fields'); @@ -66,9 +66,11 @@ describe('custom-fields', function() { customFieldsHelper.delete(typeIndex, 0); - let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count(); + browser.wait(async function() { + let countCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count(); - expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields - 1); + return countCustomFields === oldCountCustomFields - 1; + }, 4000); }); }); @@ -122,9 +124,11 @@ describe('custom-fields', function() { customFieldsHelper.delete(typeIndex, 0); - let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count(); + browser.wait(async function() { + let countCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count(); - expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields - 1); + return countCustomFields === oldCountCustomFields - 1; + }, 4000); }); }); @@ -178,9 +182,11 @@ describe('custom-fields', function() { customFieldsHelper.delete(typeIndex, 0); - let countCustomFields = customFieldsHelper.getCustomFiledsByType(typeIndex).count(); + browser.wait(async function() { + let countCustomFields = await customFieldsHelper.getCustomFiledsByType(typeIndex).count(); - expect(countCustomFields).to.be.eventually.equal(oldCountCustomFields - 1); + return countCustomFields === oldCountCustomFields - 1; + }, 4000); }); }); }); diff --git a/e2e/full/admin/attributes/points.e2e.js b/e2e/full/admin/attributes/points.e2e.js index d926d8e5..afe390bc 100644 --- a/e2e/full/admin/attributes/points.e2e.js +++ b/e2e/full/admin/attributes/points.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('attributes - points', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/project-values/points'); + browser.get(browser.params.glob.host + 'project/project-0/admin/project-values/points'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/attributes/priorities.e2e.js b/e2e/full/admin/attributes/priorities.e2e.js index 728f182e..5ceba3b4 100644 --- a/e2e/full/admin/attributes/priorities.e2e.js +++ b/e2e/full/admin/attributes/priorities.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('attributes - priorities', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/project-values/priorities'); + browser.get(browser.params.glob.host + 'project/project-0/admin/project-values/priorities'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/attributes/severities.e2e.js b/e2e/full/admin/attributes/severities.e2e.js index 25b633ad..518b824e 100644 --- a/e2e/full/admin/attributes/severities.e2e.js +++ b/e2e/full/admin/attributes/severities.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('attributes - severities', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/project-values/severities'); + browser.get(browser.params.glob.host + 'project/project-0/admin/project-values/severities'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/attributes/status.e2e.js b/e2e/full/admin/attributes/status.e2e.js index 31b2744c..8d078ad5 100644 --- a/e2e/full/admin/attributes/status.e2e.js +++ b/e2e/full/admin/attributes/status.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('attributes - status', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/project-values/status'); + browser.get(browser.params.glob.host + 'project/project-0/admin/project-values/status'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/attributes/types.e2e.js b/e2e/full/admin/attributes/types.e2e.js index e2c84c6f..35e9012d 100644 --- a/e2e/full/admin/attributes/types.e2e.js +++ b/e2e/full/admin/attributes/types.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('attributes - types', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/project-values/types'); + browser.get(browser.params.glob.host + 'project/project-0/admin/project-values/types'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/integrations/bitbucket.e2e.js b/e2e/full/admin/integrations/bitbucket.e2e.js index f0ab0257..fd3ae446 100644 --- a/e2e/full/admin/integrations/bitbucket.e2e.js +++ b/e2e/full/admin/integrations/bitbucket.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('admin - bitbucket', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-3/admin/third-parties/bitbucket'); + browser.get(browser.params.glob.host + 'project/project-3/admin/third-parties/bitbucket'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/integrations/github.e2e.js b/e2e/full/admin/integrations/github.e2e.js index fe1d749f..e1f35a77 100644 --- a/e2e/full/admin/integrations/github.e2e.js +++ b/e2e/full/admin/integrations/github.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('admin - github', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-3/admin/third-parties/github'); + browser.get(browser.params.glob.host + 'project/project-3/admin/third-parties/github'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/integrations/gitlab.e2e.js b/e2e/full/admin/integrations/gitlab.e2e.js index a5081e2b..f3b185b0 100644 --- a/e2e/full/admin/integrations/gitlab.e2e.js +++ b/e2e/full/admin/integrations/gitlab.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('admin - gitlab', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-3/admin/third-parties/gitlab'); + browser.get(browser.params.glob.host + 'project/project-3/admin/third-parties/gitlab'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/integrations/webhooks.e2e.js b/e2e/full/admin/integrations/webhooks.e2e.js index 4934f8f7..92b5d026 100644 --- a/e2e/full/admin/integrations/webhooks.e2e.js +++ b/e2e/full/admin/integrations/webhooks.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('admin - webhooks', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-3/admin/third-parties/webhooks'); + browser.get(browser.params.glob.host + 'project/project-3/admin/third-parties/webhooks'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/members.e2e.js b/e2e/full/admin/members.e2e.js index 5a1169ae..f70dad1b 100644 --- a/e2e/full/admin/members.e2e.js +++ b/e2e/full/admin/members.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('admin - members', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/memberships'); + browser.get(browser.params.glob.host + 'project/project-0/admin/memberships'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/permissions.e2e.js b/e2e/full/admin/permissions.e2e.js index 05baecdf..10ab8b9a 100644 --- a/e2e/full/admin/permissions.e2e.js +++ b/e2e/full/admin/permissions.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('admin - roles', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/roles'); + browser.get(browser.params.glob.host + 'project/project-0/admin/roles'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/project/create-delete.e2e.js b/e2e/full/admin/project/create-delete.e2e.js index 1b053f6a..631704a5 100644 --- a/e2e/full/admin/project/create-delete.e2e.js +++ b/e2e/full/admin/project/create-delete.e2e.js @@ -9,7 +9,7 @@ var expect = chai.expect; describe('create-delete project', function() { before(async function(){ - browser.get('http://localhost:9001/projects/'); + browser.get(browser.params.glob.host + 'projects/'); await utils.common.waitLoader(); }); @@ -62,6 +62,6 @@ describe('create-delete project', function() { let url = await browser.getCurrentUrl(); - expect(url).to.be.equal('http://localhost:9001/'); + expect(url).to.be.equal(browser.params.glob.host); }); }); diff --git a/e2e/full/admin/project/default-values.e2e.js b/e2e/full/admin/project/default-values.e2e.js index 101fd2fe..f166579b 100644 --- a/e2e/full/admin/project/default-values.e2e.js +++ b/e2e/full/admin/project/default-values.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('project default values', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/project-profile/default-values'); + browser.get(browser.params.glob.host + 'project/project-0/admin/project-profile/default-values'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/project/modules.e2e.js b/e2e/full/admin/project/modules.e2e.js index 960be2d3..42ea3c3d 100644 --- a/e2e/full/admin/project/modules.e2e.js +++ b/e2e/full/admin/project/modules.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('modules', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/project-profile/modules'); + browser.get(browser.params.glob.host + 'project/project-0/admin/project-profile/modules'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/project/project-detail.e2e.js b/e2e/full/admin/project/project-detail.e2e.js index 1ea4a4c8..827b562c 100644 --- a/e2e/full/admin/project/project-detail.e2e.js +++ b/e2e/full/admin/project/project-detail.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('project detail', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/project-profile/details'); + browser.get(browser.params.glob.host + 'project/project-0/admin/project-profile/details'); await utils.common.waitLoader(); diff --git a/e2e/full/admin/project/reports.e2e.js b/e2e/full/admin/project/reports.e2e.js index 9de46bc0..d37f7d51 100644 --- a/e2e/full/admin/project/reports.e2e.js +++ b/e2e/full/admin/project/reports.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('reports', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/admin/project-profile/reports'); + browser.get(browser.params.glob.host + 'project/project-0/admin/project-profile/reports'); await utils.common.waitLoader(); diff --git a/e2e/full/backlog.e2e.js b/e2e/full/backlog.e2e.js index 9324c127..d598fe34 100644 --- a/e2e/full/backlog.e2e.js +++ b/e2e/full/backlog.e2e.js @@ -9,7 +9,7 @@ var expect = chai.expect; describe('backlog', function() { before(async function() { - browser.get('http://localhost:9001/project/project-3/backlog'); + browser.get(browser.params.glob.host + 'project/project-3/backlog'); await utils.common.waitLoader(); utils.common.takeScreenshot('backlog', 'backlog'); diff --git a/e2e/full/home.e2e.js b/e2e/full/home.e2e.js index 7c3f4110..2c6de166 100644 --- a/e2e/full/home.e2e.js +++ b/e2e/full/home.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('home', function() { before(async function(){ - browser.get('http://localhost:9001/'); + browser.get(browser.params.glob.host); await utils.common.waitLoader(); utils.common.takeScreenshot("home", "dashboard"); @@ -28,7 +28,7 @@ describe('home', function() { describe('projects list', function() { before(async function() { - browser.get('http://localhost:9001/projects/'); + browser.get(browser.params.glob.host + 'projects/'); await utils.common.waitLoader(); utils.common.takeScreenshot("home", "projects"); @@ -51,7 +51,7 @@ describe('home', function() { var draggedElementText; before(async function() { - browser.get('http://localhost:9001/projects/'); + browser.get(browser.params.glob.host + 'projects/'); let dragableElements = element.all(by.css('.project-list-single')); let dragElement = dragableElements.get(3); diff --git a/e2e/full/issues.e2e.js b/e2e/full/issues.e2e.js index 421a7859..777a2222 100644 --- a/e2e/full/issues.e2e.js +++ b/e2e/full/issues.e2e.js @@ -10,7 +10,7 @@ var expect = chai.expect; describe('issues list', function() { before(async function() { - browser.get('http://localhost:9001/project/project-3/issues'); + browser.get(browser.params.glob.host + 'project/project-3/issues'); await utils.common.waitLoader(); utils.common.takeScreenshot('issues', 'issues'); diff --git a/e2e/full/issues/issue-detail.e2e.js b/e2e/full/issues/issue-detail.e2e.js index 530e5411..4f26ae3a 100644 --- a/e2e/full/issues/issue-detail.e2e.js +++ b/e2e/full/issues/issue-detail.e2e.js @@ -7,7 +7,7 @@ chai.use(chaiAsPromised); var expect = chai.expect; describe('Issue detail', async function(){ - let issueUrl = 'http://localhost:9001/project/project-3/issue/92'; + let issueUrl = browser.params.glob.host + 'project/project-3/issue/92'; before(async function(){ browser.get(issueUrl); diff --git a/e2e/full/kanban.e2e.js b/e2e/full/kanban.e2e.js index 150c2878..ada28c2b 100644 --- a/e2e/full/kanban.e2e.js +++ b/e2e/full/kanban.e2e.js @@ -11,7 +11,7 @@ var expect = chai.expect; describe('kanban', function() { before(async function() { - browser.get('http://localhost:9001/project/project-0/kanban'); + browser.get(browser.params.glob.host + 'project/project-0/kanban'); await utils.common.waitLoader(); diff --git a/e2e/full/project-home.e2e.js b/e2e/full/project-home.e2e.js index c293c700..83892cc7 100644 --- a/e2e/full/project-home.e2e.js +++ b/e2e/full/project-home.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('project home', function() { beforeEach(async function() { - browser.get('http://localhost:9001/project/project-1/'); + browser.get(browser.params.glob.host + 'project/project-1/'); await utils.common.waitLoader(); }); diff --git a/e2e/full/search.e2e.js b/e2e/full/search.e2e.js index bdc77ea2..f8de7e34 100644 --- a/e2e/full/search.e2e.js +++ b/e2e/full/search.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('search page', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-0/'); + browser.get(browser.params.glob.host + 'project/project-0/'); await utils.common.waitLoader(); }); @@ -32,7 +32,7 @@ describe('search page', function() { utils.common.takeScreenshot('search', 'usertories'); - expect(currentUrl).to.be.equal('http://localhost:9001/project/project-0/search?text=create'); + expect(currentUrl).to.be.equal(browser.params.glob.host + 'project/project-0/search?text=create'); }); describe('tabs', function() { diff --git a/e2e/full/taskboard.e2e.js b/e2e/full/taskboard.e2e.js index c7788bdc..f7a57a27 100644 --- a/e2e/full/taskboard.e2e.js +++ b/e2e/full/taskboard.e2e.js @@ -11,7 +11,7 @@ var expect = chai.expect; describe('taskboard', function() { before(async function() { - browser.get('http://localhost:9001/project/project-0/backlog'); + browser.get(browser.params.glob.host + 'project/project-0/backlog'); await utils.common.waitLoader(); diff --git a/e2e/full/tasks/task-detail.e2e.js b/e2e/full/tasks/task-detail.e2e.js index 6021712f..8a1aed5a 100644 --- a/e2e/full/tasks/task-detail.e2e.js +++ b/e2e/full/tasks/task-detail.e2e.js @@ -8,7 +8,7 @@ chai.use(chaiAsPromised); var expect = chai.expect; describe('Task detail', function(){ - let taskUrl = 'http://localhost:9001/project/project-3/task/7'; + let taskUrl = browser.params.glob.host + 'project/project-3/task/7'; before(async function(){ browser.get(taskUrl); diff --git a/e2e/full/team.e2e.js b/e2e/full/team.e2e.js index 2394f3d2..8cf77a2c 100644 --- a/e2e/full/team.e2e.js +++ b/e2e/full/team.e2e.js @@ -9,7 +9,7 @@ var expect = chai.expect; describe('leaving project', function(){ before(async function(){ - browser.get('http://localhost:9001/project/project-4/team'); + browser.get(browser.params.glob.host + 'project/project-4/team'); await utils.common.waitLoader(); }); @@ -22,7 +22,7 @@ describe('leaving project', function(){ describe('team', function() { before(async function(){ - browser.get('http://localhost:9001/project/project-5/team'); + browser.get(browser.params.glob.host + 'project/project-5/team'); await utils.common.waitLoader(); }); diff --git a/e2e/full/user-profile/change-password.e2e.js b/e2e/full/user-profile/change-password.e2e.js index 813b61f1..301ab3e4 100644 --- a/e2e/full/user-profile/change-password.e2e.js +++ b/e2e/full/user-profile/change-password.e2e.js @@ -8,14 +8,14 @@ var expect = chai.expect; describe('change password', function() { before(async function(){ - browser.get('http://localhost:9001/user-settings/user-change-password'); + browser.get(browser.params.glob.host + 'user-settings/user-change-password'); await utils.common.waitLoader(); utils.common.takeScreenshot('edit-user-profile', 'change-password'); }); beforeEach(async function() { - browser.get('http://localhost:9001/user-settings/user-change-password'); + browser.get(browser.params.glob.host + 'user-settings/user-change-password'); await utils.common.waitLoader(); }); @@ -51,7 +51,7 @@ describe('change password', function() { }); after(async function() { - browser.get('http://localhost:9001/user-settings/user-change-password'); + browser.get(browser.params.glob.host + 'user-settings/user-change-password'); await utils.common.waitLoader(); //restore diff --git a/e2e/full/user-profile/edit-user-profile.e2e.js b/e2e/full/user-profile/edit-user-profile.e2e.js index 1c85bee9..0aef0a36 100644 --- a/e2e/full/user-profile/edit-user-profile.e2e.js +++ b/e2e/full/user-profile/edit-user-profile.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('edit user profile', function() { before(async function(){ - browser.get('http://localhost:9001/user-settings/user-profile'); + browser.get(browser.params.glob.host + 'user-settings/user-profile'); await utils.common.waitLoader(); diff --git a/e2e/full/user-profile/email-notification.e2e.js b/e2e/full/user-profile/email-notification.e2e.js index 7c3e1a60..9fbc06ab 100644 --- a/e2e/full/user-profile/email-notification.e2e.js +++ b/e2e/full/user-profile/email-notification.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('email notification', function() { before(async function(){ - browser.get('http://localhost:9001/user-settings/mail-notifications'); + browser.get(browser.params.glob.host + 'user-settings/mail-notifications'); await utils.common.waitLoader(); diff --git a/e2e/full/user-profile/feedback.e2e.js b/e2e/full/user-profile/feedback.e2e.js index 108c0e53..0d71722c 100644 --- a/e2e/full/user-profile/feedback.e2e.js +++ b/e2e/full/user-profile/feedback.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('feedback', function() { before(async function(){ - browser.get('http://localhost:9001/user-settings/mail-notifications'); + browser.get(browser.params.glob.host + 'user-settings/mail-notifications'); await utils.common.waitLoader(); diff --git a/e2e/full/user-profile/user-profile.e2e.js b/e2e/full/user-profile/user-profile.e2e.js index 8ae0d4f7..59cbbb17 100644 --- a/e2e/full/user-profile/user-profile.e2e.js +++ b/e2e/full/user-profile/user-profile.e2e.js @@ -9,7 +9,7 @@ var expect = chai.expect; describe('user profile', function() { describe('current user', function() { before(async function(){ - browser.get('http://localhost:9001/profile'); + browser.get(browser.params.glob.host + 'profile'); await utils.common.waitLoader(); @@ -58,7 +58,7 @@ describe('user profile', function() { describe('other user', function() { before(async function(){ - browser.get('http://localhost:9001/profile/user7'); + browser.get(browser.params.glob.host + 'profile/user7'); await utils.common.waitLoader(); diff --git a/e2e/full/user-stories/user-story-detail.e2e.js b/e2e/full/user-stories/user-story-detail.e2e.js index c59e953b..02b338c0 100644 --- a/e2e/full/user-stories/user-story-detail.e2e.js +++ b/e2e/full/user-stories/user-story-detail.e2e.js @@ -8,7 +8,7 @@ chai.use(chaiAsPromised); var expect = chai.expect; describe('User story detail', function(){ - let usUrl = 'http://localhost:9001/project/project-3/us/81'; + let usUrl = browser.params.glob.host + 'project/project-3/us/81'; before(async function(){ browser.get(usUrl); diff --git a/e2e/full/wiki.e2e.js b/e2e/full/wiki.e2e.js index 346f5017..6b2dd873 100644 --- a/e2e/full/wiki.e2e.js +++ b/e2e/full/wiki.e2e.js @@ -11,7 +11,7 @@ describe('wiki', function() { let currentWiki = {}; before(async function(){ - browser.get('http://localhost:9001/project/project-0/wiki/home'); + browser.get(browser.params.glob.host + 'project/project-0/wiki/home'); await utils.common.waitLoader(); }); @@ -36,7 +36,7 @@ describe('wiki', function() { await utils.common.waitLoader(); await utils.common.takeScreenshot("wiki", "new-link-created-with-empty-wiki-page"); - expect(browser.getCurrentUrl()).to.be.eventually.equal('http://localhost:9001/project/project-0/wiki/' + currentWiki.slug); + expect(browser.getCurrentUrl()).to.be.eventually.equal(browser.params.glob.host + 'project/project-0/wiki/' + currentWiki.slug); }); it('remove link', async function() { @@ -73,7 +73,7 @@ describe('wiki', function() { it('delete', async function() { await wikiHelper.editor().delete(); - expect(browser.getCurrentUrl()).to.be.eventually.equal('http://localhost:9001/project/project-0/wiki/home'); + expect(browser.getCurrentUrl()).to.be.eventually.equal(browser.params.glob.host + 'project/project-0/wiki/home'); }); it('Custom keyboard actions', async function(){ diff --git a/e2e/public/public.e2e.js b/e2e/public/public.e2e.js index 792c6054..dcd9a1ab 100644 --- a/e2e/public/public.e2e.js +++ b/e2e/public/public.e2e.js @@ -8,7 +8,7 @@ var expect = chai.expect; describe('Public', async function(){ before(async function(){ - browser.get('http://localhost:9001/project/project-3/admin/project-profile/details'); + browser.get(browser.params.glob.host + 'project/project-3/admin/project-profile/details'); await utils.common.waitLoader(); @@ -23,7 +23,7 @@ describe('Public', async function(){ }); it('home', function() { - browser.get('http://localhost:9001/project/project-3/'); + browser.get(browser.params.glob.host + 'project/project-3/'); utils.common.waitLoader(); @@ -31,7 +31,7 @@ describe('Public', async function(){ }); it('backlog', function() { - browser.get('http://localhost:9001/project/project-3/backlog'); + browser.get(browser.params.glob.host + 'project/project-3/backlog'); utils.common.waitLoader(); @@ -39,7 +39,7 @@ describe('Public', async function(){ }); it('taskboard', function() { - browser.get('http://localhost:9001/project/project-3/backlog'); + browser.get(browser.params.glob.host + 'project/project-3/backlog'); utils.common.waitLoader(); @@ -50,7 +50,7 @@ describe('Public', async function(){ }); it('kanban', function() { - browser.get('http://localhost:9001/project/project-3/kanban'); + browser.get(browser.params.glob.host + 'project/project-3/kanban'); utils.common.waitLoader(); @@ -58,7 +58,7 @@ describe('Public', async function(){ }); it('us detail', function() { - browser.get('http://localhost:9001/project/project-3/us/81'); + browser.get(browser.params.glob.host + 'project/project-3/us/81'); utils.common.waitLoader(); @@ -66,7 +66,7 @@ describe('Public', async function(){ }); it('issue detail', function() { - browser.get('http://localhost:9001/project/project-3/issue/95'); + browser.get(browser.params.glob.host + 'project/project-3/issue/95'); utils.common.waitLoader(); @@ -74,7 +74,7 @@ describe('Public', async function(){ }); it('task detail', function() { - browser.get('http://localhost:9001/project/project-3/task/2'); + browser.get(browser.params.glob.host + 'project/project-3/task/2'); utils.common.waitLoader(); @@ -82,7 +82,7 @@ describe('Public', async function(){ }); it('team', function() { - browser.get('http://localhost:9001/project/project-5/team'); + browser.get(browser.params.glob.host + 'project/project-5/team'); utils.common.waitLoader(); diff --git a/e2e/utils/common.js b/e2e/utils/common.js index 47d886d3..aaf74228 100644 --- a/e2e/utils/common.js +++ b/e2e/utils/common.js @@ -90,7 +90,7 @@ common.closeCookies = function() { }; common.login = function(username, password) { - browser.get('http://localhost:9001/login'); + browser.get(browser.params.glob.host + 'login'); $('input[name="username"]').sendKeys(username); $('input[name="password"]').sendKeys(password); @@ -100,7 +100,7 @@ common.login = function(username, password) { return browser.driver.wait(async function() { let url = await browser.driver.getCurrentUrl(); - return url === 'http://localhost:9001/'; + return url === browser.params.glob.host; }, 10000); }; @@ -116,12 +116,12 @@ common.logout = function() { return browser.driver.wait(async function() { let url = await browser.driver.getCurrentUrl(); - return url === 'http://localhost:9001/login'; + return url === browser.params.glob.host + 'login'; }, 10000); }; common.prepare = function() { - browser.get('http://localhost:9001/'); + browser.get(browser.params.glob.host); return common.closeCookies(); } @@ -282,7 +282,7 @@ common.clear = function(elem, length) { }; common.goHome = async function() { - browser.get('http://localhost:9001'); + browser.get(browser.params.glob.host); await common.waitLoader(); }; diff --git a/e2e/utils/detail.js b/e2e/utils/detail.js index 59754efc..b1c1be8a 100644 --- a/e2e/utils/detail.js +++ b/e2e/utils/detail.js @@ -216,7 +216,7 @@ helper.customFields = function(typeIndex) { before(async function() { let url = await browser.getCurrentUrl(); - browser.get('http://localhost:9001/project/project-3/admin/project-values/custom-fields'); + browser.get(browser.params.glob.host + 'project/project-3/admin/project-values/custom-fields'); commonUtil.waitLoader();