File tree Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Expand file tree Collapse file tree 4 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ module.exports={
26
26
"specs" :"./*.spec.js" ,
27
27
"ignore_files" :"" ,
28
28
"feature_file_suppport" : false ,
29
+ "network" : false ,
29
30
} ,
30
31
"tunnel_settings" : {
31
32
"tunnel" : false ,
Original file line number Diff line number Diff line change @@ -227,6 +227,14 @@ function sync_args_from_cmd(args) {
227
227
} else {
228
228
lt_config [ "tunnel_settings" ] [ "autostart" ] = true ;
229
229
}
230
+
231
+ if ( "network" in args ) {
232
+ lt_config [ "run_settings" ] [ "network" ] = true
233
+ ? args [ "network" ] == "true"
234
+ : false ;
235
+ } else if ( ! lt_config [ "run_settings" ] [ "network" ] ) {
236
+ lt_config [ "run_settings" ] [ "network" ] = false ;
237
+ }
230
238
//get specs from current directory if specs are not passed in config or cli
231
239
if (
232
240
( lt_config [ "run_settings" ] [ "specs" ] == undefined ||
Original file line number Diff line number Diff line change @@ -109,7 +109,12 @@ module.exports = validate_config = function (lt_config) {
109
109
reject ( "Error!! Package.json File does not has correct json" ) ;
110
110
}
111
111
}
112
-
112
+ //validate if network field contains expected value
113
+ if ( "network" in lt_config [ "run_settings" ] ) {
114
+ if ( ! ( [ true , false ] . includes ( lt_config [ "run_settings" ] [ "network" ] ) ) ) {
115
+ reject ( "Error!! boolean value is expected in network key" ) ;
116
+ }
117
+ }
113
118
resolve ( "Validated the Config" ) ;
114
119
} ) ;
115
120
} ;
Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ const argv = require('yargs')
77
77
alias : 'tat' ,
78
78
describe : 'Tunnel Auto Start' ,
79
79
type : 'string'
80
+ } ) . option ( 'net' , {
81
+ alias : 'network' ,
82
+ describe : 'Capture Network logs' ,
83
+ type : 'string'
80
84
} )
81
85
} ,
82
86
function ( argv ) {
You can’t perform that action at this time.
0 commit comments