Increase default timeout in system specs

This commit is contained in:
Maikel Linke
2025-06-24 11:57:38 +10:00
parent 75b2119dd1
commit 7d80033c8e
2 changed files with 11 additions and 2 deletions

View File

@@ -1,6 +1,14 @@
# ENV vars for the test environment
# Override locally with `.env.test.local`
# Test env specific variables
#
# Adjust this to your computer. When you start test-driven development, you may
# want to reduce this value to avoid waiting for a test that you expect to fail.
CAPYBARA_MAX_WAIT_TIME="10"
# General app specific variables
# Locale for translation. Using a locale other than `en` tests the
# successful fallback to `en`.
LOCALE="en_TST"

View File

@@ -5,8 +5,9 @@
Capybara.enable_aria_label = true
# The default wait time is 2 seconds. Small is good for test-driven development
# ensuring efficient code but CI can be a bit slow. We want to avoid flakiness.
Capybara.default_max_wait_time = 10 if ENV["CI"]
# ensuring efficient code but some machines can be a bit slow.
# And we want to avoid flakiness.
Capybara.default_max_wait_time = ENV.fetch("CAPYBARA_MAX_WAIT_TIME").to_i
# Normalize whitespaces when using `has_text?` and similar matchers,
# i.e., ignore newlines, trailing spaces, etc.