File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 11# This file is copied to spec/ when you run 'rails generate rspec:install'
22require "spec_helper"
3- ENV [ "RAILS_ENV" ] || = "test"
3+ ENV [ "RAILS_ENV" ] = "test"
44require_relative "../config/environment"
55# Prevent database truncation if the environment is production
66abort ( "The Rails environment is running in production mode!" ) if Rails . env . production?
Original file line number Diff line number Diff line change 77end
88
99Capybara . register_driver :selenium_chrome_headless do |app |
10- options = Selenium :: WebDriver :: Chrome :: Options . new ( args : %w[ headless disable-gpu window-size=1400,1400 ] )
10+ chrome_flags = %w[ headless disable-gpu window-size=1400,1400 ]
1111
12+ if ENV [ "DOCKER_CONTAINER" ]
13+ chrome_flags . concat ( %w[ no-sandbox disable-dev-shm-usage ] )
14+ end
15+
16+ options = Selenium ::WebDriver ::Chrome ::Options . new ( args : chrome_flags )
1217 Capybara ::Selenium ::Driver . new ( app , browser : :chrome , options : options )
1318end
1419
You can’t perform that action at this time.
0 commit comments