Skip to content

A platform for community discussion. Free, open, simple.

DEV: Increase Capybara.default_max_wait_time on github actions (#19750)

Alan Guo Xiang Tane58277adf3ac
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 9e207c2534a..17393c85174 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -30,6 +30,7 @@ jobs:
PGUSER: discourse
PGPASSWORD: discourse
USES_PARALLEL_DATABASES: ${{ matrix.build_type == 'backend' }}
+ CAPBYARA_DEFAULT_MAX_WAIT_TIME: 4
strategy:
fail-fast: false
diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb
index 7af0d3d3510..f1831ef300a 100644
--- a/spec/rails_helper.rb
+++ b/spec/rails_helper.rb
@@ -245,6 +245,10 @@ RSpec.configure do |config|
allow: [Webdrivers::Chromedriver.base_url]
)
+ if ENV["CAPBYARA_DEFAULT_MAX_WAIT_TIME"].present?
+ Capybara.default_max_wait_time = ENV["CAPBYARA_DEFAULT_MAX_WAIT_TIME"].to_i
+ end
+
Capybara.threadsafe = true
Capybara.disable_animation = true