Skip to content
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

error shown if username or password not given #118

Merged
merged 7 commits into from
Mar 12, 2021
Merged

Conversation

roshan04
Copy link
Contributor

@roshan04 roshan04 commented Mar 2, 2021

If user enters empty password or username then error is thrown during validation

@@ -132,6 +132,14 @@ const validate = (bsConfig, args) => {
// if parallels specified via arguments validate only arguments
if (!Utils.isUndefined(args) && !Utils.isUndefined(args.parallels) && !Utils.isParallelValid(args.parallels)) reject(Constants.validationMessages.INVALID_PARALLELS_CONFIGURATION);

if(!Utils.isUndefined(args)){
if(!Utils.isUndefined(args.username) && !Utils.isUndefined(args.key))
Copy link
Collaborator

Choose a reason for hiding this comment

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

What if I don't provide "" in args and set it in browserstack.json. Please consider that case too.
Also, can you move this validation a bit up? where we already have validation for username and password? https://github.com/browserstack/browserstack-cypress-cli/pull/118/files#diff-26dee8fe62c5e891965d2de49dd74bd0fad786ae2544889d5519d222a6145256R119

bin/helpers/zipUpload.js Outdated Show resolved Hide resolved
@prateekbstack
Copy link
Collaborator

LGTM

@suryart suryart merged commit dccfce9 into master Mar 12, 2021
@suryart suryart deleted the zip_upload_failed branch March 12, 2021 15:39
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.

None yet

4 participants