mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Merge pull request #10296 from filipefurtad0/add_no_sandbox_to_cuprite_settings
Sets no-sandbox option, for CI env.; increases timeout values
This commit is contained in:
@@ -4,14 +4,17 @@ require "capybara/cuprite"
|
||||
|
||||
headless = ActiveModel::Type::Boolean.new.cast(ENV.fetch("HEADLESS", true))
|
||||
|
||||
browser_options = {}
|
||||
browser_options["no-sandbox"] = nil if ENV['CI']
|
||||
|
||||
Capybara.register_driver(:cuprite) do |app|
|
||||
Capybara::Cuprite::Driver.new(
|
||||
app,
|
||||
**{
|
||||
window_size: [1200, 800],
|
||||
browser_options: {},
|
||||
process_timeout: 20,
|
||||
timeout: 20,
|
||||
browser_options: browser_options,
|
||||
process_timeout: 60,
|
||||
timeout: 60,
|
||||
# Don't load scripts from external sources, like google maps or stripe
|
||||
url_whitelist: ["http://localhost", "http://0.0.0.0", "http://127.0.0.1"],
|
||||
inspector: true,
|
||||
|
||||
Reference in New Issue
Block a user