Skip to content

Commit 76d4f6a

Browse files
authored
Merge pull request #309 from HRanjan-11/CYP-950
added smart ui build name and baseline flag
2 parents d734963 + 2ca8174 commit 76d4f6a

File tree

4 files changed

+33
-3
lines changed

4 files changed

+33
-3
lines changed

commands/utils/set_args.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,28 @@ function sync_args_from_cmd(args) {
444444
}
445445
}
446446

447+
//Override build name for visual ui
448+
if ("vi-build" in args) {
449+
if (lt_config.run_settings.smart_ui != undefined) {
450+
lt_config.run_settings.smart_ui.build = args["vi-build"];
451+
} else {
452+
lt_config.run_settings.smart_ui = {};
453+
lt_config.run_settings.smart_ui.build = args["vi-build"];
454+
}
455+
}
456+
457+
//Override baseline for visual ui
458+
if ("vi-base" in args) {
459+
if (lt_config.run_settings.smart_ui == undefined) {
460+
lt_config.run_settings.smart_ui = {};
461+
}
462+
if (args["vi-base"] == "true") {
463+
lt_config.run_settings.smart_ui.baseline = true;
464+
} else {
465+
lt_config.run_settings.smart_ui.baseline = false;
466+
}
467+
}
468+
447469
if (
448470
lt_config.run_settings.project_name &&
449471
!lt_config.run_settings.project_key

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,14 @@ const argv = require("yargs")
187187
alias: "vi-project",
188188
describe: "visual ui project name",
189189
type: "string",
190+
}).option("vib", {
191+
alias: "vi-build",
192+
describe: "visual ui build name",
193+
type: "string",
194+
}).option("vibase", {
195+
alias: "vi-base",
196+
describe: "visual ui baseline",
197+
type: "bool",
190198
})
191199
.option("res", {
192200
alias: "resolution",

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "lambdatest-cypress-cli",
3-
"version": "3.0.27",
3+
"version": "3.0.28",
44
"description": "The lambdatest-cypress-cli is LambdaTest's command-line interface (CLI) aimed to help you run your Cypress tests on LambdaTest platform.",
55
"homepage": "https://github.com/LambdaTest/lambdatest-cypress-cli",
66
"author": "LambdaTest <keys@lambdatest.com>",

0 commit comments

Comments
 (0)