spec/rails_app/tmp/cache/assets/test/sprockets/8ffe76c9f2babb34fe924c4bc1fb9b58 in netzke-testing-0.12.1 vs spec/rails_app/tmp/cache/assets/test/sprockets/8ffe76c9f2babb34fe924c4bc1fb9b58 in netzke-testing-0.12.2
- old
+ new
@@ -1,8 +1,10 @@
{I"
class:ETI"BundledAsset; FI"logical_path; TI"&netzke/testing/helpers/actions.js; TI"
pathname; TI"l/Users/mxgrn/code/netzke/netzke-testing/app/assets/javascripts/netzke/testing/helpers/actions.js.coffee; FI"content_type; TI"application/javascript; TI"
-mtime; Tl+RøUI"length; TiˆI"digest; TI"%716ced2d0371fc9e0b4557a04caeda2e; FI"source; TI"ˆ(function() {
+mtime; Tl+е7UI"length; Ti»
+I"digest; TI"%5d5d691eeffad1c450afa5465ef7ab64; FI"source; TI"»
+(function() {
Ext.Ajax.on('beforerequest', function() {
Netzke.ajaxCount = window.ajaxCount || 0;
return Netzke.ajaxCount += 1;
});
@@ -10,13 +12,13 @@
return Netzke.ajaxCount -= 1;
});
Ext.apply(window, {
wait: function() {
- var callback, delay, i, id;
- if (typeof arguments[0] === 'function') {
- callback = arguments[0];
+ var callback, delay, waitInCycle;
+ waitInCycle = function(callback) {
+ var i, id;
i = 0;
return id = setInterval(function() {
i += 1;
if (i >= 100) {
clearInterval(id);
@@ -24,17 +26,35 @@
}
if (Netzke.ajaxCount === 0) {
return i = 100;
}
}, 200);
- } else {
- delay = arguments[0];
- callback = arguments[1];
- return setInterval(function() {
- return callback.call();
- }, delay);
+ };
+ if (typeof arguments[0] === 'function') {
+ return waitInCycle(arguments[0]);
}
+ if (Ext.isNumber(arguments[0])) {
+ if (Ext.isFunction(arguments[1])) {
+ delay = arguments[0];
+ callback = arguments[1];
+ setInterval(function() {
+ return waitInCycle(resolve);
+ }, delay);
+ return null;
+ } else {
+ console.log("1", 1);
+ delay = arguments[0];
+ return new Promise(function(resolve, reject) {
+ return setInterval(function() {
+ return waitInCycle(resolve);
+ }, delay);
+ });
+ }
+ }
+ return new Promise(function(resolve, reject) {
+ return waitInCycle(resolve);
+ });
},
click: function(cmp) {
var el;
if (Ext.isString(cmp)) {
throw "Could not locate " + cmp;
@@ -81,6 +101,6 @@
}
}
});
}).call(this);
-; TI"required_assets_digest; TI"%9a527faab6e1434bc18a46d2edf3f946; FI"
_version; TI"%4bf7b15359fe8e0974f7f263e26e27f4; F
+; TI"required_assets_digest; TI"%3373b0493e594f7df6f0687563290863; FI"
_version; TI"%4bf7b15359fe8e0974f7f263e26e27f4; F
\ No newline at end of file