OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/spec/support/selenium_fallback.rb

21 lines
528 B

Capybara.register_driver :selenium do |app|
require 'selenium/webdriver'
Selenium::WebDriver::Firefox::Binary.path = ENV['FIREFOX_BINARY_PATH'] ||
Selenium::WebDriver::Firefox::Binary.path
Capybara::Selenium::Driver.new(app, browser: :firefox)
end
RSpec.configure do |config|
config.around(:each, selenium: true) do |example|
Capybara.javascript_driver = :selenium
Capybara.default_wait_time = 5
example.run
Capybara.javascript_driver = :poltergeist
Capybara.default_wait_time = 2
end
end