Skip to content

3.0.3 #198

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 12 commits into from
Oct 27, 2022
Merged

3.0.3 #198

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
24 changes: 24 additions & 0 deletions commands/utils/set_args.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,15 @@ function sync_args_from_cmd(args) {
} else if (!lt_config["run_settings"]["stop_on_failure"]) {
lt_config["run_settings"]["stop_on_failure"] = false;
}
//Override project name for visual ui
if ("vi-project" in args) {
if (lt_config.run_settings.smart_ui != undefined) {
lt_config.run_settings.smart_ui.project = args["vi-project"];
} else {
lt_config.run_settings.smart_ui = {};
lt_config.run_settings.smart_ui.project = args["vi-project"];
}
}

if (
lt_config.run_settings.project_name &&
Expand Down Expand Up @@ -369,6 +378,21 @@ function sync_args_from_cmd(args) {
"specs to exclude are ",
lt_config["run_settings"]["exclude_specs"]
);

if ("npm-f" in args) {
if (args["npm-f"] == "true") {
lt_config.run_settings.npmf = true;
} else {
lt_config.run_settings.npmf = false;
}
}
if ("npm-lpd" in args) {
if (args["npm-lpd"] == "true") {
lt_config.run_settings.npmlpd = true;
} else {
lt_config.run_settings.npmlpd = false;
}
}
//get specs from current directory if specs are not passed in config or cli
if (
(lt_config["run_settings"]["specs"] == undefined ||
Expand Down
262 changes: 140 additions & 122 deletions index.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -11,128 +11,146 @@ const argv = require("yargs")
"run",
"run tests on lambdatest",
function (yargs) {
return yargs
.option("ccf", {
alias: "cypress-config-file",
describe: "path of the config file",
type: "string",
})
.option("lcf", {
alias: "lambdatest-config-file",
describe: "path of the lambdatest config file",
type: "string",
})
.option("s", {
alias: "specs",
describe: "path of the spec file or directory or pattern",
type: "string",
})
.option("env", {
alias: "environment",
describe: "environment",
type: "string",
})
.option("bn", {
alias: "build-name",
describe: "build name",
type: "string",
})
.option("t", {
alias: "tags",
describe: "test tags",
type: "string",
})
.option("p", {
alias: "parallels",
describe: "no of parellel sessions",
type: "string",
})
.option("envs", {
alias: "env-variables",
describe: "environment variables",
type: "string",
})
.option("tun", {
alias: "tunnel",
describe: "tunnel",
type: "string",
})
.option("tname", {
alias: "tunnel_name",
describe: "tunnel name",
type: "string",
})
.option("brs", {
alias: "browsers",
describe: "browsers to run test format: platform:browser:version",
type: "string",
})
.option("bi", {
alias: "build-identifier",
describe: "Build Identifier / Build Counter",
type: "string",
})
.option("if", {
alias: "ignore_files",
describe: "Files to ignore in the project zip",
type: "string",
})
.option("sync", {
alias: "sync-mode",
describe: "Sync Build",
type: "string",
})
.option("autostart", {
alias: "tat",
describe: "Tunnel Auto Start",
type: "string",
})
.option("headless", {
alias: "headless-mode",
describe: "Run in headless mode",
type: "boolean",
})
.option("net", {
alias: "network",
describe: "Capture Network logs",
type: "string",
})
.option("eof", {
alias: "exit-on-failure",
describe: "Exit With Code 1 on failure",
type: "string",
})
.option("cy", {
alias: "cypress_settings",
describe: "Pass Cypress Settings",
type: "string",
})
.option("geo", {
alias: "geo_location",
describe: "Pass Geo Country Code",
type: "string",
})
.option("sof", {
alias: "stop_on_failure",
describe: "Stop other tests if any test in session gets errored out",
type: "bool",
})
.option("ra", {
alias: "reject_unauthorized",
describe:
"Default rejects self signed certificates in external requests",
type: "bool",
})
.option("bt", {
alias: "build-tags",
describe: "build tags",
type: "string",
})
.option("sys-envs", {
alias: "sys-env-variables",
describe: "system environment variables",
type: "string",
});
return (
yargs
.option("ccf", {
alias: "cypress-config-file",
describe: "path of the config file",
type: "string",
})
.option("lcf", {
alias: "lambdatest-config-file",
describe: "path of the lambdatest config file",
type: "string",
})
.option("s", {
alias: "specs",
describe: "path of the spec file or directory or pattern",
type: "string",
})
.option("env", {
alias: "environment",
describe: "environment",
type: "string",
})
.option("bn", {
alias: "build-name",
describe: "build name",
type: "string",
})
.option("t", {
alias: "tags",
describe: "test tags",
type: "string",
})
.option("p", {
alias: "parallels",
describe: "no of parellel sessions",
type: "string",
})
.option("envs", {
alias: "env-variables",
describe: "environment variables",
type: "string",
})
.option("tun", {
alias: "tunnel",
describe: "tunnel",
type: "string",
})
.option("tname", {
alias: "tunnel_name",
describe: "tunnel name",
type: "string",
})
.option("brs", {
alias: "browsers",
describe: "browsers to run test format: platform:browser:version",
type: "string",
})
.option("bi", {
alias: "build-identifier",
describe: "Build Identifier / Build Counter",
type: "string",
})
.option("if", {
alias: "ignore_files",
describe: "Files to ignore in the project zip",
type: "string",
})
.option("sync", {
alias: "sync-mode",
describe: "Sync Build",
type: "string",
})
.option("autostart", {
alias: "tat",
describe: "Tunnel Auto Start",
type: "string",
})
.option("headless", {
alias: "headless-mode",
describe: "Run in headless mode",
type: "boolean",
})
.option("net", {
alias: "network",
describe: "Capture Network logs",
type: "string",
})
.option("eof", {
alias: "exit-on-failure",
describe: "Exit With Code 1 on failure",
type: "string",
})
.option("cy", {
alias: "cypress_settings",
describe: "Pass Cypress Settings",
type: "string",
})
.option("geo", {
alias: "geo_location",
describe: "Pass Geo Country Code",
type: "string",
})
.option("sof", {
alias: "stop_on_failure",
describe:
"Stop other tests if any test in session gets errored out",
type: "bool",
})
.option("ra", {
alias: "reject_unauthorized",
describe:
"Default rejects self signed certificates in external requests",
type: "bool",
})
.option("bt", {
alias: "build-tags",
describe: "build tags",
type: "string",
})
.option("sys-envs", {
alias: "sys-env-variables",
describe: "system environment variables",
type: "string",
})
// .option("npm-f", {
// alias: "npm-force",
// describe: "force npm install",
// type: "bool",
// })
// .option("npm-lpd", {
// alias: "legacy-peer-deps",
// describe: "force npm install",
// type: "bool",
// })
.option("vip", {
alias: "vi-project",
describe: "visual ui project name",
type: "string",
})
);
},
function (argv) {
require("./commands/run")(argv);
Expand Down
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.2",
"version": "3.0.3",
"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