mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
commit
227031e7b7
3 changed files with 25 additions and 26 deletions
|
@ -20,7 +20,7 @@ class JavaScriptApplicationSystemTestCase < ApplicationSystemTestCase
|
|||
self.use_transactional_fixtures = false
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
|
||||
Capybara.register_driver(:chrome) do |_app|
|
||||
Capybara.register_driver(:chrome) do |app|
|
||||
options = ::Selenium::WebDriver::Chrome::Options.new
|
||||
|
||||
options.add_argument('--headless')
|
||||
|
@ -28,13 +28,10 @@ class JavaScriptApplicationSystemTestCase < ApplicationSystemTestCase
|
|||
options.add_argument('--disable-dev-shm-usage')
|
||||
options.add_argument('--window-size=1400,1400')
|
||||
|
||||
Capybara::Selenium::Driver.new(Rails.application, browser: :chrome, options: options)
|
||||
Capybara::Selenium::Driver.new(app, browser: :chrome, options: options)
|
||||
end
|
||||
|
||||
Capybara.register_server(:silent_puma) do |app, port, _host|
|
||||
require 'rack/handler/puma'
|
||||
Rack::Handler::Puma.run(app, Port: port, Threads: '0:2', Silent: true)
|
||||
end
|
||||
Capybara.server = :puma, { Silent: true }
|
||||
|
||||
def setup
|
||||
DatabaseCleaner.start
|
||||
|
@ -42,7 +39,6 @@ class JavaScriptApplicationSystemTestCase < ApplicationSystemTestCase
|
|||
super
|
||||
|
||||
Capybara.current_driver = :chrome
|
||||
Capybara.server = :silent_puma
|
||||
end
|
||||
|
||||
def teardown
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue