From 77c0ff1d2842aba50796f3bf301141aa12c4a11e Mon Sep 17 00:00:00 2001 From: Sean Rankine Date: Fri, 24 Jul 2026 09:49:46 +0100 Subject: [PATCH] Increase Capybara default max wait time The e2e tests run against real environments over the network, usually straight after a deployment when the apps are at their slowest. Capybara's 2 second default gave page loads, redirects and the One Login OAuth handshake too little time to settle, causing intermittent ElementNotFound and current_path failures in the pipeline. --- spec/spec_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 7bd04cf..4baa8ac 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -71,6 +71,11 @@ Capybara.configure do |config| config.automatic_label_click = true + + # These tests run against real environments over the network, often right + # after a deployment when the apps respond slowly. Capybara's 2 second + # default is not long enough for page loads and redirects to settle. + config.default_max_wait_time = 10 end # This file was generated by the `rspec --init` command. Conventionally, all