Add firefox driver for specs. Disable capybara screenshots

This commit is contained in:
Jesse C. Fisher 2025-04-20 18:27:56 -07:00 committed by icwizardmonke
parent 50508da8f8
commit 7f5f4145e9
2 changed files with 8 additions and 14 deletions

View File

@ -4,8 +4,8 @@ require 'spec_helper'
require File.expand_path('../../config/environment', __FILE__)
require 'rspec/rails'
# Add additional requires below this line. Rails is not loaded until this point!
`trash tmp/capybara/*`
require 'capybara-screenshot/rspec'
# `trash tmp/capybara/*`
# require 'capybara-screenshot/rspec'
# Requires supporting ruby files with custom matchers and macros, etc, in
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are

View File

@ -1,15 +1,9 @@
Capybara.server = :puma # Until your setup is working
# Capybara.server = :puma, { Silent: true } # To clean up your test output
#asset_hosts = {
# staging: 'http://13staging.owlephant.icu',
# development: 'http://localhost:3000',
# test: 'http://localhost:3000'
#}
Capybara.server = :puma
#if ENV['RAILS_ENV'] == 'staging'
# #Capybara.run_server = false
# Capybara.app_host = asset_hosts[ENV['RAILS_ENV'].to_sym]
#end
#Capybara.asset_host = asset_hosts[ENV['RAILS_ENV'].to_sym]
Capybara.register_driver :firefox do |app|
Capybara::Selenium::Driver.new(app, browser: :firefox)
end
# Capybara.default_driver = :firefox
# Capybara.javascript_driver = :chrome
Capybara.javascript_driver = :selenium_chrome_headless