Skip to content

Commit

Permalink
Merge pull request #170 from jakemmarsh/protractor-server-port
Browse files Browse the repository at this point in the history
run protractor tests on separate port
  • Loading branch information
jakemmarsh committed Mar 5, 2016
2 parents a27a499 + c01a581 commit f88e6c4
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions gulp/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export default {

browserPort: 3000,
UIPort: 3001,
testPort: 3002,

sourceDir: './app/',
buildDir: './build/',
Expand Down
2 changes: 1 addition & 1 deletion gulp/tasks/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ gulp.task('protractor', ['prod', 'webdriver'], function(cb) {
const testFiles = gulp.src('test/e2e/**/*.js');

testServer({
port: config.browserPort,
port: config.testPort,
dir: config.buildDir
}).then((server) => {
testFiles.pipe(protractor({
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angularjs-gulp-browserify-boilerplate",
"version": "1.5.3",
"version": "1.5.4",
"author": "Jake Marsh <[email protected]>",
"description": "Boilerplate using AngularJS, SASS, Gulp, and Browserify while also utilizing best practices.",
"repository": {
Expand Down Expand Up @@ -79,7 +79,7 @@
},
"scripts": {
"test": "./node_modules/.bin/gulp test",
"webdriver-update": "./node_modules/.bin/webdriver-manager update",
"webdriver-update": "./node_modules/gulp-protractor/node_modules/protractor/bin/webdriver-manager update",
"postinstall": "npm run webdriver-update"
},
"license": "MIT"
Expand Down
2 changes: 1 addition & 1 deletion test/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports.config = {

allScriptsTimeout: 11000,

baseUrl: `http://localhost:${gulpConfig.browserPort}/`,
baseUrl: `http://localhost:${gulpConfig.testPort}/`,

capabilities: {
browserName: 'chrome',
Expand Down

3 comments on commit f88e6c4

@otterslide
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it's something on my end, but after this update, it no longer runs the webdriver-manager update.

I had to switch back to
"webdriver-update": "./node_modules/.bin/webdriver-manager update",

81 info lifecycle [email protected]postinstall: [email protected]
82 verbose lifecycle [email protected]
postinstall: unsafe-perm in lifecycle true
83 verbose lifecycle [email protected]postinstall: PATH:...
84 verbose lifecycle [email protected]
postinstall: CWD: C:\devel\test3\angularjs-gulp-browserify-boilerplate-master
85 silly lifecycle [email protected]postinstall: Args: [ '/d /s /c', 'npm run webdriver-update' ]
86 silly lifecycle [email protected]
postinstall: Returned: code: 1 signal: null
87 info lifecycle [email protected]~postinstall: Failed to exec postinstall script
88 verbose stack RangeError: Maximum call stack size exceeded
88 verbose stack at Array.filter (native)
88 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install\actions.js:55:37
88 verbose stack at Array.forEach (native)
88 verbose stack at markAsFailed (C:\Program Files\nodejs\node_modules\npm\lib\install\actions.js:54:16)
88 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install\actions.js:57:7
88 verbose stack at Array.forEach (native)
88 verbose stack at markAsFailed (C:\Program Files\nodejs\node_modules\npm\lib\install\actions.js:54:16)
88 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install\actions.js:57:7
88 verbose stack at Array.forEach (native)
88 verbose stack at markAsFailed (C:\Program Files\nodejs\node_modules\npm\lib\install\actions.js:54:16)

@jakemmarsh
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's strange... just did a fresh clone and npm install and did not run into this issue. For now we'll see if any other users mention this issue

@otterslide
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried upgrading to npm 3.8.0 from 3.6.0, and pulled a fresh copy, but the issue is still the same. I have Nodejs 5.7.1. It must be something to do with the environment.
At least I have the fix for now :)

Please sign in to comment.