From d9cfcbbd34c6ca4f182c366574c0b67628a4729b Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 3 Mar 2016 17:42:19 +0100 Subject: [PATCH] Do not cancel ajax call if widget is removed/closed. --- app/assets/javascripts/app/controllers/clues.coffee | 2 +- test/browser_test_helper.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/controllers/clues.coffee b/app/assets/javascripts/app/controllers/clues.coffee index 48c31fd25..5e9e875b7 100644 --- a/app/assets/javascripts/app/controllers/clues.coffee +++ b/app/assets/javascripts/app/controllers/clues.coffee @@ -8,7 +8,7 @@ class Index extends App.Controller new App.FirstStepsClues( el: @el onComplete: => - @ajax( + App.Ajax.request( id: 'preferences' type: 'PUT' url: @apiPath + '/users/preferences' diff --git a/test/browser_test_helper.rb b/test/browser_test_helper.rb index a63bdcef0..18ee518cb 100644 --- a/test/browser_test_helper.rb +++ b/test/browser_test_helper.rb @@ -1626,6 +1626,7 @@ wait untill text in selector disabppears text = instance.find_elements(css: '.content.active .js-reset')[0].text if !text || text.empty? screenshot(browser: instance, comment: 'ticket_update_ok') + sleep 1 return true end rescue