Sha256: 7d0260aac098ac4e8b39bb7c8bc26813edb73486f2328857f5d8b6e297655b94

Contents?: true

Size: 1.53 KB

Versions: 19

Compression:

Stored size: 1.53 KB

Contents

# Set up basic capybara:
require 'capybara/rails'
ActionDispatch::IntegrationTest.include(Capybara::DSL)

# Set up basic screenshotting capability:
#
# TODO: Once Rails 5.1 is the minimum version we support, we should be able to
#       use the built-in behaviour that Rails adds to after_teardown.
#
require 'capybara-screenshot'
if defined?(MiniTest)
  require 'capybara-screenshot/minitest'
  ActionDispatch::IntegrationTest.include(Capybara::Screenshot::MiniTestPlugin)
else
  require 'capybara-screenshot/testunit'
end

# Include our custom DSL extensions, that also cover screenshotting:
require 'ndr_dev_support/integration_testing/dsl'

# Include support for retrying tests that sporadically fail:
require 'ndr_dev_support/integration_testing/flakey_tests'

# Keeps the selenium webdrivers automatically updated:
require 'webdrivers'
Webdrivers.cache_time = 24.hours

# These are all the drivers we have capybara / screenshot support for:
require 'ndr_dev_support/integration_testing/drivers/chrome'
require 'ndr_dev_support/integration_testing/drivers/chrome_headless'
require 'ndr_dev_support/integration_testing/drivers/firefox'
require 'ndr_dev_support/integration_testing/drivers/poltergeist'
require 'ndr_dev_support/integration_testing/drivers/switchable'

Capybara.default_driver    = :switchable
Capybara.javascript_driver = :switchable

# Inject middleware to disable jQuery fx, CSS transitions/animations
Capybara.disable_animation = true

Capybara.save_path = Rails.root.join('tmp', 'screenshots')
Capybara::Screenshot.prune_strategy = { keep: 20 }

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
ndr_dev_support-6.1.9 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.1.8 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.1.7 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.1.6 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.1.5 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.1.4 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.1.3 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.1.2 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.1.1 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.1.0 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.0.4 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.0.3 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.0.2 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.0.1 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-6.0.0 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.10.2 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.10.1 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.10.0 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.9.0 lib/ndr_dev_support/integration_testing.rb