Fixed tests.

This commit is contained in:
Martin Gruner 2021-10-19 10:26:40 +02:00 committed by Dominik Klein
parent f83c48fc00
commit bcc0540f41
2 changed files with 12 additions and 6 deletions

View file

@ -27,7 +27,10 @@ Capybara.register_driver(:zammad_chrome) do |app|
options[:url] = ENV['REMOTE_URL']
end
Capybara::Selenium::Driver.new(app, **options)
Capybara::Selenium::Driver.new(app, **options).tap do |driver|
# Selenium 4 installs a default file_detector which finds wrong files/directories such as zammad/test.
driver.browser.file_detector = nil
end
end
Capybara.register_driver(:zammad_firefox) do |app|
@ -48,5 +51,8 @@ Capybara.register_driver(:zammad_firefox) do |app|
options[:url] = ENV['REMOTE_URL']
end
Capybara::Selenium::Driver.new(app, **options)
Capybara::Selenium::Driver.new(app, **options).tap do |driver|
# Selenium 4 installs a default file_detector which finds wrong files/directories such as zammad/test.
driver.browser.file_detector = nil
end
end

View file

@ -131,10 +131,10 @@ class TestCase < ActiveSupport::TestCase
caps.version = ENV['BROWSER_VERSION']
end
# (ironically) required for timeout checks
# https://github.com/zalando/zalenium/issues/469#issuecomment-371417340
# https://opensource.zalando.com/zalenium/#usage
caps['idleTimeout'] = 300
# # (ironically) required for timeout checks
# # https://github.com/zalando/zalenium/issues/469#issuecomment-371417340
# # https://opensource.zalando.com/zalenium/#usage
# caps['idleTimeout'] = 300
http_client = Selenium::WebDriver::Remote::Http::Default.new(
open_timeout: 120,