spec/rails_app/tmp/cache/assets/test/sprockets/7250cf6654022ff231aed2eaa0ce7b5f in netzke-testing-0.12.1 vs spec/rails_app/tmp/cache/assets/test/sprockets/7250cf6654022ff231aed2eaa0ce7b5f in netzke-testing-0.12.2
- old
+ new
@@ -1,14 +1,17 @@
{I"
class:ETI"BundledAsset; FI"logical_path; TI"#netzke/testing/helpers/grid.js; TI"
pathname; TI"i/Users/mxgrn/code/netzke/netzke-testing/app/assets/javascripts/netzke/testing/helpers/grid.js.coffee; FI"content_type; TI"application/javascript; TI"
-mtime; Tl+äÉõTI"length; TiåI"digest; TI"%7f203a759180c518d6242a8bf3ab719e; FI"source; TI"å(function() {
+mtime; Tl+Ù=UI"length; Ti£I"digest; TI"%df048060d0cd553ddec4c95cd8641012; FI"source; TI"£(function() {
Ext.apply(window, {
- grid: function(title) {
- if (title) {
- return Ext.ComponentQuery.query('grid[title="' + title + '"]')[0];
+ grid: function(value, lookup) {
+ lookup = lookup || 'title';
+ if (value && lookup === 'title') {
+ return Ext.ComponentQuery.query('grid[title="' + value + '"]')[0] || Ext.ComponentQuery.query('treepanel[title="' + value + '"]')[0];
+ } else if (value && lookup === 'name') {
+ return Ext.ComponentQuery.query('grid[name="' + value + '"]')[0] || Ext.ComponentQuery.query('treepanel[name="' + value + '"]')[0];
} else {
- return Ext.ComponentQuery.query('grid{isVisible(true)}')[0];
+ return Ext.ComponentQuery.query('grid{isVisible(true)}')[0] || Ext.ComponentQuery.query('treepanel{isVisible(true)}')[0];
}
},
expandRowCombo: function(field, params) {
var column, editor, g;
g = g || this.grid();
@@ -52,17 +55,27 @@
results.push(record.set(key, value));
}
return results;
},
selectAssociation: function(attr, value, callback) {
- expandRowCombo(attr);
- return wait(function() {
- select(value, {
- "in": combobox(attr)
+ var action;
+ action = function(cb) {
+ expandRowCombo(attr);
+ return wait(function() {
+ select(value, {
+ "in": combobox(attr)
+ });
+ return cb();
});
- return callback.call();
- });
+ };
+ if (callback) {
+ return action(callback);
+ } else {
+ return new Promise(function(resolve, reject) {
+ return action(resolve);
+ });
+ }
},
valuesInColumn: function(name, params) {
var grid, out;
if (params == null) {
params = {};
@@ -74,10 +87,24 @@
assocValue = r.get('meta').associationValues[name];
return out.push(assocValue ? assocValue : r.get(name));
});
return out;
},
+ valueInCell: function(column, row, params) {
+ var assocValue, grid, r;
+ if (params == null) {
+ params = {};
+ }
+ grid = params["in"] || this.grid();
+ r = grid.getStore().getAt(row);
+ assocValue = r.get('meta').associationValues[column];
+ if (assocValue) {
+ return assocValue;
+ } else {
+ return r.get(column);
+ }
+ },
selectAllRows: function(params) {
var grid;
if (params == null) {
params = {};
}
@@ -121,10 +148,18 @@
params = {};
}
grid = params["in"] || this.grid();
return grid.getSelectionModel().select(grid.getStore().first());
},
+ selectRow: function(n, params) {
+ var grid;
+ if (params == null) {
+ params = {};
+ }
+ grid = params["in"] || this.grid();
+ return grid.getSelectionModel().select(n);
+ },
editLastRow: function() {
var data, grid, key, record, results, store;
data = arguments[0];
grid = Ext.ComponentQuery.query("grid")[0];
store = grid.getStore();
@@ -142,6 +177,6 @@
return e.completeEdit();
}
});
}).call(this);
-; TI"required_assets_digest; TI"%9372f8783cbd1ebed5a28e09fdde317b; FI"
_version; TI"%4bf7b15359fe8e0974f7f263e26e27f4; F
+; TI"required_assets_digest; TI"%532521c180247b8008c2696033e6fd98; FI"
_version; TI"%4bf7b15359fe8e0974f7f263e26e27f4; F
\ No newline at end of file