app/assets/javascripts/netzke/testing/helpers/actions.js.coffee in netzke-testing-1.0.0.0.pre vs app/assets/javascripts/netzke/testing/helpers/actions.js.coffee in netzke-testing-1.0.0.0

- old
+ new

@@ -22,17 +22,17 @@ # wait 200, -> # waitsAtLeast200MsBeforeCallingThis() # # wait().then -> doSomething() wait: () -> - waitInCycle = (callback) -> + waitInCycle = (resolve) -> i = 0 id = setInterval -> i += 1 if i >= 100 clearInterval(id) - callback.call() + resolve.call() # this way we ensure another 20ms cycle before we issue a callback i = 100 if Netzke.ajaxCount == 0 , 200 @@ -54,10 +54,9 @@ return null # wait(50).then -> # waitAtLeast50ThenResolve() else - console.log("1", 1) delay = arguments[0] return new Promise (resolve, reject) -> setInterval -> waitInCycle(resolve) , delay