FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
roadmap/spec/support/wait_for_ajax.rb at api-patch · DMPRoadmap/roadmap · GitHub
DMPRoadmap
roadmap
Repository navigation
Code
Issues
300
(300)
Pull requests
49
(49)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
roadmap
/
spec
/
support
/
wait_for_ajax.rb
Copy path
More file actions
More file actions
Latest commit
History
History
History
17 lines (14 loc) · 355 Bytes
Breadcrumbs
roadmap
/
spec
/
support
/
wait_for_ajax.rb
Copy path
File metadata and controls
17 lines (14 loc) · 355 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true
module
WaitForAjax
def
wait_for_ajax
Timeout
.
timeout
(
Capybara
.
default_max_wait_time
)
do
loop
until
finished_all_ajax_requests?
end
end
def
finished_all_ajax_requests?
page
.
evaluate_script
(
'jQuery.active'
)
.
zero?
end
end
RSpec
.
configure
do
|
config
|
config
.
include
(
WaitForAjax
,
type
:
:system
)
end
Back
|
FazBrowse Home
|
New Git URL