File tree 3 files changed +13
-12
lines changed
3 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -108,22 +108,23 @@ module.exports = function(gulp, argv) {
108
108
}
109
109
110
110
function protractor ( done , args ) {
111
- var child = cp . spawn ( 'node' , [
112
- path . resolve ( projectRoot , 'node_modules/.bin/protractor' )
113
- ] . concat ( args ) , {
111
+ var errored = false ;
112
+ var child = cp . spawn ( 'protractor' , args , {
114
113
stdio : [ process . stdin , process . stdout , 'pipe' ]
115
114
} ) ;
116
115
117
- var finish = _ . once ( function ( err ) {
118
- err && done ( err ) || done ( ) ;
116
+ child . stderr . on ( 'data' , function ( data ) {
119
117
protractorHttpServer . close ( ) ;
120
- } ) ;
118
+ console . error ( data . toString ( ) ) ;
119
+ if ( ! errored ) {
120
+ errored = true ;
121
+ done ( 'Protractor tests failed.' ) ;
122
+ }
121
123
122
- child . stderr . on ( 'data' , function ( data ) {
123
- finish ( 'Protractor tests failed. Error:' , data . toString ( ) ) ;
124
124
} ) ;
125
125
child . on ( 'exit' , function ( ) {
126
- finish ( ) ;
126
+ protractorHttpServer . close ( ) ;
127
+ done ( ) ;
127
128
} ) ;
128
129
}
129
130
} ;
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ var IonicSnapshot = function(options) {
24
24
self . height = browser . params . height || - 1 ;
25
25
self . highestMismatch = 0 ;
26
26
self . screenshotRequestPromises = [ ] ;
27
- self . ptor = protractor . getInstance ( ) ;
27
+ // browser = protractor.getInstance();
28
28
29
29
self . flow = protractor . promise . controlFlow ( ) ;
30
30
@@ -74,7 +74,7 @@ var IonicSnapshot = function(options) {
74
74
75
75
browser . waitForAngular ( ) . then ( function ( ) {
76
76
77
- self . ptor . getCurrentUrl ( ) . then ( function ( currentUrl ) {
77
+ browser . getCurrentUrl ( ) . then ( function ( currentUrl ) {
78
78
79
79
browser . sleep ( self . sleepBetweenSpecs ) . then ( function ( ) {
80
80
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ exports.config = {
8
8
// include glob patterns.
9
9
specs : [
10
10
path . resolve ( projectRoot , 'test/css/**/*.scenario.js' ) ,
11
- path . resolve ( projectRoot , 'dist/ionic-demo /**/*.scenario.js' ) ,
11
+ path . resolve ( projectRoot , 'demos /**/*.scenario.js' ) ,
12
12
] ,
13
13
14
14
// Options to be passed to Jasmine-node.
You can’t perform that action at this time.
0 commit comments