Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Commit

Permalink
add protractor to test:e2e, minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hmdhk committed Aug 3, 2016
1 parent e3d6430 commit c5a9115
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 5 deletions.
17 changes: 13 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,18 @@ gulp.task('test:e2e:serve', function () {

// Install and start selenium
gulp.task('test:e2e:selenium', function (done) {
selenium.install({ logger: console.log }, function () {
selenium.start(function () {
done()
selenium.install({ logger: console.log }, function (installError) {
if (installError) {
console.log('Error while installing selenium:', installError)
}
selenium.start(function (startError) {
if (startError) {
console.log('Error while starting selenium:', startError)
return process.exit(1)
} else {
console.log('Done')
done()
}
})
})
})
Expand All @@ -338,7 +347,7 @@ gulp.task('test:e2e:start-sauce', function (done) {
})

gulp.task('test:e2e', function (done) {
runSequence('build', 'build:release', 'test:e2e:start-local', 'test:e2e:phantomjs', 'test:e2e:launchsauceconnect', 'test:e2e:sauceconnect', function (err) {
runSequence('build', 'build:release', 'test:e2e:start-local', 'test:e2e:protractor', 'test:e2e:phantomjs', 'test:e2e:launchsauceconnect', 'test:e2e:sauceconnect', function (err) {
if (err) {
return taskFailed(err)
} else {
Expand Down
12 changes: 11 additions & 1 deletion protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
// conf.js
exports.config = {
var isTravis = process.env.TRAVIS

var config = {
framework: 'jasmine',
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['e2e_test/**/*.pspec.js']
}

if (isTravis) {
config.capabilities = {
'browserName': 'firefox'
}
}

exports.config = config

0 comments on commit c5a9115

Please sign in to comment.