|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
require 'cucumber/rails' |
|
|
|
|
require "capybara-screenshot/cucumber" |
|
|
|
|
require "capybara/cuprite" |
|
|
|
|
|
|
|
|
|
ActionController::Base.allow_rescue = false |
|
|
|
|
|
|
|
|
@ -13,16 +12,9 @@ end
|
|
|
|
|
|
|
|
|
|
Cucumber::Rails::Database.javascript_strategy = :truncation |
|
|
|
|
|
|
|
|
|
Capybara.register_driver :cuprite do |app| |
|
|
|
|
Capybara::Cuprite::Driver.new(app, headless: true, |
|
|
|
|
js_errors: true, |
|
|
|
|
window_size: [1600, 1200], |
|
|
|
|
timeout: 30, |
|
|
|
|
process_timeout: 60) |
|
|
|
|
end |
|
|
|
|
Capybara.javascript_driver = :cuprite |
|
|
|
|
Capybara.javascript_driver = :headless |
|
|
|
|
|
|
|
|
|
Capybara::Screenshot.register_driver(:cuprite) do |driver, path| |
|
|
|
|
Capybara::Screenshot.register_driver(:headless) do |driver, path| |
|
|
|
|
driver.render(path, full: true) |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|