@@ -103,9 +103,6 @@ var _exampleDartWebBoilerPlateFiles = ['styles.css'];
103
103
* all means (ts|js|dart)
104
104
*/
105
105
gulp . task ( 'run-e2e-tests' , function ( ) {
106
-
107
- var exePath = path . join ( process . cwd ( ) , "./node_modules/.bin/" ) ;
108
-
109
106
var promise ;
110
107
if ( argv . fast ) {
111
108
// fast; skip all setup
@@ -115,7 +112,7 @@ gulp.task('run-e2e-tests', function() {
115
112
var spawnInfo = spawnExt ( 'npm' , [ 'install' ] , { cwd : EXAMPLES_PATH } ) ;
116
113
promise = spawnInfo . promise . then ( function ( ) {
117
114
copyExampleBoilerplate ( ) ;
118
- spawnInfo = spawnExt ( 'webdriver-manager ' , [ 'update' ] , { cwd : exePath } ) ;
115
+ spawnInfo = spawnExt ( 'npm ' , [ 'run' , 'webdriver: update'] , { cwd : EXAMPLES_PATH } ) ;
119
116
return spawnInfo . promise ;
120
117
} ) ;
121
118
}
@@ -124,9 +121,12 @@ gulp.task('run-e2e-tests', function() {
124
121
return findAndRunE2eTests ( argv . filter ) ;
125
122
} ) . then ( function ( status ) {
126
123
reportStatus ( status ) ;
124
+ if ( status . failed . length > 0 ) {
125
+ return Promise . reject ( 'Some test suites failed' ) ;
126
+ }
127
127
} ) . catch ( function ( e ) {
128
128
gutil . log ( e ) ;
129
- return e ;
129
+ process . exit ( 1 ) ;
130
130
} ) ;
131
131
} ) ;
132
132
@@ -213,9 +213,8 @@ function runProtractor(prepPromise, appDir, appRunSpawnInfo, protractorConfigFil
213
213
. then ( function ( data ) {
214
214
// start protractor
215
215
var pcFilename = path . resolve ( protractorConfigFilename ) ; // need to resolve because we are going to be running from a different dir
216
- var exePath = path . join ( process . cwd ( ) , "./node_modules/.bin/" ) ;
217
- var spawnInfo = spawnExt ( 'protractor' ,
218
- [ pcFilename , '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : exePath } ) ;
216
+ var spawnInfo = spawnExt ( 'npm' , [ 'run' , 'protractor' , '--' , pcFilename ,
217
+ '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : EXAMPLES_PATH } ) ;
219
218
return spawnInfo . promise
220
219
} )
221
220
. then (
@@ -483,9 +482,14 @@ gulp.task('git-changed-examples', ['_shred-devguide-examples'], function(){
483
482
484
483
gulp . task ( 'check-deploy' , [ 'build-docs' ] , function ( ) {
485
484
return harpCompile ( ) . then ( function ( ) {
486
- gutil . log ( 'compile ok - running live server ...' ) ;
487
- execPromise ( 'npm run live-server ./www' ) ;
488
- return askDeploy ( ) ;
485
+ gutil . log ( 'compile ok' ) ;
486
+ if ( argv . dryRun ) {
487
+ return false ;
488
+ } else {
489
+ gutil . log ( 'running live server ...' ) ;
490
+ execPromise ( 'npm run live-server ./www' ) ;
491
+ return askDeploy ( ) ;
492
+ }
489
493
} ) . then ( function ( shouldDeploy ) {
490
494
if ( shouldDeploy ) {
491
495
gutil . log ( 'deploying...' ) ;
0 commit comments