Skip to content

Commit c506e6e

Browse files
committed
Programmatically determine the "baseUrl" in Example 2
1 parent 181e014 commit c506e6e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

example_2/Gulpfile.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ var isCI = args.type === 'ci';
1111

1212
// Download and update the selenium driver
1313
gulp.task('e2etests:webdriver_manager_update', 'updates the selenium server standalone jar file ', gp.webdriver_update);
14+
1415
gulp.task('e2etests:run', 'runs e2etests using protractor.conf', ['e2etests:server'], function(cb) {
1516

1617
gulp.src(['tests/e2e/**/*.js'], { read:false })
1718
.pipe(gp.protractor({
18-
configFile: './protractor.conf.js'
19+
configFile: './protractor.conf.js',
20+
args: ['--baseUrl', 'http://' + server.address().address + ':' + server.address().port]
1921
})).on('error', function(e) {
2022
server.close();
2123
if(isCI) {

example_2/protractor.conf.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ exports.config = {
88
'browserName': 'chrome'
99
},
1010

11-
baseUrl: 'http://localhost:9001',
12-
1311
// Options to be passed to Jasmine-node.
1412
jasmineNodeOpts: {
1513
showColors: true,
1614
defaultTimeoutInterval: 30000
1715
}
18-
};
16+
};

0 commit comments

Comments
 (0)