From 50e4e8fc6b63aa681d6c13a1bedb17778741234c Mon Sep 17 00:00:00 2001 From: Tim Fischbach Date: Thu, 8 Feb 2018 09:13:11 +0100 Subject: [PATCH] Make end to end specs less brittle Insert a short sleep while waiting for Ajax to ensure all requests have finished and the select is done updating. --- spec/features/end_to_end_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/features/end_to_end_spec.rb b/spec/features/end_to_end_spec.rb index e0b8244..4d61d49 100644 --- a/spec/features/end_to_end_spec.rb +++ b/spec/features/end_to_end_spec.rb @@ -80,6 +80,7 @@ def select_box_items def wait_for_ajax Timeout.timeout(Capybara.default_max_wait_time) do + sleep 0.1 loop until finished_all_ajax_requests? end end