Skip to content

Commit f9c10c4

Browse files
Merge pull request #401 from abhishek-lambda/CYP-1005
CYP-1005
2 parents 931d74f + 18c147d commit f9c10c4

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

commands/utils/set_args.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,19 @@ function sync_args_from_cmd(args) {
448448
lt_config["run_settings"]["geo_location"] = "";
449449
}
450450

451+
//Check for timezone
452+
if ("timezone" in args) {
453+
lt_config["run_settings"]["timezone"] = args["timezone"];
454+
} else if (!lt_config["run_settings"]["timezone"]) {
455+
lt_config["run_settings"]["timezone"] = "";
456+
}
457+
458+
if ("privateCloud" in args) {
459+
lt_config["run_settings"]["privateCloud"] = args["privateCloud"];
460+
}else if (!lt_config["run_settings"]["privateCloud"]) {
461+
lt_config["run_settings"]["privateCloud"] = false ;
462+
}
463+
451464
//Check for stop on failure location
452465
if ("stop_on_failure" in args) {
453466
lt_config["run_settings"]["stop_on_failure"] = true;

commands/utils/validate.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,12 @@ module.exports = validate_config = function (lt_config, validation_configs) {
452452
}
453453
}
454454

455+
if ("privateCloud" in lt_config["privateCloud"]) {
456+
if (!(typeof lt_config["run_settings"]["privateCloud"] === "boolean")) {
457+
reject("Error!! boolean value is expected in command_log key");
458+
}
459+
}
460+
455461
if(lt_config)
456462
resolve(cypress_version);
457463
});

index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,16 @@ const argv = require("yargs")
250250
alias: "accessibility",
251251
describe: "enable accessibility testing for cypress.",
252252
type: "bool",
253+
})
254+
.option("tz",{
255+
alias: "timezone",
256+
describe: "Set custom timezone in machine for cypress.",
257+
type: "string",
258+
})
259+
.option("pC",{
260+
alias: "privateCloud",
261+
describe: "Set custom private Cloud",
262+
type: "bool",
253263
});
254264
},
255265
function (argv) {

0 commit comments

Comments
 (0)