mirror of
https://github.com/mastodon/mastodon.git
synced 2024-12-22 09:08:24 +00:00
Disable Chrome's search engine selection screen when running system specs (#31437)
This commit is contained in:
parent
4545b8d6cb
commit
5d04e29775
|
@ -6,14 +6,20 @@ Capybara.app_host = "http://#{Capybara.server_host}:#{Capybara.server_port}"
|
|||
|
||||
require 'selenium/webdriver'
|
||||
|
||||
def common_chrome_options
|
||||
options = Selenium::WebDriver::Chrome::Options.new
|
||||
options.add_argument '--window-size=1680,1050'
|
||||
options.add_argument '--disable-search-engine-choice-screen'
|
||||
options
|
||||
end
|
||||
|
||||
Capybara.register_driver :chrome do |app|
|
||||
Capybara::Selenium::Driver.new(app, browser: :chrome)
|
||||
Capybara::Selenium::Driver.new(app, browser: :chrome, options: common_chrome_options)
|
||||
end
|
||||
|
||||
Capybara.register_driver :headless_chrome do |app|
|
||||
options = Selenium::WebDriver::Chrome::Options.new
|
||||
options = common_chrome_options
|
||||
options.add_argument '--headless=new'
|
||||
options.add_argument '--window-size=1680,1050'
|
||||
|
||||
Capybara::Selenium::Driver.new(
|
||||
app,
|
||||
|
|
Loading…
Reference in a new issue