Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix blocks in chrome registration

Oliver Günthere2abef5ff865
diff --git a/spec/support/browsers/chrome.rb b/spec/support/browsers/chrome.rb
index 3f494d082cd..398d59e02e3 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 cab242768c4..80c5a324264 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"