spec/teaspoon_env.rb in quby-5.4.0 vs spec/teaspoon_env.rb in quby-5.5.0
- old
+ new
@@ -46,30 +46,32 @@
config.driver = :selenium
chrome_options = Selenium::WebDriver::Chrome::Options.new(args: ['headless', 'disable-gpu'])
- desired_capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
- chrome_options: chrome_options
- )
+ desired_capabilities = [
+ Selenium::WebDriver::Remote::Capabilities.chrome,
+ chrome_options
+ ]
+
options = if ENV['SELENIUM_HOST'].present?
docker_ip = `hostname -i`.strip
config.server_host = docker_ip
config.server_port = ENV['TEST_APP_PORT']
http_client = Selenium::WebDriver::Remote::Http::Default.new(read_timeout: 20)
{
client_driver: :remote,
selenium_options: {
url: "http://#{ENV['SELENIUM_HOST']}:#{ENV['SELENIUM_PORT']}/wd/hub",
http_client: http_client,
- desired_capabilities: desired_capabilities
+ capabilities: desired_capabilities
}
}
else
{
client_driver: :chrome,
selenium_options: {
- desired_capabilities: desired_capabilities
+ capabilities: desired_capabilities
}
}
end
config.driver_options = options