1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Update rubocop

This commit is contained in:
Thomas Walpole 2021-03-27 12:11:45 -07:00
parent 5d0284c0bf
commit d8ceecb4cd
3 changed files with 3 additions and 4 deletions

View file

@ -314,7 +314,7 @@ module Capybara
begin begin
find(:datalist_input, from, **options) find(:datalist_input, from, **options)
rescue Capybara::ElementNotFound => dlinput_error # rubocop:disable Naming/RescuedExceptionsVariableName rescue Capybara::ElementNotFound => dlinput_error
raise Capybara::ElementNotFound, "#{select_error.message} and #{dlinput_error.message}" raise Capybara::ElementNotFound, "#{select_error.message} and #{dlinput_error.message}"
end end
end end

View file

@ -69,7 +69,7 @@ module Capybara
def valid_value?(value) def valid_value?(value)
return true unless @options.key?(:valid_values) return true unless @options.key?(:valid_values)
Array(@options[:valid_values]).any? { |valid| valid === value } # rubocop:disable Style/CaseEquality,Performance/RedundantEqualityComparisonBlock Array(@options[:valid_values]).any? { |valid| valid === value } # rubocop:disable Style/CaseEquality
end end
end end
end end

View file

@ -293,7 +293,7 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
end end
def invalid_element_errors def invalid_element_errors
@invalid_element_errors ||= begin @invalid_element_errors ||=
[ [
::Selenium::WebDriver::Error::StaleElementReferenceError, ::Selenium::WebDriver::Error::StaleElementReferenceError,
::Selenium::WebDriver::Error::ElementNotInteractableError, ::Selenium::WebDriver::Error::ElementNotInteractableError,
@ -314,7 +314,6 @@ class Capybara::Selenium::Driver < Capybara::Driver::Base
end end
end end
end end
end
def no_such_window_error def no_such_window_error
Selenium::WebDriver::Error::NoSuchWindowError Selenium::WebDriver::Error::NoSuchWindowError