-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[rb] Add guard for beta firefox #16153
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
[rb] Add guard for beta firefox #16153
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
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.
I think rather than trying to figure out which Firefox/Chrome is beta, we can explicitly tell the test it's being run on beta versions - we already know that from Bazel:
Lines 36 to 45 in a11b6d6
"chrome-beta": { | |
"data": chrome_beta_data, | |
"deps": ["//rb/lib/selenium/webdriver:chrome"], | |
"tags": [], | |
"target_compatible_with": [], | |
"env": { | |
"WD_REMOTE_BROWSER": "chrome", | |
"WD_SPEC_DRIVER": "chrome", | |
"WD_BROWSER_VERSION": "beta", | |
} | select({ |
Lines 83 to 91 in a11b6d6
"firefox": { | |
"data": firefox_data, | |
"deps": ["//rb/lib/selenium/webdriver:firefox"], | |
"tags": [], | |
"target_compatible_with": [], | |
"env": { | |
"WD_REMOTE_BROWSER": "firefox", | |
"WD_SPEC_DRIVER": "firefox", | |
} | select({ |
You can see Chrome already has WD_BROWSER_VERSION=beta
. We can add it to firefox-beta
as well, then adapt the guard version
to read from this environment variable:
describe Network, exclude: {version: 'beta'}
@p0deje thank you for the idea! I like that solution way more |
User description
💥 What does this PR do?
This PR uses the environment variable WD_BROWSER_VERSION to be able to guard against beta firefox and beta chrome
🔧 Implementation Notes
I implemented this way to follow the guard structure we have and because I did not wanted to hardcode a version of the browser
🔄 Types of changes
PR Type
Enhancement
Description
Refactored
beta_chrome_version
tobeta_browser_version
supporting FirefoxAdded Firefox beta version fetching from Mozilla API
Updated test guards to use new generic method
Diagram Walkthrough
File Walkthrough
test_environment.rb
Refactor version method to support multiple browsers
rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb
beta_chrome_version
tobeta_browser_version
with browserparameter
manager_spec.rb
Update Firefox beta guard usage
rb/spec/integration/selenium/webdriver/manager_spec.rb
beta_browser_version(:firefox)
method
network_spec.rb
Update Chrome beta guard usage
rb/spec/integration/selenium/webdriver/network_spec.rb
beta_browser_version(:chrome)
method