Commit 9da145c5 authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Re-use method for checking all Vue request are done

parent e4e39814
module WaitForVueResource
def wait_for_vue_resource(spinner: true)
Timeout.timeout(Capybara.default_max_wait_time) do
loop until page.evaluate_script('window.activeVueResources').zero?
loop until finished_all_vue_resource_requests?
end
end
private
def finished_all_vue_resource_requests?
return true unless javascript_test?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment