Skip to content

Commit 1cdb28d

Browse files
committed
pull master
2 parents 3bf8d03 + d1bd0d6 commit 1cdb28d

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

commands/utils/default_config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ module.exports={
2626
"specs":"./*.spec.js",
2727
"ignore_files":"",
2828
"feature_file_suppport": false,
29+
"network": false,
2930
},
3031
"tunnel_settings": {
3132
"tunnel": false,

commands/utils/set_args.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,14 @@ function sync_args_from_cmd(args) {
227227
} else {
228228
lt_config["tunnel_settings"]["autostart"] = true;
229229
}
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+
}
230238
//get specs from current directory if specs are not passed in config or cli
231239
if (
232240
(lt_config["run_settings"]["specs"] == undefined ||

commands/utils/validate.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,12 @@ module.exports = validate_config = function (lt_config) {
120120
}
121121
}
122122
}
123+
//validate if network field contains expected value
124+
if ("network" in lt_config["run_settings"]) {
125+
if (!([true, false].includes(lt_config["run_settings"]["network"]))){
126+
reject("Error!! boolean value is expected in network key");
127+
}
128+
}
123129
resolve("Validated the Config");
124130
});
125131
};

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ const argv = require('yargs')
6969
alias: 'tat',
7070
describe: 'Tunnel Auto Start',
7171
type: 'string'
72+
}).option('net', {
73+
alias: 'network',
74+
describe: 'Capture Network logs',
75+
type: 'string'
7276
})
7377
},
7478
function (argv) {

0 commit comments

Comments
 (0)