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
New 'E2E_BROWSER' env var, and README update #5651
New 'E2E_BROWSER' env var, and README update #5651
Conversation
/assign @benjaminapetersen |
@@ -15,6 +15,7 @@ import { | |||
|
|||
const tap = !!process.env.TAP; | |||
|
|||
export const BROWSER_NAME = process.env.E2E_BROWSER ? process.env.E2E_BROWSER : 'chrome'; |
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.
We should prefix this with BRIDGE_
like other environment variables. (In hindsight, we should have done that for JASMINE_TIMEOUT
as well.
We might want to put PROTRACTOR
in the name unless we think we can support this for Cypress as well. cc @dtaylor113
export const BROWSER_NAME = process.env.E2E_BROWSER ? process.env.E2E_BROWSER : 'chrome'; | |
export const BROWSER_NAME = process.env.BRIDGE_E2E_BROWSER_NAME || 'chrome'; |
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.
Ah, clearly a better syntax to do the same. And we want to pick the appropriate name. Let me know and I'll update the commit.
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.
We might want to put
PROTRACTOR
in the name unless we think we can support this for Cypress as well.
The Cypress test runner has a dropdown of all browsers installed on the system, so user can simply select Firefox.
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.
@miyamotoh I'd suggest BRIDGE_PROTRACTOR_BROWSER_NAME
to make it really clear.
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.
Roger that, a force-push coming with the new env var and formatting changes..
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.
Oh, do you want JASMINE_TIMEOUT
to be renamed to BRIDGE_JASMINE_TIMEOUT
in this PR? I can easily do that. Let me know.
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.
Yeah, I think that's a good change.
README.md
Outdated
@@ -185,7 +185,7 @@ Run frontend tests: | |||
|
|||
### Integration Tests | |||
|
|||
Integration tests are run in a headless Chrome driven by [protractor](http://www.protractortest.org/#/). Requirements include Chrome, a working cluster, kubectl, and bridge itself (see building above). | |||
Integration tests are run in a headless browser driven by [protractor](http://www.protractortest.org/#/). Requirements include Chrome or Firefox, a working cluster, kubectl, and bridge itself (see building above). By default, it will look for Chrome in the system and use it, but if you want to use Firefox instead, set `E2E_BROWSER` environment variable in your shell with the value "firefox." |
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.
Better to add line breaks. It makes comments easier in PR reviews.
I'd use backticks in the value avoid any ambiguity with the period and quotation marks.
Integration tests are run in a headless browser driven by [protractor](http://www.protractortest.org/#/). Requirements include Chrome or Firefox, a working cluster, kubectl, and bridge itself (see building above). By default, it will look for Chrome in the system and use it, but if you want to use Firefox instead, set `E2E_BROWSER` environment variable in your shell with the value "firefox." | |
Integration tests are run in a headless browser driven by [protractor](http://www.protractortest.org/#/). Requirements include Chrome or Firefox, a working cluster, kubectl, and bridge itself (see building above). By default, it will look for Chrome in the system and use it, but if you want to use Firefox instead, set `E2E_BROWSER` environment variable in your shell with the value `firefox`. |
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.
Sure, sounds good. Will be in the next push, along with the new env var name.
Signed-off-by: Hiro Miyamoto <miyamotoh@us.ibm.com>
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.
/approve
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: miyamotoh, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Introducing a new env var to allow usage of Firefox in e2e/integration tests. See details in #4311 .
Signed-off-by: Hiro Miyamoto miyamotoh@us.ibm.com