Skip to content

Commit 500d901

Browse files
committed
add cypress_version key
1 parent ac5c1f8 commit 500d901

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

bin/commands/runs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ module.exports = function run(args) {
6666
logger.warn(Constants.userMessages.NO_PARALLELS);
6767
}
6868

69+
if (bsConfig.cypress_version && bsConfig.cypress_version !== data.cypress_version) {
70+
logger.warn(Constants.userMessages.CYPRESS_VERSION_CHANGED);
71+
}
72+
6973
if (!args.disableNpmWarning && bsConfig.run_settings.npm_dependencies && Object.keys(bsConfig.run_settings.npm_dependencies).length <= 0) logger.warn(Constants.userMessages.NO_NPM_DEPENDENCIES);
7074

7175
logger.info(message);

bin/helpers/capabilityHelper.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ const caps = (bsConfig, zip) => {
8181
}
8282
}
8383

84+
if (bsConfig.cypress_version) obj.cypress_version = bsConfig.cypress_version;
85+
8486
if(obj.parallels === Constants.cliMessages.RUN.DEFAULT_PARALLEL_MESSAGE) obj.parallels = undefined
8587

8688
if (obj.project) logger.log(`Project name is: ${obj.project}`);

bin/helpers/constants.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ const userMessages = {
1515
VISIT_DASHBOARD: "Visit the Automate dashboard for test reporting:",
1616
CONFLICTING_INIT_ARGUMENTS: "Conflicting arguments given. You can use --path only with a file name, and not with a file path.",
1717
NO_PARALLELS: "Your tests will run sequentially. Read more about running your tests in parallel here: https://www.browserstack.com/docs/automate/cypress/run-tests-in-parallel",
18-
NO_NPM_DEPENDENCIES: "No npm dependencies specified. Read more here: https://www.browserstack.com/docs/automate/cypress/npm-packages. You can suppress this warning by using --disable-npm-warning flag."
18+
NO_NPM_DEPENDENCIES: "No npm dependencies specified. Read more here: https://www.browserstack.com/docs/automate/cypress/npm-packages. You can suppress this warning by using --disable-npm-warning flag.",
19+
CYPRESS_VERSION_CHANGED: "You passed an invalid version and we changed it to a proper one."
1920
};
2021

2122
const validationMessages = {

0 commit comments

Comments
 (0)