]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/5684'
authorTom Hughes <tom@compton.nu>
Sun, 16 Feb 2025 08:34:14 +0000 (08:34 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 16 Feb 2025 08:34:14 +0000 (08:34 +0000)
config/settings/test.yml
test/application_system_test_case.rb
test/teaspoon_env.rb

index b7cffcc27b33df6ef361155d832cbc265a1f30a2..3cf8c2836284c5b29fd03251753ea5f25aa3b2aa 100644 (file)
@@ -53,5 +53,7 @@ doorkeeper_signing_key: |
   cK1+/2V+OkM/0nXjxPwPj7LiOediUyZNUn48r29uGOL1S83PSUdyST207CP6mZjc
   K8aJmnGsVEAcWPzbpNh14q/c
   -----END PRIVATE KEY-----
+# Run system tests using headless Firefox
+system_test_headless: true
 # Override Firefox binary used in system tests
 #system_test_firefox_binary:
index 852f270b6ef713571339a1ada651a4c3ed219826..f2fcadfd7c582efedfdcd60df7ee0947b896db4b 100644 (file)
@@ -7,7 +7,7 @@ ActiveSupport.on_load(:action_dispatch_system_test_case) do
 end
 
 class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
-  driven_by :selenium, :using => :headless_firefox do |options|
+  driven_by :selenium, :using => Settings.system_test_headless ? :headless_firefox : :firefox do |options|
     options.add_preference("intl.accept_languages", "en")
     options.binary = Settings.system_test_firefox_binary if Settings.system_test_firefox_binary
   end
index c14045b1c0179b929f556c4c87fa615db71e16a8..a64274c0a6fa5a5c79008af8393c187f73cc1397 100644 (file)
@@ -100,7 +100,8 @@ Teaspoon.configure do |config|
   # Capybara Webkit: https://github.com/jejacks0n/teaspoon/wiki/Using-Capybara-Webkit
   require "selenium-webdriver"
   config.driver = :selenium
-  firefox_options = Selenium::WebDriver::Firefox::Options.new(:args => ["-headless"])
+  firefox_options = Selenium::WebDriver::Firefox::Options.new
+  firefox_options.args = ["-headless"] if Settings.system_test_headless
   firefox_options.binary = Settings.system_test_firefox_binary if Settings.system_test_firefox_binary
   config.driver_options = {
     :client_driver => :firefox,