Skip to content

Commit

Permalink
Run local ptor tests in Firefox
Browse files Browse the repository at this point in the history
Travis can run FF but not Chrome
  • Loading branch information
bendrucker committed Jul 3, 2014
1 parent eb8682e commit 6ee8b22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
13 changes: 7 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ module.exports = function(grunt) {
// End to end (e2e) tests
protractor: {
options: {
configFile: "tests/protractor.conf.js"
configFile: "tests/local_protractor.conf.js"
},
singlerun: {},
saucelabs: {
options: {
configFile: "tests/sauce_protractor.conf.js",
args: {
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY
Expand All @@ -109,18 +110,18 @@ module.exports = function(grunt) {
grunt.registerTask('update', ['shell:npm_install', 'shell:bower_install']);

// Single run tests
grunt.registerTask('test', ['test:unit', 'test:unit:sauce', 'test:e2e']);
grunt.registerTask('test', ['test:unit', 'test:e2e']);
grunt.registerTask('test:unit', ['karma:singlerun']);
grunt.registerTask('test:unit:sauce', ['karma:saucelabs']);
grunt.registerTask('test:e2e', ['connect:testserver', 'protractor:singlerun']);

// Sauce tasks
grunt.registerTask('sauce:unit', ['karma:saucelabs']);
grunt.registerTask('sauce:e2e', ['connect:testserver', 'protractor:saucelabs']);

// Watch tests
grunt.registerTask('test:watch', ['karma:watch']);
grunt.registerTask('test:watch:unit', ['karma:watch']);

// Travis CI testing
grunt.registerTask('travis', ['build', 'test:unit', 'connect:testserver', 'protractor:saucelabs']);

// Build tasks
grunt.registerTask('build', ['jshint', 'uglify']);

Expand Down
7 changes: 2 additions & 5 deletions tests/protractor.conf.js → tests/local_protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ exports.config = {
// Capabilities to be passed to the webdriver instance
// For a full list of available capabilities, see https://code.google.com/p/selenium/wiki/DesiredCapabilities
capabilities: {
'browserName': 'chrome',
'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER,
'build': process.env.TRAVIS_BUILD_NUMBER,
'name': 'AngularFire Protractor Tests Build ' + process.env.TRAVIS_BUILD_NUMBER
'browserName': 'firefox',
},

// Calls to protractor.get() with relative paths will be prepended with the baseUrl
Expand All @@ -37,4 +34,4 @@ exports.config = {
// Default time to wait in ms before a test fails.
defaultTimeoutInterval: 20000
}
};
};

0 comments on commit 6ee8b22

Please sign in to comment.