Skip to content

Adding validation to check if cypress.json is present at the cypress_proj_dir. #28

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

Conversation

karanshah81295
Copy link
Contributor

Adding validation to check if cypress.json is present at the cypress_proj_dir.

@@ -91,6 +93,8 @@ const validate = (bsConfig) => {

if(!bsConfig.run_settings.cypress_proj_dir) reject(Constants.validationMessages.EMPTY_SPEC_FILES);

if (!fs.existsSync(path.join(process.cwd(), bsConfig.run_settings.cypress_proj_dir, 'cypress.json'))) reject(Constants.validationMessages.EMPTY_CYPRESS_JSON);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also include the path as well in the error message bsConfig.run_settings.cypress_proj_dir?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have also added the Cypress Project Directory in the error message.

suryart
suryart previously approved these changes Jun 15, 2020
suryart
suryart previously approved these changes Jun 15, 2020
@karanshah-browserstack karanshah-browserstack merged commit 99e2205 into browserstack:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants