{:uriI"file:///Users/mxgrn/code/netzke/netzke-testing/app/assets/javascripts/netzke/testing/helpers/actions.js.coffee?type=application/javascript&pipeline=self&id=1e405c9f09e4cd64d0fded677608698bca14efc74a9f353b46005b55e2099413:ET:load_pathI"C/Users/mxgrn/code/netzke/netzke-testing/app/assets/javascripts;T: filenameI"l/Users/mxgrn/code/netzke/netzke-testing/app/assets/javascripts/netzke/testing/helpers/actions.js.coffee;T: nameI"#netzke/testing/helpers/actions;T:logical_pathI"+netzke/testing/helpers/actions.self.js;T:content_typeI"application/javascript;T: sourceI" (function() { Ext.Ajax.on('beforerequest', function() { Netzke.ajaxCount = window.ajaxCount || 0; return Netzke.ajaxCount += 1; }); Ext.Ajax.on('requestcomplete', function() { return Netzke.ajaxCount -= 1; }); Ext.Ajax.on('requestexception', function() { return Netzke.ajaxCount -= 1; }); Ext.apply(window, { wait: function() { var callback, delay, waitInCycle; waitInCycle = function(resolve) { var i, id; i = 0; return id = setInterval(function() { i += 1; if (i >= 100) { clearInterval(id); resolve.call(); } if (Netzke.ajaxCount === 0) { return i = 100; } }, 200); }; 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 { 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; } else if (cmp.isXType) { if (cmp.isXType('tool')) { el = cmp.toolEl; } else { el = cmp.getEl(); } return el.dom.click(); } else if (Ext.isElement(cmp)) { return cmp.click(); } }, closeWindow: function() { return Ext.ComponentQuery.query("window[hidden=false]")[0].close(); }, select: function(value, params, callback) { var combo, rec; if (params == null) { params = params; } combo = params["in"]; if (combo.isExpanded) { combo.setValue(combo.findRecordByDisplay(value)); return combo.collapse(); } else { combo.onTriggerClick(); if (callback) { return wait(function() { var rec; rec = combo.findRecordByDisplay(value); combo.select(rec); combo.fireEvent('select', combo, rec); combo.collapse(); return callback.call(); }); } else { rec = combo.findRecordByDisplay(value); combo.select(rec); combo.fireEvent('select', combo, rec); return combo.collapse(); } } } }); }).call(this); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"jprocessors:type=application/javascript&file_type=application/javascript&engines=.coffee&pipeline=self;TTI"zfile-digest:///Users/mxgrn/code/netzke/netzke-testing/app/assets/javascripts/netzke/testing/helpers/actions.js.coffee;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%SPa5r?șF,C)^: lengthi :dependencies_digest"%N!Xt~W'Ss :~D-k/:idI"E1e405c9f09e4cd64d0fded677608698bca14efc74a9f353b46005b55e2099413;F: mtimel+_V