Skip to content

Commit 57740c5

Browse files
committed
CYP-1026
1 parent 7e4e4cc commit 57740c5

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

commands/utils/default_config_10.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module.exports = {
2222
specs: "<path_of_cypress_spec_files>",
2323
ignore_files: "",
2424
network: false,
25+
video: true,
2526
headless: false,
2627
npm_dependencies: {
2728
cypress: "10.5.0",

commands/utils/default_config_9.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module.exports = {
2323
specs: "<path_of_cypress_spec_files>",
2424
ignore_files: "",
2525
network: false,
26+
video: true,
2627
headless: false,
2728
npm_dependencies: {
2829
cypress: "9.6.0",

commands/utils/set_args.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,14 @@ function sync_args_from_cmd(args) {
363363
lt_config["run_settings"]["network"] = false;
364364
}
365365

366+
if ("video" in args) {
367+
lt_config["run_settings"]["video"] = true
368+
? args["video"] == "true"
369+
: false;
370+
} else if (!lt_config["run_settings"]["video"]) {
371+
lt_config["run_settings"]["video"] = true;
372+
}
373+
366374
if ("network_http2" in args) {
367375
if (args["network_http2"] == "true") {
368376
lt_config.run_settings.network_http2 = true;

commands/utils/validate.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@ module.exports = validate_config = function (lt_config, validation_configs) {
191191
}
192192
}
193193

194+
//validate if video field contains expected value
195+
if ("video" in lt_config["run_settings"]) {
196+
if (![true, false].includes(lt_config["run_settings"]["video"])) {
197+
reject("Error!! boolean value is expected in video key");
198+
}
199+
}
200+
194201
//validate if network_http2 field contains expected value
195202
if ("network_http2" in lt_config["run_settings"]) {
196203
if (![true, false].includes(lt_config["run_settings"]["network_http2"])) {

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ const argv = require("yargs")
122122
describe: "Capture Network logs",
123123
type: "string",
124124
})
125+
.option("video", {
126+
alias: "video",
127+
describe: "Capture video recording",
128+
type: "string",
129+
})
125130
.option("fullHar", {
126131
alias: "fullHar",
127132
describe: "Capture Full Har Network logs",

0 commit comments

Comments
 (0)