Skip to content

Commit 04547af

Browse files
committed
change error texts
1 parent 4ea1f1d commit 04547af

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

bin/helpers/capabilityHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ const validate = (bsConfig, args) => {
139139
cypressJson = JSON.parse(cypressJsonContent);
140140

141141
// Cypress Json Base Url & Local true check
142-
if (!Utils.isUndefined(cypressJson.baseUrl) && cypressJson.baseUrl.includes("localhost") && !Utils.getLocalFlag(bsConfig.connection_settings)) reject(Constants.validationMessages.LOCAL_NOT_SET);
142+
if (!Utils.isUndefined(cypressJson.baseUrl) && cypressJson.baseUrl.includes("localhost") && !Utils.getLocalFlag(bsConfig.connection_settings)) reject(Constants.validationMessages.LOCAL_NOT_SET.replace("<baseUrlValue>", cypressJson.baseUrl));
143143

144144
// Detect if the user is not using the right directory structure, and throw an error
145145
if (!Utils.isUndefined(cypressJson.integrationFolder) && !Utils.isCypressProjDirValid(bsConfig.run_settings.cypressProjectDir,cypressJson.integrationFolder)) reject(Constants.validationMessages.INCORRECT_DIRECTORY_STRUCTURE);

bin/helpers/constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const userMessages = {
1515
BUILD_INFO_FAILED: "Failed to get build info.",
1616
BUILD_STOP_FAILED: "Failed to stop build.",
1717
BUILD_REPORT_MESSAGE: "See the entire build report here:",
18-
ZIP_UPLOADER_NOT_REACHABLE: "Could not reach to zip uploader.",
18+
ZIP_UPLOADER_NOT_REACHABLE: "Could not reach BrowserStack APIs. Please check your network or see if you need to whitelist *.browserstack.com",
1919
ZIP_UPLOAD_FAILED: "Zip Upload failed.",
2020
CONFIG_FILE_CREATED: "BrowserStack Config File created, you can now run browserstack-cypress --config-file run",
2121
CONFIG_FILE_EXISTS: "File already exists, delete the browserstack.json file manually. skipping...",
@@ -56,7 +56,7 @@ const validationMessages = {
5656
CYPRESS_JSON_NOT_FOUND: "cypress.json file is not found at cypress_proj_dir path ",
5757
INVALID_CYPRESS_JSON: "cypress.json is not a valid json",
5858
INVALID_DEFAULT_AUTH_PARAMS: "Your username and access key are required to run your tests on BrowserStack. Learn more at https://www.browserstack.com/docs/automate/cypress/authentication",
59-
LOCAL_NOT_SET: "To test <baseUrl value> on BrowserStack, you will have to set up Local testing. Read more here: https://www.browserstack.com/docs/automate/cypress/local-testing",
59+
LOCAL_NOT_SET: "To test <baseUrlValue> on BrowserStack, you will have to set up Local testing. Read more here: https://www.browserstack.com/docs/automate/cypress/local-testing",
6060
INCORRECT_DIRECTORY_STRUCTURE: "No tests to run. Note that your Cypress tests should be in the same directory where the cypress.json exists."
6161
};
6262

test/unit/bin/helpers/capabilityHelper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ describe("capabilityHelper.js", () => {
856856
.catch((error) => {
857857
chai.assert.equal(
858858
error,
859-
Constants.validationMessages.LOCAL_NOT_SET
859+
Constants.validationMessages.LOCAL_NOT_SET.replace("<baseUrlValue>", "http://localhost:3000")
860860
);
861861
fs.existsSync.restore();
862862
fs.readFileSync.restore();

0 commit comments

Comments
 (0)