Skip to content

Release 19 dec #287

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 5 commits into from
Dec 19, 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
20 changes: 20 additions & 0 deletions commands/utils/set_args.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,26 @@ function sync_args_from_cmd(args) {
lt_config["run_settings"]["network"] = false;
}

if ("network_http2" in args) {
if (args["network_http2"] == "true") {
lt_config.run_settings.network_http2 = true;
} else {
lt_config.run_settings.network_http2 = false;
}
} else if (lt_config["run_settings"]["network_http2"] && !lt_config["run_settings"]["network_http2"]) {
lt_config["run_settings"]["network_http2"] = false;
}

if ("network_ws" in args) {
if (args["network_ws"] == "true") {
lt_config.run_settings.network_ws = true;
} else {
lt_config.run_settings.network_ws = false;
}
} else if (lt_config["run_settings"]["network_ws"] && !lt_config["run_settings"]["network_ws"]) {
lt_config["run_settings"]["network_ws"] = false;
}

if ("headless" in args) {
lt_config["run_settings"]["headless"] = args["headless"];
} else if (!lt_config["run_settings"]["headless"]) {
Expand Down
7 changes: 7 additions & 0 deletions commands/utils/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,13 @@ module.exports = validate_config = function (lt_config, validation_configs) {
}
}

//validate if network_http2 field contains expected value
if ("network_http2" in lt_config["run_settings"]) {
if (![true, false].includes(lt_config["run_settings"]["network_http2"])) {
reject("Error!! boolean value is expected in network_http2 key");
}
}

if (
"downloads" in lt_config["run_settings"] &&
lt_config["run_settings"]["downloads"] != ""
Expand Down
10 changes: 10 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,16 @@ const argv = require("yargs")
alias: "command_log",
describe: "show command logs on dashboard.",
type: "string",
})
.option("net_http2", {
alias: "network_http2",
describe: "Capture Http2 Network logs",
type: "bool",
})
.option("net_ws", {
alias: "network_ws",
describe: "Bypass web socket calls for Network logs",
type: "bool",
});
},
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.23",
"version": "3.0.24",
"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