From 82f1c2575361e47f8f62347bf3e7b7e64001dbdd Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Thu, 16 Jan 2025 16:55:53 +0000 Subject: [PATCH] Enable no-sandbox on the capybara driver This is know to cause timeouts when running inside docker --- Gemfile.lock | 1 + spec/rails_helper.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Gemfile.lock b/Gemfile.lock index 7587bc88..0950c2ba 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -548,6 +548,7 @@ PLATFORMS arm64-darwin-21 arm64-darwin-23 x86_64-darwin-21 + x86_64-darwin-24 x86_64-linux DEPENDENCIES diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index a2962a63..1e91e14a 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -16,11 +16,15 @@ require "view_component/test_helpers" Capybara.register_driver(:cuprite) do |app| + browser_options = {} + browser_options['no-sandbox'] = nil if ENV['CI'] + Capybara::Cuprite::Driver.new( app, timeout: 10, process_timeout: 30, window_size: [1200, 800], + browser_options: ) end Capybara.default_driver = :cuprite