Sha256: 1f21fd41a5c5e911c0f4c237b843b671fcf9c8c6056d12dbb237354a2d016028

Contents?: true

Size: 1.31 KB

Versions: 11

Compression:

Stored size: 1.31 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'

# 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

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ndr_dev_support-5.5.0 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.4.8 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.4.7 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.4.6 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.4.5 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.4.4 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.4.3 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.4.2 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.4.1 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.4.0 lib/ndr_dev_support/integration_testing.rb
ndr_dev_support-5.3.1 lib/ndr_dev_support/integration_testing.rb