Commit f879e40d authored by Rémy Coutable's avatar Rémy Coutable

Don't navigate to about:blank

This turned out to prevent the browser from clearing the local storage.
Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 7322770d
......@@ -3,7 +3,6 @@ module WaitForRequests
# This is inspired by http://www.salsify.com/blog/engineering/tearing-capybara-ajax-tests
def wait_for_requests_complete
stop_client
Gitlab::Testing::RequestBlockerMiddleware.block_requests!
wait_for('pending AJAX requests complete') do
Gitlab::Testing::RequestBlockerMiddleware.num_active_requests.zero?
......@@ -12,13 +11,6 @@ module WaitForRequests
Gitlab::Testing::RequestBlockerMiddleware.allow_requests!
end
# Navigate away from the current page which will prevent any new requests from being started
def stop_client
page.execute_script %Q{
window.location = "about:blank";
}
end
# Waits until the passed block returns true
def wait_for(condition_name, max_wait_time: Capybara.default_max_wait_time, polling_interval: 0.01)
wait_until = Time.now + max_wait_time.seconds
......
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