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

Commit 3fbde1c

Browse files
committed
Kill protractor-e2e configs
1 parent c69259e commit 3fbde1c

11 files changed

+17
-127
lines changed

Gruntfile.js

+7-21
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ module.exports = function(grunt) {
7777

7878
next();
7979
},
80-
e2e.middleware(),
8180
util.conditionalCsp(),
81+
e2e.middleware(),
8282
connect.favicon('images/favicon.ico'),
8383
connect.static(base)
8484
];
@@ -104,20 +104,13 @@ module.exports = function(grunt) {
104104
},
105105

106106

107-
'protractor-docs': {
107+
protractor: {
108108
normal: 'protractor-conf.js',
109109
travis: 'protractor-travis-conf.js',
110110
jenkins: 'protractor-jenkins-conf.js'
111111
},
112112

113113

114-
protractor: {
115-
normal: 'protractor-e2e.conf.js',
116-
travis: 'protractor-e2e-travis.conf.js',
117-
jenkins: 'protractor-e2e-jenkins.conf.js'
118-
},
119-
120-
121114
clean: {
122115
build: ['build'],
123116
tmp: ['tmp']
@@ -328,23 +321,16 @@ module.exports = function(grunt) {
328321

329322

330323
//alias tasks
331-
grunt.registerTask('test', 'Run unit, docs and e2e tests with Karma', ['jshint', 'jscs', 'package','test:unit','test:promises-aplus', 'tests:docs', 'test:protractor-docs']);
324+
grunt.registerTask('test', 'Run unit, docs and e2e tests with Karma', ['jshint', 'jscs', 'package','test:unit','test:promises-aplus', 'tests:docs', 'test:protractor']);
332325
grunt.registerTask('test:jqlite', 'Run the unit tests with Karma' , ['tests:jqlite']);
333326
grunt.registerTask('test:jquery', 'Run the jQuery unit tests with Karma', ['tests:jquery']);
334327
grunt.registerTask('test:modules', 'Run the Karma module tests with Karma', ['tests:modules']);
335328
grunt.registerTask('test:docs', 'Run the doc-page tests with Karma', ['package', 'tests:docs']);
336329
grunt.registerTask('test:unit', 'Run unit, jQuery and Karma module tests with Karma', ['tests:jqlite', 'tests:jquery', 'tests:modules']);
337-
grunt.registerTask('test:e2e', 'Run E2E tests with Protractor with a test server running in the background',
338-
['webdriver', 'connect:testserver', 'protractor:normal']);
339-
grunt.registerTask('test:travis-e2e', 'Run the E2E tests with protractor and keep a test server running in the background',
340-
['connect:testserver', 'protractor:travis']);
341-
grunt.registerTask('test:ci-e2e', 'Run the E2E tests with protractor and keep a test server running in the background',
342-
['webdriver', 'connect:testserver', 'protractor:jenkins']);
343-
grunt.registerTask('test:protractor-docs', 'Run the end to end docs tests with Protractor and keep a test server running in the background',
344-
['webdriver', 'connect:testserver', 'protractor-docs:normal']);
345-
grunt.registerTask('test:travis-protractor-docs', 'Run the end to end docs tests with Protractor for Travis CI builds', ['connect:testserver', 'protractor-docs:travis']);
346-
grunt.registerTask('test:ci-protractor-docs', 'Run the end to end docs tests with Protractor for Jenkins CI builds', ['webdriver', 'connect:testserver', 'protractor-docs:jenkins']);
347-
grunt.registerTask('test:docs-e2e', 'Alias for test:protractor', ['test:protractor-docs']);
330+
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']);
331+
grunt.registerTask('test:travis-protractor', 'Run the end to end tests with Protractor for Travis CI builds', ['connect:testserver', 'protractor:travis']);
332+
grunt.registerTask('test:ci-protractor', 'Run the end to end tests with Protractor for Jenkins CI builds', ['webdriver', 'connect:testserver', 'protractor:jenkins']);
333+
grunt.registerTask('test:e2e', 'Alias for test:protractor', ['test:protractor']);
348334
grunt.registerTask('test:promises-aplus',['build:promises-aplus-adapter','shell:promises-aplus-tests']);
349335

350336
grunt.registerTask('minify', ['bower','clean', 'build', 'minall']);

jenkins_build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mkdir -p test_out
2828
grunt test:unit --browsers $BROWSERS --reporters=dots,junit --no-colors --no-color
2929

3030
# END TO END TESTS #
31-
grunt test:ci-protractor-docs
31+
grunt test:ci-protractor
3232

3333
# DOCS APP TESTS #
3434
grunt test:docs --browsers $BROWSERS --reporters=dots,junit --no-colors --no-color

lib/grunt/plugins.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,7 @@ module.exports = function(grunt) {
5757
util.updateWebdriver.call(util, this.async());
5858
});
5959

60-
grunt.registerMultiTask('protractor-docs', 'Run Protractor Docs integration tests', function() {
61-
util.startProtractor.call(util, this.data, this.async());
62-
});
63-
64-
grunt.registerMultiTask('protractor', 'Run Protractor E2E tests', function() {
60+
grunt.registerMultiTask('protractor', 'Run Protractor Docs integration tests', function() {
6561
util.startProtractor.call(util, this.data, this.async());
6662
});
6763

protractor-conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
var config = require('./protractor-shared-conf').config;
44

55
config.specs = [
6+
'test/e2e/tests/**/*.js',
67
'build/docs/ptore2e/**/*.js',
78
'docs/app/e2e/**/*.scenario.js'
89
];

protractor-e2e-jenkins.conf.js

-40
This file was deleted.

protractor-e2e-travis.conf.js

-40
This file was deleted.

protractor-e2e.conf.js

-16
This file was deleted.

protractor-jenkins-conf.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ exports.config = {
44
allScriptsTimeout: 11000,
55

66
specs: [
7+
'test/e2e/tests/**/*.js',
78
'build/docs/ptore2e/**/*.js',
89
'docs/app/e2e/*.scenario.js'
910
],

scripts/travis/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ elif [ $JOB = "e2e" ]; then
1515
export USE_JQUERY=1
1616
fi
1717

18-
grunt test:travis-e2e
19-
2018
export TARGET_SPECS="build/docs/ptore2e/**/default_test.js"
2119
if [ $TEST_TARGET = "jquery" ]; then
2220
TARGET_SPECS="build/docs/ptore2e/**/jquery_test.js"
2321
fi
24-
grunt test:travis-protractor-docs --specs "$TARGET_SPECS"
22+
23+
export TARGET_SPECS="test/e2e/tests/**/*.js $TARGET_SPECS"
24+
grunt test:travis-protractor --specs "$TARGET_SPECS"
2525
else
2626
echo "Unknown job type. Please set JOB=unit or JOB=e2e-*."
2727
fi

test/e2e/tools/fixture.js

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ function generateFixture(test, query) {
4040
var s = util.stat(path.resolve(build, src));
4141
if (s && s.isFile()) {
4242
$(script).attr('src', rewriteAngularSrc(src, query));
43+
} else {
44+
$(script).attr('src', util.rewriteTestFile(test, src));
4345
}
4446
}
4547
});

test/e2e/tools/util.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function rewriteTestFile(testname, testfile) {
2828
while (testfile[i] === '/') ++i;
2929
testfile = testfile.slice(i);
3030
var s = stat(path.resolve(tests, testname, testfile));
31-
if (s && s.isFile() || s.isDirectory()) {
31+
if (s && (s.isFile() || s.isDirectory())) {
3232
return ['/test/e2e/fixtures', testname, testfile].join('/');
3333
}
3434
return false;

0 commit comments

Comments
 (0)