Skip to content

Commit abe368d

Browse files
committed
Guard some specs
1 parent 0f49baa commit abe368d

File tree

5 files changed

+16
-12
lines changed

5 files changed

+16
-12
lines changed

rb/spec/integration/selenium/webdriver/driver_spec.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
module Selenium
2323
module WebDriver
2424
describe Driver, exclusive: {bidi: false, reason: 'Not yet implemented with BiDi'} do
25-
it_behaves_like 'driver that can be started concurrently', exclude: {browser: %i[safari safari_preview]}
25+
it_behaves_like 'driver that can be started concurrently',
26+
exclude: {browser: %i[safari safari_preview]},
27+
except: {driver: 'remote', rbe: true, reason: 'Cannot start 2+ drivers at once.'}
2628

2729
it 'creates default capabilities', exclude: {browser: %i[safari safari_preview]} do
2830
reset_driver! do |driver|

rb/spec/integration/selenium/webdriver/firefox/profile_spec.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ module Firefox
3636
end
3737
end
3838

39-
it 'is able to use the same profile more than once' do
39+
it 'is able to use the same profile more than once',
40+
except: {driver: 'remote', rbe: true, reason: 'Cannot start 2+ drivers at once.'} do
4041
reset_driver!(profile: profile) do |driver1|
4142
expect { wait(5).until { driver1.find_element(id: 'oneline') } }.not_to raise_error
4243
reset_driver!(profile: profile) do |driver2|

rb/spec/integration/selenium/webdriver/spec_helper.rb

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
guards.add_condition(:platform, WebDriver::Platform.os)
5858
guards.add_condition(:headless, !ENV['HEADLESS'].nil?)
5959
guards.add_condition(:bidi, !ENV['WEBDRIVER_BIDI'].nil?)
60+
guards.add_condition(:rbe, Dir.pwd.start_with?('/mnt/engflow'))
6061

6162
results = guards.disposition
6263
send(*results) if results

rb/spec/integration/selenium/webdriver/spec_support/shared_examples/concurrent_driver.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
create_driver!
3131
end
3232

33-
fit 'starts multiple drivers sequentially', guard do
33+
it 'starts multiple drivers sequentially', guard do
3434
expected_count = WebDriver::Platform.ci ? 2 : 4
3535
expected_count.times do
3636
thread = Thread.new do

rb/spec/integration/selenium/webdriver/spec_support/test_environment.rb

+9-9
Original file line numberDiff line numberDiff line change
@@ -88,15 +88,15 @@ def app_server
8888
end
8989

9090
def remote_server
91-
if ENV.key?('CHROMEDRIVER_BINARY')
92-
args = ["-Dwebdriver.chrome.driver=#{ENV['CHROMEDRIVER_BINARY']}"]
93-
elsif ENV.key?('MSEDGEDRIVER_BINARY')
94-
args = ["-Dwebdriver.edge.driver=#{ENV['MSEDGEDRIVER_BINARY']}"]
95-
elsif ENV.key?('GECKODRIVER_BINARY')
96-
args = ["-Dwebdriver.gecko.driver=#{ENV['GECKODRIVER_BINARY']}"]
97-
else
98-
args = %w[--selenium-manager true --enable-managed-downloads true]
99-
end
91+
args = if ENV.key?('CHROMEDRIVER_BINARY')
92+
["-Dwebdriver.chrome.driver=#{ENV['CHROMEDRIVER_BINARY']}"]
93+
elsif ENV.key?('MSEDGEDRIVER_BINARY')
94+
["-Dwebdriver.edge.driver=#{ENV['MSEDGEDRIVER_BINARY']}"]
95+
elsif ENV.key?('GECKODRIVER_BINARY')
96+
["-Dwebdriver.gecko.driver=#{ENV['GECKODRIVER_BINARY']}"]
97+
else
98+
%w[--selenium-manager true --enable-managed-downloads true]
99+
end
100100

101101
@remote_server ||= Selenium::Server.new(
102102
remote_server_jar,

0 commit comments

Comments
 (0)