Capybara: fixed screenshot in system cases

This commit is contained in:
Colin Darie 2018-07-05 12:26:00 +02:00
parent 837f48ff81
commit fac8d88d38
No known key found for this signature in database
GPG Key ID: 4FB865FDBCA4BCC4
2 changed files with 2 additions and 1 deletions

View File

@ -4,7 +4,7 @@ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :headless_chrome
def teardown
Capybara.reset_sessions!
Warden.test_reset!
super
end
end

View File

@ -42,6 +42,7 @@ Capybara.register_driver :headless_chrome do |app|
end
Capybara.save_path = Rails.root.join("tmp/capybara")
Capybara.javascript_driver = :headless_chrome
Capybara.default_driver = :headless_chrome
# Disable Open4 real system calls
require "open4"