Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions bin/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,22 @@ exports.setVideoCliConfig = (bsConfig, videoConfig) => {
if(this.isUndefined(user_cypress_version) || this.isUndefined(cypress_major_version) || parseInt(cypress_major_version) >= 13 ) {
let video_args = `video=${videoConfig.video},videoUploadOnPasses=${videoConfig.videoUploadOnPasses}`;
config_args = this.isUndefined(config_args) ? video_args : config_args + ',' + video_args;
let params = config_args.split(",");
const finalParamsHash = {};

for (let i = 0; i < params.length; i++) {
const param = params[i].split('=');
if (finalParamsHash[param[0]] == undefined) {
finalParamsHash[param[0]] = param[1];
}
};

const arr = [];
for (const [key, value] of Object.entries(finalParamsHash)) {
arr.push(`${key}=${value}`);
}
config_args = arr.join(",");
videoConfig["video"] = finalParamsHash["video"];
logger.debug(`Setting default video true for cypress 13 and above in cli for cypress version ${user_cypress_version} with cli args - ${config_args}`)
}
if (bsConfig.run_settings && this.isNotUndefined(config_args)) bsConfig["run_settings"]["config"] = config_args;
Expand Down
Loading