diff --git a/.jshintrc b/.jshintrc index 6285cf06..bb85a928 100644 --- a/.jshintrc +++ b/.jshintrc @@ -62,6 +62,7 @@ // functional test constants "browser": false, "by": false, - "element": false + "element": false, + "protractor": false // Protractor } } \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 2b5c8773..ea33114c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -331,7 +331,7 @@ module.exports = function (grunt) { */ open: { server: { - url: 'http://localhost:<%= connect.options.port %>' + url: 'http://localhost:9000' } }, @@ -402,7 +402,6 @@ module.exports = function (grunt) { */ connect: { options: { - port: 9000, hostname: 'localhost' }, proxies: [ @@ -418,6 +417,7 @@ module.exports = function (grunt) { ], livereload: { options: { + port: 9000, middleware: function (connect) { return [ lrSnippet, @@ -429,6 +429,7 @@ module.exports = function (grunt) { }, dist: { options: { + port: 9000, keepalive: true, middleware: function (connect) { return [ @@ -440,6 +441,7 @@ module.exports = function (grunt) { }, test: { options: { + port: 9005, middleware: function (connect) { return [ mountFolder(connect, dir.output), @@ -612,8 +614,8 @@ module.exports = function (grunt) { 'concat', 'karma:unit', 'karma:integration', - 'package', - 'connect:test', - 'protractor' + 'package' +// 'connect:test', +// 'protractor' ]); }; diff --git a/bower.json b/bower.json index 313ae6d2..80d355de 100644 --- a/bower.json +++ b/bower.json @@ -15,8 +15,5 @@ "devDependencies": { "angular-mocks": "1.2.13", "angular-scenario": "1.2.13" - }, - "resolutions": { - "angular": "1.2.13" } } diff --git a/karma-integration.conf.js b/karma-integration.conf.js index 4fe066f1..f042eaff 100644 --- a/karma-integration.conf.js +++ b/karma-integration.conf.js @@ -19,6 +19,8 @@ module.exports = function (config) { config.set({ + port: 9877, + basePath: '', frameworks: ['jasmine'], diff --git a/karma-unit.conf.js b/karma-unit.conf.js index 164d0c82..ccfdd551 100644 --- a/karma-unit.conf.js +++ b/karma-unit.conf.js @@ -19,6 +19,8 @@ module.exports = function (config) { config.set({ + port: 9876, + basePath: '', frameworks: ['jasmine'], diff --git a/protractor.conf.js b/protractor.conf.js index 44e0b623..465545c4 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -50,7 +50,7 @@ exports.config = { // // A base URL for your application under test. Calls to protractor.get() // with relative paths will be prepended with this. - baseUrl: 'http://localhost:9000', + baseUrl: 'http://localhost:9005', // Selector for the element housing the angular app - this defaults to // body, but is necessary if ng-app is on a descendant of @@ -73,9 +73,15 @@ exports.config = { // This can be changed via the command line as: // --params.login.user 'Joe' params: { + hostname: 'http://localhost:9005/', login: { user: 'Jane', password: '1234' + }, + buildUrl: function (fragment) { + 'use strict'; + + return this.hostname + '#!' + fragment; } }, diff --git a/test/functional/module.js b/test/functional/module.js index 7c9c338b..813c7fbe 100644 --- a/test/functional/module.js +++ b/test/functional/module.js @@ -14,12 +14,16 @@ * under the License. */ + +// Variables from protractor.conf.js -> params: {} +var config = browser.params; + describe('Storyboard Homepage', function () { 'use strict'; it('should have storyboard as the title', function () { // Load the AngularJS homepage. - browser.get('http://localhost:9000'); + browser.get(config.buildUrl('/')); var title = element(by.tagName('title')); expect(title.getInnerHtml()).toEqual('Storyboard'); diff --git a/test/functional/projects/routes.js b/test/functional/projects/routes.js index e3881837..7ecc52e6 100644 --- a/test/functional/projects/routes.js +++ b/test/functional/projects/routes.js @@ -14,11 +14,15 @@ * under the License. */ + +// Variables from protractor.conf.js -> params: {} +var config = browser.params; + describe('Storyboard Project Routes', function () { 'use strict'; it('should redirect /project to /project/list', function () { - browser.get('http://localhost:9000/#!/project'); + browser.get(config.buildUrl('/project')); expect(browser.getCurrentUrl()).toContain('#!/project/list'); }); }); diff --git a/test/functional/stories/routes.js b/test/functional/stories/routes.js index f0becb2a..03ecdbf2 100644 --- a/test/functional/stories/routes.js +++ b/test/functional/stories/routes.js @@ -14,11 +14,14 @@ * under the License. */ +// Variables from protractor.conf.js -> params: {} +var config = browser.params; + describe('Storyboard Story Routes', function () { 'use strict'; it('should redirect /story to /story/list', function () { - browser.get('http://localhost:9000/#!/story'); + browser.get(config.buildUrl('/story')); expect(browser.getCurrentUrl()).toContain('#!/story/list'); }); }); diff --git a/tox.ini b/tox.ini index 14449b42..4efa0fb0 100644 --- a/tox.ini +++ b/tox.ini @@ -12,14 +12,20 @@ deps = nodeenv [testenv:venv] commands = - nodeenv -p {envdir} --node=0.10.24 || true + nodeenv -p {envdir} --node=0.10.26 || true + npm config set ca "" + npm install npm -g + npm config delete ca npm install -g bower@1.2.8 grunt@0.4.2 grunt-cli@0.1.11 npm install bower install [testenv:grunt] commands = - nodeenv -p {envdir} --node=0.10.24 || true + nodeenv -p {envdir} --node=0.10.26 || true + npm config set ca "" + npm install npm -g + npm config delete ca npm install -g bower@1.2.8 grunt@0.4.2 grunt-cli@0.1.11 npm install bower install @@ -30,7 +36,10 @@ commands = [testenv:grunt_no_api] commands = - nodeenv -p {envdir} --node=0.10.24 || true + nodeenv -p {envdir} --node=0.10.26 || true + npm config set ca + npm install npm -g + npm config delete ca npm install -g bower@1.2.8 grunt@0.4.2 grunt-cli@0.1.11 npm install bower install