Skip to content

Commit

Permalink
Guard some specs
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed Jun 22, 2024
1 parent 0f49baa commit 5244527
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
4 changes: 3 additions & 1 deletion rb/spec/integration/selenium/webdriver/driver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
module Selenium
module WebDriver
describe Driver, exclusive: {bidi: false, reason: 'Not yet implemented with BiDi'} do
it_behaves_like 'driver that can be started concurrently', exclude: {browser: %i[safari safari_preview]}
it_behaves_like 'driver that can be started concurrently',
exclude: {browser: %i[safari safari_preview]},
except: {rbe: true, reason: 'Cannot start 2+ drivers at once.'}

it 'creates default capabilities', exclude: {browser: %i[safari safari_preview]} do
reset_driver! do |driver|
Expand Down
1 change: 1 addition & 0 deletions rb/spec/integration/selenium/webdriver/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
guards.add_condition(:platform, WebDriver::Platform.os)
guards.add_condition(:headless, !ENV['HEADLESS'].nil?)
guards.add_condition(:bidi, !ENV['WEBDRIVER_BIDI'].nil?)
guards.add_condition(:rbe, Dir.pwd.start_with?('/mnt/engflow'))

results = guards.disposition
send(*results) if results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
create_driver!
end

fit 'starts multiple drivers sequentially', guard do
it 'starts multiple drivers sequentially', guard do
expected_count = WebDriver::Platform.ci ? 2 : 4
expected_count.times do
thread = Thread.new do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ def app_server
end

def remote_server
if ENV.key?('CHROMEDRIVER_BINARY')
args = ["-Dwebdriver.chrome.driver=#{ENV['CHROMEDRIVER_BINARY']}"]
elsif ENV.key?('MSEDGEDRIVER_BINARY')
args = ["-Dwebdriver.edge.driver=#{ENV['MSEDGEDRIVER_BINARY']}"]
elsif ENV.key?('GECKODRIVER_BINARY')
args = ["-Dwebdriver.gecko.driver=#{ENV['GECKODRIVER_BINARY']}"]
else
args = %w[--selenium-manager true --enable-managed-downloads true]
end
args = if ENV.key?('CHROMEDRIVER_BINARY')
["-Dwebdriver.chrome.driver=#{ENV['CHROMEDRIVER_BINARY']}"]
elsif ENV.key?('MSEDGEDRIVER_BINARY')
["-Dwebdriver.edge.driver=#{ENV['MSEDGEDRIVER_BINARY']}"]
elsif ENV.key?('GECKODRIVER_BINARY')
["-Dwebdriver.gecko.driver=#{ENV['GECKODRIVER_BINARY']}"]
else
%w[--selenium-manager true --enable-managed-downloads true]
end

@remote_server ||= Selenium::Server.new(
remote_server_jar,
Expand Down

0 comments on commit 5244527

Please sign in to comment.