Skip to content

Commit 654dd49

Browse files
authored
Merge pull request #259 from HRanjan-11/CYP-768
added command logs caps
2 parents f260d15 + 5b3f132 commit 654dd49

File tree

6 files changed

+30
-8
lines changed

6 files changed

+30
-8
lines changed

commands/utils/constants.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,15 @@ module.exports = {
2727
"https://api.lambdatest.com/automation/api/v1/cypress/artefacts/test/",
2828
},
2929
beta: {
30-
INTEGRATION_BASE_URL: "https://api-envi-dev.lambdatestinternal.com/liis",
30+
INTEGRATION_BASE_URL: "https://api-cypdevenv12-dev.lambdatestinternal.com/liis",
3131
BUILD_BASE_URL:
32-
"https://api-envi-dev.lambdatestinternal.com/automation/api/v1/builds/",
32+
"https://api-cypdevenv12-dev.lambdatestinternal.com/automation/api/v1/builds/",
3333
BUILD_STOP_URL:
34-
"https://api-envi-dev.lambdatestinternal.com/api/v1/test/stop?sessionId=",
34+
"https://api-cypdevenv12-dev.lambdatestinternal.com/api/v1/test/stop?sessionId=",
3535
SESSION_URL:
36-
"https://api-envi-dev.lambdatestinternal.com/automation/api/v1/sessions?limit=200&session_id=",
36+
"https://api-cypdevenv12-dev.lambdatestinternal.com/automation/api/v1/sessions?limit=200&session_id=",
3737
REPORT_URL:
38-
"https://api-envi-dev.lambdatestinternal.com/automation/api/v1/cypress/artefacts/test/",
38+
"https://api-cypdevenv12-dev.lambdatestinternal.com/automation/api/v1/cypress/artefacts/test/",
3939
},
4040

4141
stage: {

commands/utils/set_args.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,16 @@ function sync_args_from_cmd(args) {
442442
);
443443
}
444444

445+
if ("cmd_log" in args) {
446+
if (args["cmd_log"] == "true") {
447+
lt_config["run_settings"]["command_log"] = true;
448+
} else {
449+
lt_config["run_settings"]["command_log"] = false;
450+
}
451+
} else if (!lt_config["run_settings"]["command_log"]) {
452+
lt_config["run_settings"]["command_log"] = false;
453+
}
454+
445455
//get specs from current directory if specs are not passed in config or cli
446456
if (
447457
(lt_config["run_settings"]["specs"] == undefined ||

commands/utils/validate.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,13 @@ module.exports = validate_config = function (lt_config, validation_configs) {
416416
}
417417
}
418418

419+
//validate if npm_via_tunnel field contains expected value
420+
if ("command_log" in lt_config["run_settings"]) {
421+
if (!(typeof lt_config["run_settings"]["command_log"] === "boolean")) {
422+
reject("Error!! boolean value is expected in command_log key");
423+
}
424+
}
425+
419426
if(lt_config)
420427
resolve(cypress_version);
421428
});

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,11 @@ const argv = require("yargs")
192192
alias: "max_duration",
193193
describe: "stops test if it is running more than max_duration minutes.",
194194
type: "string",
195+
})
196+
.option("cmd_log", {
197+
alias: "command_log",
198+
describe: "show command logs on dashboard.",
199+
type: "string",
195200
});
196201
},
197202
function (argv) {

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.15",
3+
"version": "3.0.16",
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 <[email protected]>",

0 commit comments

Comments
 (0)