mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Adds CI condition browser_options; sets timeouts to 60
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