Skip to content

Commit

Permalink
Update Ruby tests for Chrome v74
Browse files Browse the repository at this point in the history
  • Loading branch information
p0deje committed May 6, 2019
1 parent d657c07 commit 6de54b0
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions rb/spec/integration/selenium/webdriver/element_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,14 @@ module WebDriver
driver.find_element(id: 'imageButton').click
end

it 'should raise wrong error if different element receives click in Chrome', only: {browser: %i[chrome]} do
driver.navigate.to url_for('click_tests/overlapping_elements.html')
element_error = 'Other element would receive the click: <div id="over"><\/div>'
error = /is not clickable at point \(\d+, \d+\)\. #{element_error}/
expect { driver.find_element(id: 'contents').click }
.to raise_error(Selenium::WebDriver::Error::UnknownError, error)
end

# Safari returns "click intercepted" error instead of "element click intercepted"
it 'should raise if different element receives click', except: {browser: %i[chrome safari safari_preview]} do
it 'should raise if different element receives click', except: {browser: %i[safari safari_preview]} do
driver.navigate.to url_for('click_tests/overlapping_elements.html')
expect { driver.find_element(id: 'contents').click }.to raise_error(Error::ElementClickInterceptedError)
end

# Safari returns "click intercepted" error instead of "element click intercepted"
it 'should raise if element is partially covered', except: {browser: %i[chrome safari safari_preview]} do
it 'should raise if element is partially covered', except: {browser: %i[safari safari_preview]} do
driver.navigate.to url_for('click_tests/overlapping_elements.html')
expect { driver.find_element(id: 'other_contents').click }.to raise_error(Error::ElementClickInterceptedError)
end
Expand Down

0 comments on commit 6de54b0

Please sign in to comment.