diff --git a/spec/support/browsers/chrome.rb b/spec/support/browsers/chrome.rb index 3f494d082c..398d59e02e 100644 --- a/spec/support/browsers/chrome.rb +++ b/spec/support/browsers/chrome.rb @@ -39,7 +39,7 @@ def register_chrome_headless(language, name: :"chrome_headless_#{language}") loggingPrefs: { browser: 'ALL' } ) - yield options, capabilities + yield(options, capabilities) if block_given? client = Selenium::WebDriver::Remote::Http::Default.new client.read_timeout = 180 diff --git a/spec/support/browsers/firefox.rb b/spec/support/browsers/firefox.rb index cab242768c..80c5a32426 100644 --- a/spec/support/browsers/firefox.rb +++ b/spec/support/browsers/firefox.rb @@ -40,7 +40,7 @@ def register_firefox_headless(language, name: :"firefox_headless_#{language}") loggingPrefs: { browser: 'ALL' } ) - yield profile, options, capabilities + yield(profile, options, capabilities) if block_given? unless ActiveRecord::Type::Boolean.new.cast(ENV['OPENPROJECT_TESTING_NO_HEADLESS']) options.args << "--headless"