mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-04-11 10:28:45 -04:00
Merge branch 'dev' into openfarm-bye-bye
This commit is contained in:
@@ -553,7 +553,7 @@ GEM
|
||||
recaptcha (5.19.0)
|
||||
redis-client (0.23.2)
|
||||
connection_pool
|
||||
regexp_parser (2.11.0)
|
||||
regexp_parser (2.11.1)
|
||||
reline (0.6.1)
|
||||
io-console (~> 0.5)
|
||||
responders (3.1.1)
|
||||
@@ -606,7 +606,7 @@ GEM
|
||||
rswag-ui (2.16.0)
|
||||
actionpack (>= 5.2, < 8.1)
|
||||
railties (>= 5.2, < 8.1)
|
||||
rubocop (1.79.1)
|
||||
rubocop (1.79.2)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.1.0)
|
||||
|
||||
@@ -15,13 +15,13 @@ require 'capybara-screenshot/rspec'
|
||||
require 'axe-capybara'
|
||||
require 'axe-rspec'
|
||||
|
||||
# TODO: We may want to trial options.add_argument('--disable-dev-shm-usage') ### optional
|
||||
|
||||
# Required for running in the dev container
|
||||
Capybara.register_driver :selenium_chrome_customised_headless do |app|
|
||||
options = Selenium::WebDriver::Options.chrome
|
||||
options.add_argument("--headless")
|
||||
options.add_argument("--no-sandbox")
|
||||
options.add_argument("--window-size=1920,1080")
|
||||
options.add_argument("--disable-dev-shm-usage")
|
||||
|
||||
# driver = Selenium::WebDriver.for :chrome, options: options
|
||||
|
||||
@@ -120,8 +120,8 @@ RSpec.configure do |config|
|
||||
# Prevent Poltergeist from fetching external URLs during feature tests
|
||||
config.before(:each, :js) do
|
||||
# TODO: Why are we setting this page size then straight afterwards, maximising?
|
||||
width = 1280
|
||||
height = 1280
|
||||
width = 1920
|
||||
height = 1080
|
||||
Capybara.current_session.driver.browser.manage.window.resize_to(width, height)
|
||||
|
||||
if page.driver.browser.respond_to?(:url_blacklist)
|
||||
@@ -132,6 +132,9 @@ RSpec.configure do |config|
|
||||
]
|
||||
end
|
||||
|
||||
page.driver.browser.manage.window.maximize if page.driver.browser.respond_to?(:manage)
|
||||
# Historically, we wanted to .maximize; but this actually undoes the resize_to step above
|
||||
# with chrome headless
|
||||
# page.driver.browser.manage.window.maximize if page.driver.browser.respond_to?(:manage)
|
||||
# puts "Maximized window size: #{page.driver.browser.manage.window.size}"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user