spec/system_helper.rb in solidus_seo-1.0.7 vs spec/system_helper.rb in solidus_seo-1.0.8
- old
+ new
@@ -1,15 +1,17 @@
# frozen_string_literal: true
-RSpec.configure do |config|
- config.when_first_matching_example_defined(type: :system) do
- config.before :suite do
+RSpec.configure do |c|
+ Capybara.disable_animation = true
+
+ c.before(:example, type: :system) do
+ driven_by ENV['DEBUG_CAPYBARA'] ? :selenium_chrome : :selenium_chrome_headless
+ end
+
+ c.when_first_matching_example_defined(type: :system) do
+ c.before :suite do
# Preload assets
if Rails.application.respond_to?(:precompiled_assets)
Rails.application.precompiled_assets
end
- end
-
- config.before(:example, type: :system) do
- driven_by :apparition
end
end
end