Add option to override Firefox binary used in system tests

This commit is contained in:
Anton Khorev 2025-02-14 20:09:05 +03:00
parent 5047ec403d
commit b58a70262e
3 changed files with 6 additions and 1 deletions

View 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")
options.binary = Settings.system_test_firefox_binary if Settings.system_test_firefox_binary
end
def before_setup

View 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
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 => {
:options => Selenium::WebDriver::Firefox::Options.new(:args => ["-headless"])
:options => firefox_options
}
}