Add option to override Firefox binary used in system tests
This commit is contained in:
parent
5047ec403d
commit
b58a70262e
3 changed files with 6 additions and 1 deletions
|
@ -53,3 +53,5 @@ doorkeeper_signing_key: |
|
||||||
cK1+/2V+OkM/0nXjxPwPj7LiOediUyZNUn48r29uGOL1S83PSUdyST207CP6mZjc
|
cK1+/2V+OkM/0nXjxPwPj7LiOediUyZNUn48r29uGOL1S83PSUdyST207CP6mZjc
|
||||||
K8aJmnGsVEAcWPzbpNh14q/c
|
K8aJmnGsVEAcWPzbpNh14q/c
|
||||||
-----END PRIVATE KEY-----
|
-----END PRIVATE KEY-----
|
||||||
|
# Override Firefox binary used in system tests
|
||||||
|
#system_test_firefox_binary:
|
||||||
|
|
|
@ -9,6 +9,7 @@ end
|
||||||
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
||||||
driven_by :selenium, :using => :headless_firefox do |options|
|
driven_by :selenium, :using => :headless_firefox do |options|
|
||||||
options.add_preference("intl.accept_languages", "en")
|
options.add_preference("intl.accept_languages", "en")
|
||||||
|
options.binary = Settings.system_test_firefox_binary if Settings.system_test_firefox_binary
|
||||||
end
|
end
|
||||||
|
|
||||||
def before_setup
|
def before_setup
|
||||||
|
|
|
@ -100,10 +100,12 @@ Teaspoon.configure do |config|
|
||||||
# Capybara Webkit: https://github.com/jejacks0n/teaspoon/wiki/Using-Capybara-Webkit
|
# Capybara Webkit: https://github.com/jejacks0n/teaspoon/wiki/Using-Capybara-Webkit
|
||||||
require "selenium-webdriver"
|
require "selenium-webdriver"
|
||||||
config.driver = :selenium
|
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 = {
|
config.driver_options = {
|
||||||
:client_driver => :firefox,
|
:client_driver => :firefox,
|
||||||
:selenium_options => {
|
:selenium_options => {
|
||||||
:options => Selenium::WebDriver::Firefox::Options.new(:args => ["-headless"])
|
:options => firefox_options
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue