-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix: accept standard browserstack environment variables #3148
Conversation
BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY are the env variables specified in docs, check for these. Also accept buildName, local if sent inside 'bstack:options'
Thanks @Ankit098 for raising this PR, can you fix the lint issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anything mentioned in nightwatch config as ${ENV_VARIABLE}
is replaced by process.env.ENV_VARIABLE
so we don't need to change the variable names in config.
@@ -41,19 +44,26 @@ class Browserstack extends Selenium { | |||
this.settings.webdriver.start_process = false; | |||
this.settings.webdriver.port = Number(this.settings.webdriver.port); | |||
|
|||
const {desiredCapabilities} = this.settings; | |||
//checking for legacy-ways for providing config | |||
this.bstackOptions = Object.assign({}, {userName: desiredCapabilities['browserstack.user'], accessKey: desiredCapabilities['browserstack.key'], buildName: desiredCapabilities.build, local: desiredCapabilities['browserstack.local']}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you format this properly? we don't have lines this long anywhere in the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
BROWSERSTACK_USERNAME and BROWSERSTACK_ACCESS_KEY are the env variables specified in docs, check for these. Also accept buildName, local if sent inside 'bstack:options'
Added an issue here: #3149
Thanks in advance for your contribution. Please follow the below steps in submitting a pull request, as it will help us with reviewing it quicker.
features/my-new-feature
orissue/123-my-bugfix
);