Skip to content

Commit 6f246c2

Browse files
committed
[rb] add guards to tests
1 parent c2a1216 commit 6f246c2

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

rb/spec/integration/selenium/webdriver/action_builder_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ module WebDriver
172172
.pointer_down(:left).pointer_up(:left)
173173
.perform
174174
expect(element.attribute(:value)).to eq('DoubleClicked')
175+
ensure
176+
# https://issues.chromium.org/issues/400087471
177+
reset_driver! if GlobalTestEnv.browser == :chrome && GlobalTestEnv.rbe?
175178
end
176179
end
177180

@@ -317,7 +320,8 @@ module WebDriver
317320
end
318321

319322
describe '#scroll_by' do
320-
it 'scrolls by given amount', except: {browser: :firefox, reason: 'returns false on firefox'} do
323+
it 'scrolls by given amount',
324+
exclude: {driver: :firefox, reason: 'inconsistent behavior between versions'} do
321325
driver.navigate.to url_for('scrolling_tests/frame_with_nested_scrolling_frame_out_of_view.html')
322326
footer = driver.find_element(tag_name: 'footer')
323327
delta_y = footer.rect.y.round

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module WebDriver
2424
describe Driver, exclusive: {bidi: false, reason: 'Not yet implemented with BiDi'} do
2525
it_behaves_like 'driver that can be started concurrently', exclude: [
2626
{browser: %i[safari safari_preview]},
27+
{browser: :firefox, rbe: true, reason: 'https://github.com/mozilla/geckodriver/issues/2219'},
2728
{driver: :remote, rbe: true, reason: 'Cannot start 2+ drivers at once.'}
2829
]
2930

rb/spec/integration/selenium/webdriver/target_locator_spec.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ module WebDriver
8989
expect {
9090
driver.switch_to.new_window(:unknown)
9191
}.to raise_error(ArgumentError)
92+
ensure
93+
# https://issues.chromium.org/issues/400087471
94+
reset_driver! if GlobalTestEnv.browser == :chrome && GlobalTestEnv.rbe?
9295
end
9396

9497
it 'switches to the new window then close it when given a block' do

0 commit comments

Comments
 (0)