diff options
| author | Julie | 2014-02-06 11:29:24 -0800 | 
|---|---|---|
| committer | Igor Minar | 2014-02-07 20:41:39 -0800 | 
| commit | e645f7cae14618bd8fc7d6b3eadf9307f5a1aeb7 (patch) | |
| tree | 8b29f6602f45e83becac49e1311ad05ac15d052e | |
| parent | ad275b226551e45b68dace46af5fcd8178e31a60 (diff) | |
| download | angular.js-e645f7cae14618bd8fc7d6b3eadf9307f5a1aeb7.tar.bz2 | |
refactor(testing): split travis end to end tests into separate jobs for jquery and jqlite
Closes #6159
| -rw-r--r-- | .travis.yml | 9 | ||||
| -rw-r--r-- | Gruntfile.js | 2 | ||||
| -rw-r--r-- | protractor-conf.js | 5 | ||||
| -rw-r--r-- | protractor-jquery-conf.js | 32 | ||||
| -rwxr-xr-x | scripts/travis/build.sh | 9 | 
5 files changed, 49 insertions, 8 deletions
| diff --git a/.travis.yml b/.travis.yml index 6a24af3f..b94d3b58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,9 +5,12 @@ node_js:  env:    matrix:      - JOB=unit -    - JOB=e2e-chrome -    - JOB=e2e-firefox -    - JOB=e2e-safari +    - JOB=e2e BROWSER=chrome JQVERSION=jqlite +    - JOB=e2e BROWSER=firefox JQVERSION=jqlite +    - JOB=e2e BROWSER=safari JQVERSION=jqlite +    - JOB=e2e BROWSER=chrome JQVERSION=jquery +    - JOB=e2e BROWSER=firefox JQVERSION=jquery +    - JOB=e2e BROWSER=safari JQVERSION=jquery    global:      - SAUCE_USERNAME=angular-ci      - SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987 diff --git a/Gruntfile.js b/Gruntfile.js index 123a0d72..89e461d6 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -92,6 +92,7 @@ module.exports = function(grunt) {      protractor: {        normal: 'protractor-conf.js', +      jquery: 'protractor-jquery-conf.js',        jenkins: 'protractor-jenkins-conf.js'      }, @@ -292,6 +293,7 @@ module.exports = function(grunt) {    grunt.registerTask('test:docs', 'Run the doc-page tests with Karma', ['package', 'tests:docs']);    grunt.registerTask('test:unit', 'Run unit, jQuery and Karma module tests with Karma', ['tests:jqlite', 'tests:jquery', 'tests:modules']);    grunt.registerTask('test:protractor', 'Run the end to end tests with Protractor and keep a test server running in the background', ['webdriver', 'connect:testserver', 'protractor:normal']); +  grunt.registerTask('test:jq-protractor', 'Run the end to end tests against jquery with Protractor and keep a test server running in the background', ['webdriver', 'connect:testserver', 'protractor:jquery']);    grunt.registerTask('test:ci-protractor', 'Run the end to end tests with Protractor and keep a test server running in the background', ['webdriver', 'connect:testserver', 'protractor:jenkins']);    grunt.registerTask('test:e2e', 'Alias for test:protractor', ['test:protractor']);    grunt.registerTask('test:docgen', ['jasmine_node']); diff --git a/protractor-conf.js b/protractor-conf.js index 9e7179db..c21ee68f 100644 --- a/protractor-conf.js +++ b/protractor-conf.js @@ -2,12 +2,13 @@ exports.config = {    allScriptsTimeout: 11000,    specs: [ -    'build/docs/ptore2e/**/*.js', +    'build/docs/ptore2e/**/*jqlite_test.js',      'test/e2e/docsAppE2E.js'    ],    capabilities: { -    'browserName': 'chrome' +    'browserName': 'chrome', +    'name': 'Angular E2E: jqlite'    },    baseUrl: 'http://localhost:8000/build/docs/', diff --git a/protractor-jquery-conf.js b/protractor-jquery-conf.js new file mode 100644 index 00000000..6b93994b --- /dev/null +++ b/protractor-jquery-conf.js @@ -0,0 +1,32 @@ +exports.config = { +  allScriptsTimeout: 11000, + +  specs: [ +    'build/docs/ptore2e/**/*jquery_test.js', +    'test/e2e/docsAppE2E.js' +  ], + +  capabilities: { +    'browserName': 'chrome', +    'name': 'Angular E2E: jquery' +  }, + +  baseUrl: 'http://localhost:8000/build/docs/', + +  framework: 'jasmine', + +  onPrepare: function() { +    // Disable animations so e2e tests run more quickly +    var disableNgAnimate = function() { +      angular.module('disableNgAnimate', []).run(function($animate) { +        $animate.enabled(false); +      }); +    }; + +    browser.addMockModule('disableNgAnimate', disableNgAnimate); +  }, + +  jasmineNodeOpts: { +    defaultTimeoutInterval: 30000 +  } +}; diff --git a/scripts/travis/build.sh b/scripts/travis/build.sh index b07e2069..a415c35e 100755 --- a/scripts/travis/build.sh +++ b/scripts/travis/build.sh @@ -3,15 +3,18 @@  set -e  export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev` -export BROWSER=${JOB#*-}  if [ $JOB = "unit" ]; then    grunt ci-checks    grunt test:docgen    grunt test:promises-aplus    grunt test:unit --browsers SL_Chrome,SL_Safari,SL_Firefox,SL_IE_8,SL_IE_9,SL_IE_10,SL_IE_11 --reporters dots -elif [[ $JOB == e2e* ]]; then -  grunt test:protractor --sauceUser $SAUCE_USERNAME \ +elif [ $JOB = "e2e" ]; then +  export GRUNT_TARGET="test:protractor" +  if [ $JQVERSION = "jquery" ]; then +    GRUNT_TARGET="test:jq-protractor" +  fi +  grunt $GRUNT_TARGET --sauceUser $SAUCE_USERNAME \        --sauceKey $SAUCE_ACCESS_KEY \        --capabilities.tunnel-identifier=$TRAVIS_JOB_NUMBER \        --capabilities.build=$TRAVIS_BUILD_NUMBER \ | 
