]> git.openstreetmap.org Git - rails.git/commitdiff
Add option to override Firefox binary used in system tests
authorAnton Khorev <tony29@yandex.ru>
Fri, 14 Feb 2025 17:09:05 +0000 (20:09 +0300)
committerAnton Khorev <tony29@yandex.ru>
Sat, 15 Feb 2025 15:46:12 +0000 (18:46 +0300)
config/settings/test.yml
test/application_system_test_case.rb
test/teaspoon_env.rb

index b0e2f461392cce37eb7221ad9f72e0601f7a361c..b7cffcc27b33df6ef361155d832cbc265a1f30a2 100644 (file)
@@ -53,3 +53,5 @@ doorkeeper_signing_key: |
   cK1+/2V+OkM/0nXjxPwPj7LiOediUyZNUn48r29uGOL1S83PSUdyST207CP6mZjc
   K8aJmnGsVEAcWPzbpNh14q/c
   -----END PRIVATE KEY-----
   cK1+/2V+OkM/0nXjxPwPj7LiOediUyZNUn48r29uGOL1S83PSUdyST207CP6mZjc
   K8aJmnGsVEAcWPzbpNh14q/c
   -----END PRIVATE KEY-----
+# Override Firefox binary used in system tests
+#system_test_firefox_binary:
index 0ddb8a87ad73f91606df90af224df851c9919c06..496f37c16be4be820d16dfb753ab1bed77c8cd2a 100644 (file)
@@ -9,6 +9,7 @@ end
 class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
   driven_by :selenium, :using => :headless_firefox do |options|
     options.add_preference("intl.accept_languages", "en")
 class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
   driven_by :selenium, :using => :headless_firefox do |options|
     options.add_preference("intl.accept_languages", "en")
+    options.binary = Settings.system_test_firefox_binary if Settings.system_test_firefox_binary
   end
 
   def before_setup
   end
 
   def before_setup
index 8a9dc001f3150b43cb9c671a724ffec855779198..c14045b1c0179b929f556c4c87fa615db71e16a8 100644 (file)
@@ -100,10 +100,12 @@ Teaspoon.configure do |config|
   # Capybara Webkit: https://github.com/jejacks0n/teaspoon/wiki/Using-Capybara-Webkit
   require "selenium-webdriver"
   config.driver = :selenium
   # 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.binary = Settings.system_test_firefox_binary if Settings.system_test_firefox_binary
   config.driver_options = {
     :client_driver => :firefox,
     :selenium_options => {
   config.driver_options = {
     :client_driver => :firefox,
     :selenium_options => {
-      :options => Selenium::WebDriver::Firefox::Options.new(:args => ["-headless"])
+      :options => firefox_options
     }
   }
 
     }
   }