From cfc34cfd81ac5b6103d76b432021dee91e4b03d4 Mon Sep 17 00:00:00 2001 From: Stas Vilchik Date: Mon, 1 Dec 2014 13:54:06 +0100 Subject: [PATCH] Support port paratemer in grunt --- server/sonar-web/Gruntfile.coffee | 2 ++ server/sonar-web/src/main/js/tests/e2e/lib.js | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/server/sonar-web/Gruntfile.coffee b/server/sonar-web/Gruntfile.coffee index f694891b755..ffdacbcb715 100644 --- a/server/sonar-web/Gruntfile.coffee +++ b/server/sonar-web/Gruntfile.coffee @@ -297,6 +297,7 @@ module.exports = (grunt) -> test: options: script: '<%= pkg.sources %>js/tests/e2e/server.js' + port: '<%= grunt.option("port") %>' dev: options: background: false @@ -309,6 +310,7 @@ module.exports = (grunt) -> test: true 'no-colors': true concise: true + port: '<%= grunt.option("port") %>' src: ['<%= pkg.sources %>js/tests/e2e/tests/**/issues-spec.js'] single: options: diff --git a/server/sonar-web/src/main/js/tests/e2e/lib.js b/server/sonar-web/src/main/js/tests/e2e/lib.js index b91e405352d..6cfaf0eca9f 100644 --- a/server/sonar-web/src/main/js/tests/e2e/lib.js +++ b/server/sonar-web/src/main/js/tests/e2e/lib.js @@ -1,7 +1,10 @@ var fs = require('fs'); +var getPort = function () { + return casper.cli.options.port; +}; -var BASE_URL = 'http://localhost:3000/pages/', +var BASE_URL = 'http://localhost:' + getPort() + '/pages/', WINDOW_WIDTH = 1200, WINDOW_HEIGHT = 800; -- 2.39.5