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

actually do not camel case fx prefs #9944

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

glaszig
Copy link
Contributor

@glaszig glaszig commented Oct 16, 2021

Description

firefox preferences must not be camelized. this was intended in eb2d017 but failed simply due to a type mismatch.

Motivation and Context

i wanted to set intl.accepted_languages but in a firefox instance it ended up as intl.acceptedLanguages and thus having no effect.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

all tests in the scope of my changes are passing. many others don't. i consider them being wip.

before this pr:

bundle exec rspec spec/unit/selenium/webdriver/firefox/options_spec.rb:153
Run options: include {:locations=>{"./spec/unit/selenium/webdriver/firefox/options_spec.rb"=>[153]}}
F

Failures:

  1) Selenium::WebDriver::Firefox::Options#add_preference does not camelize preferences
     Failure/Error: expect(prefs).to eq(expected)

       expected: {"intl.accepted_languages"=>"en-US"}
            got: {"intl.acceptedLanguages"=>"en-US"}

       (compared using ==)

       Diff:
       @@ -1 +1 @@
       -"intl.accepted_languages" => "en-US",
       +"intl.acceptedLanguages" => "en-US",

     # ./spec/unit/selenium/webdriver/firefox/options_spec.rb:158:in `block (3 levels) in <module:Firefox>'

Finished in 0.01195 seconds (files took 0.40692 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/unit/selenium/webdriver/firefox/options_spec.rb:153 # Selenium::WebDriver::Firefox::Options#add_preference does not camelize preferences

@CLAassistant
Copy link

CLAassistant commented Oct 16, 2021

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@titusfortner titusfortner left a comment

Choose a reason for hiding this comment

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

This is what happens when I don't write a test. Thanks for your submission.

@titusfortner titusfortner merged commit 4ac2b4a into SeleniumHQ:trunk Oct 20, 2021
elgatov pushed a commit to elgatov/selenium that referenced this pull request Jun 27, 2022
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