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

Commit e645f7c

Browse files
juliemrIgorMinar
authored andcommitted
refactor(testing): split travis end to end tests into separate jobs for jquery and jqlite
Closes #6159
1 parent ad275b2 commit e645f7c

File tree

5 files changed

+49
-8
lines changed

5 files changed

+49
-8
lines changed

.travis.yml

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ node_js:
55
env:
66
matrix:
77
- JOB=unit
8-
- JOB=e2e-chrome
9-
- JOB=e2e-firefox
10-
- JOB=e2e-safari
8+
- JOB=e2e BROWSER=chrome JQVERSION=jqlite
9+
- JOB=e2e BROWSER=firefox JQVERSION=jqlite
10+
- JOB=e2e BROWSER=safari JQVERSION=jqlite
11+
- JOB=e2e BROWSER=chrome JQVERSION=jquery
12+
- JOB=e2e BROWSER=firefox JQVERSION=jquery
13+
- JOB=e2e BROWSER=safari JQVERSION=jquery
1114
global:
1215
- SAUCE_USERNAME=angular-ci
1316
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987

Gruntfile.js

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ module.exports = function(grunt) {
9292

9393
protractor: {
9494
normal: 'protractor-conf.js',
95+
jquery: 'protractor-jquery-conf.js',
9596
jenkins: 'protractor-jenkins-conf.js'
9697
},
9798

@@ -292,6 +293,7 @@ module.exports = function(grunt) {
292293
grunt.registerTask('test:docs', 'Run the doc-page tests with Karma', ['package', 'tests:docs']);
293294
grunt.registerTask('test:unit', 'Run unit, jQuery and Karma module tests with Karma', ['tests:jqlite', 'tests:jquery', 'tests:modules']);
294295
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']);
296+
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']);
295297
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']);
296298
grunt.registerTask('test:e2e', 'Alias for test:protractor', ['test:protractor']);
297299
grunt.registerTask('test:docgen', ['jasmine_node']);

protractor-conf.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ exports.config = {
22
allScriptsTimeout: 11000,
33

44
specs: [
5-
'build/docs/ptore2e/**/*.js',
5+
'build/docs/ptore2e/**/*jqlite_test.js',
66
'test/e2e/docsAppE2E.js'
77
],
88

99
capabilities: {
10-
'browserName': 'chrome'
10+
'browserName': 'chrome',
11+
'name': 'Angular E2E: jqlite'
1112
},
1213

1314
baseUrl: 'http://localhost:8000/build/docs/',

protractor-jquery-conf.js

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
exports.config = {
2+
allScriptsTimeout: 11000,
3+
4+
specs: [
5+
'build/docs/ptore2e/**/*jquery_test.js',
6+
'test/e2e/docsAppE2E.js'
7+
],
8+
9+
capabilities: {
10+
'browserName': 'chrome',
11+
'name': 'Angular E2E: jquery'
12+
},
13+
14+
baseUrl: 'http://localhost:8000/build/docs/',
15+
16+
framework: 'jasmine',
17+
18+
onPrepare: function() {
19+
// Disable animations so e2e tests run more quickly
20+
var disableNgAnimate = function() {
21+
angular.module('disableNgAnimate', []).run(function($animate) {
22+
$animate.enabled(false);
23+
});
24+
};
25+
26+
browser.addMockModule('disableNgAnimate', disableNgAnimate);
27+
},
28+
29+
jasmineNodeOpts: {
30+
defaultTimeoutInterval: 30000
31+
}
32+
};

scripts/travis/build.sh

+6-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@
33
set -e
44

55
export SAUCE_ACCESS_KEY=`echo $SAUCE_ACCESS_KEY | rev`
6-
export BROWSER=${JOB#*-}
76

87
if [ $JOB = "unit" ]; then
98
grunt ci-checks
109
grunt test:docgen
1110
grunt test:promises-aplus
1211
grunt test:unit --browsers SL_Chrome,SL_Safari,SL_Firefox,SL_IE_8,SL_IE_9,SL_IE_10,SL_IE_11 --reporters dots
13-
elif [[ $JOB == e2e* ]]; then
14-
grunt test:protractor --sauceUser $SAUCE_USERNAME \
12+
elif [ $JOB = "e2e" ]; then
13+
export GRUNT_TARGET="test:protractor"
14+
if [ $JQVERSION = "jquery" ]; then
15+
GRUNT_TARGET="test:jq-protractor"
16+
fi
17+
grunt $GRUNT_TARGET --sauceUser $SAUCE_USERNAME \
1518
--sauceKey $SAUCE_ACCESS_KEY \
1619
--capabilities.tunnel-identifier=$TRAVIS_JOB_NUMBER \
1720
--capabilities.build=$TRAVIS_BUILD_NUMBER \

0 commit comments

Comments
 (0)