Skip to content

Commit c92cf63

Browse files
authored
Merge pull request #285 from HRanjan-11/CYP-697
added http2 caps
2 parents 98f8354 + bdd9c64 commit c92cf63

File tree

5 files changed

+25
-3
lines changed

5 files changed

+25
-3
lines changed

commands/utils/set_args.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,16 @@ function sync_args_from_cmd(args) {
353353
lt_config["run_settings"]["network"] = false;
354354
}
355355

356+
if ("network_http2" in args) {
357+
if (args["network_http2"] == "true") {
358+
lt_config.run_settings.network_http2 = true;
359+
} else {
360+
lt_config.run_settings.network_http2 = false;
361+
}
362+
} else if (lt_config["run_settings"]["network_http2"] && !lt_config["run_settings"]["network_http2"]) {
363+
lt_config["run_settings"]["network_http2"] = false;
364+
}
365+
356366
if ("headless" in args) {
357367
lt_config["run_settings"]["headless"] = args["headless"];
358368
} else if (!lt_config["run_settings"]["headless"]) {

commands/utils/validate.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,13 @@ module.exports = validate_config = function (lt_config, validation_configs) {
191191
}
192192
}
193193

194+
//validate if network_http2 field contains expected value
195+
if ("network_http2" in lt_config["run_settings"]) {
196+
if (![true, false].includes(lt_config["run_settings"]["network_http2"])) {
197+
reject("Error!! boolean value is expected in network_http2 key");
198+
}
199+
}
200+
194201
if (
195202
"downloads" in lt_config["run_settings"] &&
196203
lt_config["run_settings"]["downloads"] != ""

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ const argv = require("yargs")
212212
alias: "command_log",
213213
describe: "show command logs on dashboard.",
214214
type: "string",
215+
})
216+
.option("net_http2", {
217+
alias: "network_http2",
218+
describe: "Capture Http2 Network logs",
219+
type: "bool",
215220
});
216221
},
217222
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.23",
3+
"version": "3.0.24",
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)