Skip to content

Commit 8a13398

Browse files
lambdatest cypress init command improvements
1 parent 7db2580 commit 8a13398

File tree

4 files changed

+48
-2
lines changed

4 files changed

+48
-2
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
module.exports = {
2+
lambdatest_auth: {
3+
username: "<Your LambdaTest username>",
4+
access_key: "<Your LambdaTest access key>",
5+
},
6+
browsers: [
7+
{
8+
browser: "Chrome",
9+
platform: "Windows 10",
10+
versions: ["latest-1"],
11+
},
12+
{
13+
browser: "Firefox",
14+
platform: "Windows 10",
15+
versions: ["latest-1"],
16+
},
17+
],
18+
run_settings: {
19+
reporter_config_file: "base_reporter_config.json",
20+
build_name: "build-name",
21+
parallels: 1,
22+
specs: "<path_of_cypress_spec_files>",
23+
ignore_files: "",
24+
network: false,
25+
headless: false,
26+
npm_dependencies: {
27+
cypress: "10.5.0",
28+
},
29+
},
30+
tunnel_settings: {
31+
tunnel: false,
32+
tunnel_name: null,
33+
},
34+
};
File renamed without changes.

commands/utils/validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ module.exports = validate_config = function (lt_config, validation_configs) {
148148
lt_config["run_settings"]["cypress_config_file"]
149149
) {
150150
reject(
151-
'Error!! --ccf flag and cypress_config_file is not supported with cypress>=10,use \n --cy="--config-file <file path>"'
151+
'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'
152152
);
153153
}
154154

index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,19 @@ const { init } = require("./commands/init");
44

55
const argv = require("yargs")
66
.usage("Usage: $0 <command> [options]")
7-
.command("init", "create an intial config file", {}, function (argv) {
7+
.command("init", "create an intial config file", function(yargs){
8+
return yargs
9+
.option("cv",{
10+
alias: "cypress-version",
11+
describe: "Cypress version",
12+
type: "int",
13+
})
14+
.option("f",{
15+
alias: "config-file-name",
16+
describe: "Cypress version",
17+
type: "string",
18+
})
19+
}, function (argv) {
820
require("./commands/init")(argv);
921
})
1022
.command(

0 commit comments

Comments
 (0)