Initial commit
This commit is contained in:
15
spec/support/capybara.rb
Normal file
15
spec/support/capybara.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
require 'capybara/rspec'
|
||||
require 'capybara/rails'
|
||||
|
||||
Capybara.register_driver :selenium_chrome_headless_no_local_storage do |app|
|
||||
Capybara::Selenium::Driver.load_selenium
|
||||
browser_options = ::Selenium::WebDriver::Chrome::Options.new
|
||||
browser_options.args << '--headless'
|
||||
browser_options.args << '--disable-gpu' if Gem.win_platform?
|
||||
Capybara::Selenium::Driver.new(app, browser: :chrome, options: browser_options, clear_local_storage: true, clear_session_storage: true)
|
||||
end
|
||||
|
||||
#Capybara.javascript_driver = :selenium_chrome
|
||||
Capybara.javascript_driver = :selenium_chrome_headless_no_local_storage
|
||||
|
||||
Capybara.server_port = AppHost.new.port
|
||||
Reference in New Issue
Block a user