Sha256: c3247c773d9818e62bdce792c511b2940713c0675ab9391bd66977f274679a47

Contents?: true

Size: 789 Bytes

Versions: 2

Compression:

Stored size: 789 Bytes

Contents

require 'capybara/rspec'
require 'capybara-screenshot'
require 'capybara-screenshot/rspec'
require 'capybara/rails'
require 'selenium-webdriver'

RSpec.configure do
  Capybara.register_driver :chrome do |app|
    Selenium::WebDriver.logger.level = :error

    Capybara::Selenium::Driver.new app,
      browser: :chrome,
      options: Selenium::WebDriver::Chrome::Options.new(
        args: %w[no-sandbox disable-dev-shm-usage disable-popup-blocking headless disable-gpu window-size=1920,1080 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=VizDisplayCompositor],
        log_level: :error
      )
  end
  Capybara.javascript_driver = :chrome

  Capybara::Screenshot.register_driver(:chrome) do |driver, path|
    driver.browser.save_screenshot(path)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_dev_tools-0.0.9 lib/spree_dev_tools/rspec/support/capybara.rb
spree_dev_tools-0.0.8 lib/spree_dev_tools/rspec/support/capybara.rb