Skip to content

added command logs caps #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
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
10 changes: 5 additions & 5 deletions commands/utils/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ module.exports = {
"https://api.lambdatest.com/automation/api/v1/cypress/artefacts/test/",
},
beta: {
INTEGRATION_BASE_URL: "https://api-envi-dev.lambdatestinternal.com/liis",
INTEGRATION_BASE_URL: "https://api-cypdevenv12-dev.lambdatestinternal.com/liis",
BUILD_BASE_URL:
"https://api-envi-dev.lambdatestinternal.com/automation/api/v1/builds/",
"https://api-cypdevenv12-dev.lambdatestinternal.com/automation/api/v1/builds/",
BUILD_STOP_URL:
"https://api-envi-dev.lambdatestinternal.com/api/v1/test/stop?sessionId=",
"https://api-cypdevenv12-dev.lambdatestinternal.com/api/v1/test/stop?sessionId=",
SESSION_URL:
"https://api-envi-dev.lambdatestinternal.com/automation/api/v1/sessions?limit=200&session_id=",
"https://api-cypdevenv12-dev.lambdatestinternal.com/automation/api/v1/sessions?limit=200&session_id=",
REPORT_URL:
"https://api-envi-dev.lambdatestinternal.com/automation/api/v1/cypress/artefacts/test/",
"https://api-cypdevenv12-dev.lambdatestinternal.com/automation/api/v1/cypress/artefacts/test/",
},

stage: {
Expand Down
10 changes: 10 additions & 0 deletions commands/utils/set_args.js
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,16 @@ function sync_args_from_cmd(args) {
);
}

if ("cmd_log" in args) {
if (args["cmd_log"] == "true") {
lt_config["run_settings"]["command_log"] = true;
} else {
lt_config["run_settings"]["command_log"] = false;
}
} else if (!lt_config["run_settings"]["command_log"]) {
lt_config["run_settings"]["command_log"] = false;
}

//get specs from current directory if specs are not passed in config or cli
if (
(lt_config["run_settings"]["specs"] == undefined ||
Expand Down
7 changes: 7 additions & 0 deletions commands/utils/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,13 @@ module.exports = validate_config = function (lt_config, validation_configs) {
}
}

//validate if npm_via_tunnel field contains expected value
if ("command_log" in lt_config["run_settings"]) {
if (!(typeof lt_config["run_settings"]["command_log"] === "boolean")) {
reject("Error!! boolean value is expected in command_log key");
}
}

if(lt_config)
resolve(cypress_version);
});
Expand Down
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,11 @@ const argv = require("yargs")
alias: "max_duration",
describe: "stops test if it is running more than max_duration minutes.",
type: "string",
})
.option("cmd_log", {
alias: "command_log",
describe: "show command logs on dashboard.",
type: "string",
});
},
function (argv) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lambdatest-cypress-cli",
"version": "3.0.15",
"version": "3.0.16",
"description": "The lambdatest-cypress-cli is LambdaTest's command-line interface (CLI) aimed to help you run your Cypress tests on LambdaTest platform.",
"homepage": "https://github.com/LambdaTest/lambdatest-cypress-cli",
"author": "LambdaTest <[email protected]>",
Expand Down