# frozen_string_literal: true require 'capybara/rspec' require 'capybara/rails' if defined?(::Rails) # Configure Capybara ::Capybara.configure do |config| config.exact = true config.match = :one config.ignore_hidden_elements = true config.visible_text_only = true end ::Capybara.save_path = "#{::Dir.pwd}/tmp/screenshots" if defined?(::Chamber) ::Capybara.default_host = ::Chamber.env.http.base_url ::Capybara.app_host = ::Chamber.env.http.base_url ::Capybara.asset_host = ::Chamber.env.http.base_url ::Capybara.server_port = ::Chamber.env.http.url_components.port end