From: Stas Vilchik Date: Mon, 1 Dec 2014 12:54:06 +0000 (+0100) Subject: Support port paratemer in grunt X-Git-Tag: 5.0-RC1~131 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cfc34cfd81ac5b6103d76b432021dee91e4b03d4;p=sonarqube.git Support port paratemer in grunt --- 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;