We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9238d30 commit 704ecddCopy full SHA for 704ecdd
spec/support/wait_for_ajax.rb
@@ -2,6 +2,8 @@
2
3
module WaitForAjax
4
def wait_for_ajax
5
+ wait_for_turbojs
6
+
7
start_time = Time.current
8
timeout = Capybara.default_max_wait_time
9
@@ -11,6 +13,11 @@ def wait_for_ajax
11
13
end
12
14
15
16
+ def wait_for_turbojs
17
+ has_css?('.turbo-progress-bar', visible: true)
18
+ has_no_css?('.turbo-progress-bar')
19
+ end
20
21
def ajax_requests_finished?
22
# This method MUST NOT be interrupted. Hence, Timeout.timeout is not used here.
23
# Otherwise, Selenium and the browser driver might crash, preventing further tests from running.
0 commit comments