capybara_helper.rb 620 B

1234567891011121314151617181920212223242526
  1. require 'rails_helper'
  2. require 'capybara/rails'
  3. require 'capybara-select-2'
  4. CAPYBARA_TIMEOUT = ENV['CI'] == 'true' ? 60 : 5
  5. Capybara.javascript_driver = ENV['USE_HEADED_CHROME'] ? :selenium_chrome : :selenium_chrome_headless
  6. Capybara.default_max_wait_time = CAPYBARA_TIMEOUT
  7. RSpec.configure do |config|
  8. config.include Warden::Test::Helpers
  9. config.include AlertConfirmer, type: :feature
  10. config.include FeatureHelpers, type: :feature
  11. config.before(:suite) do
  12. Warden.test_mode!
  13. end
  14. config.after(:each) do
  15. Warden.test_reset!
  16. end
  17. end
  18. VCR.configure do |config|
  19. config.ignore_localhost = true
  20. end