Sha256: dd7575e17705c850927463eb7f7350c754bef552add521be6da77ceefd0addce

Contents?: true

Size: 1.13 KB

Versions: 13

Compression:

Stored size: 1.13 KB

Contents

# frozen_string_literal: true

# A basic feature_helper to be included as the starting point for extensions
#
# Can be required from an extension's spec/feature_helper.rb
#
#     require 'solidus_dev_support/rspec/feature_helper'
#

require 'solidus_dev_support/rspec/rails_helper'

require 'capybara-screenshot/rspec'
require 'capybara/apparition'

Capybara.javascript_driver = (ENV['CAPYBARA_DRIVER'] || :apparition).to_sym
Capybara.default_max_wait_time = 10
Capybara.server = :puma, { Silent: true } # A fix for rspec/rspec-rails#1897

Capybara.register_driver :apparition do |app|
  Capybara::Apparition::Driver.new(app, window_size: [1920, 1080])
end

require 'spree/testing_support/capybara_ext'

RSpec.configure do |config|
  config.when_first_matching_example_defined(type: :feature) do
    config.before :suite do
      # Preload assets
      if Rails.application.respond_to?(:precompiled_assets)
        Rails.application.precompiled_assets
      else
        # For older sprockets 2.x
        Rails.application.config.assets.precompile.each do |asset|
          Rails.application.assets.find_asset(asset)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
solidus_dev_support-1.5.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-1.4.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-1.3.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-1.2.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-1.1.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-1.0.1 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-1.0.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-0.6.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-0.5.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-0.4.1 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-0.4.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-0.3.0 lib/solidus_dev_support/rspec/feature_helper.rb
solidus_dev_support-0.2.0 lib/solidus_dev_support/rspec/feature_helper.rb