Skip to content

Cyp 488- Improved cli command for cypress 9 and 10 #210

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 3 commits into from
Nov 24, 2022
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
34 changes: 34 additions & 0 deletions commands/utils/default_config_10.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
module.exports = {
lambdatest_auth: {
username: "<Your LambdaTest username>",
access_key: "<Your LambdaTest access key>",
},
browsers: [
{
browser: "Chrome",
platform: "Windows 10",
versions: ["latest-1"],
},
{
browser: "Firefox",
platform: "Windows 10",
versions: ["latest-1"],
},
],
run_settings: {
reporter_config_file: "base_reporter_config.json",
build_name: "build-name",
parallels: 1,
specs: "<path_of_cypress_spec_files>",
ignore_files: "",
network: false,
headless: false,
npm_dependencies: {
cypress: "10.5.0",
},
},
tunnel_settings: {
tunnel: false,
tunnel_name: null,
},
};
File renamed without changes.
2 changes: 1 addition & 1 deletion commands/utils/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ module.exports = validate_config = function (lt_config, validation_configs) {
lt_config["run_settings"]["cypress_config_file"]
) {
reject(
'Error!! --ccf flag and cypress_config_file is not supported with cypress>=10,use \n --cy="--config-file <file path>"'
'Error!! --ccf flag, cypress_config_file, cypress.json is not supported with cypress>=10,remove cypress.json if present and use \n --cy="--config-file <file path>" For passing custom config files'
);
}

Expand Down
14 changes: 13 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,19 @@ const { init } = require("./commands/init");

const argv = require("yargs")
.usage("Usage: $0 <command> [options]")
.command("init", "create an intial config file", {}, function (argv) {
.command("init", "create an intial config file", function(yargs){
return yargs
.option("cv",{
alias: "cypress-version",
describe: "Cypress version",
type: "int",
})
.option("f",{
alias: "config-file-name",
describe: "Cypress version",
type: "string",
})
}, function (argv) {
require("./commands/init")(argv);
})
.command(
Expand Down