Skip to content

Commit

Permalink
[rb] minor updates to specs and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Jul 8, 2019
1 parent 45ce2ef commit 415371e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 20 deletions.
2 changes: 1 addition & 1 deletion rb/lib/selenium/webdriver/chrome/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Options < WebDriver::Options
# options = Selenium::WebDriver::Chrome::Options.new(args: ['start-maximized', 'user-data-dir=/tmp/temp_profile'])
# driver = Selenium::WebDriver.for(:chrome, options: options)
#
# @param [Profile] :profile An instance of a Firefox::Profile Class
# @param [Profile] :profile An instance of a Chrome::Profile Class
# @param [Array] :encoded_extensions List of extensions that do not need to be Base64 encoded
# @param [Hash] opts the pre-defined options to create the Chrome::Options with
# @option opts [Array<String>] :args List of command-line arguments to use when starting Chrome
Expand Down
17 changes: 0 additions & 17 deletions rb/spec/integration/selenium/webdriver/edge_chrome/profile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,6 @@ module EdgeChrome
describe Profile do
let(:profile) { Profile.new }

it 'can be manually verified without mocks', only: {driver: :edge_chrome} do
# Example for command line in mac to create a new data directory
# /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/path/to/data
# directory = File.expand_path('../', __FILE__)
# profile = Profile.new(directory)
profile = Profile.new
profile['browser.show_home_button'] = true
file = File.expand_path('sample.crx', __dir__)
profile.add_extension(file)

create_driver!(profile: profile) do |driver|
driver.navigate.to url_for('xhtmlTest.html')
expect('verify manually - home button displayed') # rubocop:disable RSpec/ExpectActual,RSpec/VoidExpect
expect('verify manually - make page red extension properly installed') # rubocop:disable RSpec/ExpectActual,RSpec/VoidExpect
end
end

it 'adds an extension' do
ext_path = '/some/path.crx'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ def read_generated_prefs(from = nil)

describe 'with browser' do
before do
quit_driver
sleep 2
profile['browser.startup.homepage'] = url_for('simpleTest.html')
profile['browser.startup.page'] = 1
end
Expand Down
4 changes: 2 additions & 2 deletions rb/spec/unit/selenium/webdriver/firefox/binary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ module Selenium
module WebDriver
module Firefox
describe Binary do
describe ".path" do
context "when could't find binary file" do
describe '.path' do
context 'when can not find binary file' do
it 'raises Selenium::WebDriver::Error::WebDriverError' do
expect(File).to receive(:file?).and_return(false)

Expand Down

0 comments on commit 415371e

Please sign in to comment.