Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
Got tests running locally
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwebb76 committed Aug 1, 2023
1 parent 96c3ec6 commit a79fa78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ group :test do
gem 'guard-rspec'
gem 'launchy'
gem 'rails-controller-testing'
gem 'selenium-webdriver', require: false
gem 'shoulda-matchers'
gem 'webdrivers'
end

group :linux, :production do
Expand Down
6 changes: 1 addition & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -414,10 +414,6 @@ GEM
uuidtools (2.2.0)
warden (1.2.9)
rack (>= 2.0.9)
webdrivers (5.2.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
websocket (1.2.9)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
Expand Down Expand Up @@ -487,6 +483,7 @@ DEPENDENCIES
rspec-activemodel-mocks
rspec-rails
sass-rails
selenium-webdriver
sentry-rails (>= 4.0)
sentry-ruby (>= 4.0)
shoulda-matchers
Expand All @@ -495,7 +492,6 @@ DEPENDENCIES
timecop
uglifier
uuidtools
webdrivers
whenever
wirble
zeitwerk (< 2.6.4)
Expand Down
7 changes: 3 additions & 4 deletions spec/support/feature_spec_dependencies.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'selenium/webdriver'

Capybara.register_driver :chrome_headless do |app|
options = Selenium::WebDriver::Chrome::Options.new
options.add_argument('disable-dev-shm-usage')
Expand All @@ -11,14 +13,11 @@
options.binary = `which chromium`.chomp || `which google-chrome-stable`.chomp
end

capabilities = Selenium::WebDriver::Remote::Capabilities.chrome
capabilities = Selenium:q:WebDriver::Remote::Capabilities.chrome

Capybara::Selenium::Driver.new(
app, browser: :chrome, capabilities: [options, capabilities]
)
end

Capybara.javascript_driver = :chrome_headless
Capybara.run_server = true
Capybara.server_port = 30_000
Capybara.default_max_wait_time = 10

0 comments on commit a79fa78

Please sign in to comment.