Skip to content

Commit aef3785

Browse files
authored
Merge branch 'trunk' into stop_driver
2 parents a2cdce8 + 827efd4 commit aef3785

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

rb/lib/selenium/webdriver/common/options.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def safari(**opts)
5252
end
5353

5454
def set_capabilities
55-
(W3C_OPTIONS + self::CAPABILITIES.keys).each do |key|
55+
(W3C_OPTIONS + GRID_OPTIONS + self::CAPABILITIES.keys).each do |key|
5656
next if method_defined? key
5757

5858
define_method key do

rb/lib/selenium/webdriver/support/guards.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def initialize(example, bug_tracker: '', conditions: nil)
4040
def add_condition(name, condition = false, &block)
4141
condition = false if condition.nil?
4242
@guard_conditions << GuardCondition.new(name, condition, &block)
43-
WebDriver.logger.info "Running with Guard '#{name}' set to: #{condition}"
43+
WebDriver.logger.debug "Running with Guard '#{name}' set to: #{condition}"
4444
end
4545

4646
def add_message(name, message)

rb/spec/unit/selenium/webdriver/common/print_options_spec.rb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,40 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919

20-
2120
require File.expand_path('../spec_helper', __dir__)
2221
require 'selenium/webdriver/common/print_options'
2322

24-
2523
module Selenium
2624
module WebDriver
2725
describe PrintOptions do
28-
let(:options) { PrintOptions.new }
26+
let(:options) { described_class.new }
2927

3028
it 'has default values' do
3129
expect(options.orientation).to eq('portrait')
3230
expect(options.scale).to eq(1.0)
3331
expect(options.background).to be(false)
34-
expect(options.page_size).to eq({ width: 21.0, height: 29.7 })
35-
expect(options.margins).to eq({ top: 1.0, bottom: 1.0, left: 1.0, right: 1.0 })
32+
expect(options.page_size).to eq({width: 21.0, height: 29.7})
33+
expect(options.margins).to eq({top: 1.0, bottom: 1.0, left: 1.0, right: 1.0})
3634
end
3735

3836
it 'can set custom page size' do
39-
custom_size = { width: 25.0, height: 30.0 }
37+
custom_size = {width: 25.0, height: 30.0}
4038
options.page_size = custom_size
4139
expect(options.page_size).to eq(custom_size)
4240
end
4341

4442
it 'can set predefined page sizes using symbols' do
4543
options.page_size = :a4
46-
expect(options.page_size).to eq({ width: 21.0, height: 29.7 })
44+
expect(options.page_size).to eq({width: 21.0, height: 29.7})
4745

4846
options.page_size = :legal
49-
expect(options.page_size).to eq({ width: 21.59, height: 35.56 })
47+
expect(options.page_size).to eq({width: 21.59, height: 35.56})
5048

5149
options.page_size = :tabloid
52-
expect(options.page_size).to eq({ width: 27.94, height: 43.18 })
50+
expect(options.page_size).to eq({width: 27.94, height: 43.18})
5351

5452
options.page_size = :letter
55-
expect(options.page_size).to eq({ width: 21.59, height: 27.94 })
53+
expect(options.page_size).to eq({width: 21.59, height: 27.94})
5654
end
5755

5856
it 'raises an error for unsupported predefined page size symbols' do

0 commit comments

Comments
 (0)