Remove references to non-W3C mode from testing code - it's obsolete and hasn't actually been tested in a while

This commit is contained in:
Thomas Walpole 2021-01-29 18:20:42 -08:00
parent 2c4538823d
commit 55df73c1d0
4 changed files with 1 additions and 16 deletions

View File

@ -12,7 +12,7 @@ Selenium::WebDriver::Chrome.path = '/usr/bin/google-chrome-beta' if ENV['CI'] &&
browser_options = ::Selenium::WebDriver::Chrome::Options.new
browser_options.headless! if ENV['HEADLESS']
browser_options.add_option(:w3c, ENV['W3C'] != 'false')
# Chromedriver 77 requires setting this for headless mode on linux
# Different versions of Chrome/selenium-webdriver require setting differently - jus set them all
browser_options.add_preference('download.default_directory', Capybara.save_path)
@ -87,8 +87,6 @@ Capybara::SpecHelper.run_specs TestSessions::Chrome, CHROME_DRIVER.to_s, capybar
pending "Chrome headless doesn't support maximize" if ENV['HEADLESS']
when /Capybara::Window#fullscreen should be able to fullscreen the window/
skip 'Chromedriver hangs on attempts to fullscreen in headless mode' if ENV['HEADLESS']
when /node #right_click delay should delay the mouse up/
skip "Legacy selenium doesn't support separate right button down/up" if ENV['W3C'] == 'false'
end
end
@ -185,10 +183,7 @@ RSpec.describe 'Capybara::Session with chrome' do
end
describe 'log access' do
before { skip 'Only makes sense in W3C mode' if ENV['W3C'] == 'false' }
it 'does not error getting log types' do
skip if Gem::Requirement.new('< 75.0.3770.90').satisfied_by? chromedriver_version
expect do
session.driver.browser.manage.logs.available_types
end.not_to raise_error

View File

@ -62,8 +62,6 @@ Capybara::SpecHelper.run_specs TestSessions::Chrome, CHROME_REMOTE_DRIVER.to_s,
'Capybara::Session selenium_chrome_remote #attach_file with multipart form should fire change once for each set of files uploaded',
'Capybara::Session selenium_chrome_remote #attach_file with multipart form should fire change once when uploading multiple files from empty'
pending "Selenium with Remote Chrome doesn't support multiple file upload" unless selenium_gte?(3.14)
when /node #right_click delay should delay the mouse up/
skip "Legacy selenium doesn't support separate right button down/up" if ENV['W3C'] == 'false'
end
end
@ -78,10 +76,7 @@ RSpec.describe 'Capybara::Session with remote Chrome' do
end
describe 'log access' do
before { skip 'Only makes sense in W3C mode' if ENV['W3C'] == 'false' }
it 'does not error when getting log types' do
skip unless Gem::Requirement.new('>= 75.0.3770.90').satisfied_by? chromedriver_version
expect do
session.driver.browser.manage.logs.available_types
end.not_to raise_error

View File

@ -16,7 +16,6 @@ end.driver_path = '/Applications/Safari Technology Preview.app/Contents/MacOS/sa
browser_options = ::Selenium::WebDriver::Safari::Options.new
# browser_options.headless! if ENV['HEADLESS']
# browser_options.add_option(:w3c, !!ENV['W3C'])
Capybara.register_driver :selenium_safari do |app|
Capybara::Selenium::Driver.new(app, browser: :safari, options: browser_options, timeout: 30).tap do |driver|

View File

@ -61,8 +61,6 @@ RSpec.shared_examples 'Capybara::Node' do |session, _mode|
end
it 'will use native displayed if told to' do
pending "Chromedriver < 76.0.3809.25 doesn't support native displayed in W3C mode" if chrome_lt?(76, session) && (ENV['W3C'] != 'false')
session.driver.options[:native_displayed] = true
session.visit('/form')
session.find(:css, '#address1_city', visible: true)
@ -71,8 +69,6 @@ RSpec.shared_examples 'Capybara::Node' do |session, _mode|
end
it "won't use native displayed if told not to" do
skip 'Non-W3C uses native' if chrome?(session) && (ENV['W3C'] == 'false')
session.driver.options[:native_displayed] = false
session.visit('/form')
session.find(:css, '#address1_city', visible: true)