Support Forum
Hi,
You can't type directly in the cell of the grid. Need to activate the grid editor first (usually with double click). See /examples/023-extjs-grid/040_editing.t.js
You can't type directly in the cell of the grid. Need to activate the grid editor first (usually with double click). See /examples/023-extjs-grid/040_editing.t.js
Read the API documentation
Yes, Ext editor makes a 15ms delay after double click, before it will actually appear. Not sure why its done in this way, but you need to use that `waitForSelector` as in example
Read the API documentation
Hi,
I tried, but I keep getting the following exception:
...
Timeout while waiting for condition.
Failed assertion [waitFor]
Condition was not fullfilled during 10000ms
....
Even though I am using RowEditing as selection model (and not cellediting), should I be looking for 'input' as the css selector?
If not, how do I find out what css selector string I need to use with the api (waitfor.....) ?
Sorry if it is a basic question.
Thx,
-Satish
I tried, but I keep getting the following exception:
...
Timeout while waiting for condition.
Failed assertion [waitFor]
Condition was not fullfilled during 10000ms
....
Even though I am using RowEditing as selection model (and not cellediting), should I be looking for 'input' as the css selector?
If not, how do I find out what css selector string I need to use with the api (waitfor.....) ?
Sorry if it is a basic question.
Thx,
-Satish
Double click on the cell to show your editor and then examine how it is represented in the DOM. Look for specific tag or CSS class or their combination.
Read the API documentation
If you will post a test case I could take a look on it, hard to say anything otherwise.
Read the API documentation
Hi,
Quick update -
I just tweaked your example - Editing/040_editing.js, and changed from cellediting to rowediting (plugin).
What was working with cellediting, isn't working with rowediting.
Noticing the same issues with Editing/040_editing.js as I am facing with my own application.
Thx,
-Satish
fyi- here is the code for Editing/040_editing.js
I have tried with various wait methods, but no luck.
.......................
StartTest(function(t) {
//=================================================================
t.diag("Simple grid assertions");
// Use a convenience method to generate the grid, keeping the test as small as possible
var grid = t.getGrid({
plugins : Ext.create("Ext.grid.plugin.RowEditing", {}),
renderTo : document.body
});
var store = grid.store;
t.waitForRowsVisible(grid, function() {
var firstCell = t.getFirstCell(grid);
// See if we can edit the name cell
t.doubleClick(firstCell, function() {
var prevValue = store.first().get('name');
// Wait for editor to appear at the position of the cell
// t.waitForSelectorAt(firstCell.getXY(), 'input', function(foundEl) {
t.waitForContentLike(firstCell, 'x-box-inner', function(foundEl) {
// Clear text field
foundEl.value = '';
// Type some text
t.type(foundEl, 'foo[ENTER]', function() {
t.is(store.first().get('name'), 'foo', 'Name was updated correctly');
var dateCell = t.getCell(grid, 0, 3);
// See if we can edit the "last game" cell
t.doubleClick(dateCell, function() {
// Date value is "11/12/2010", change to "01/12/2010"
t.waitForSelectorAt(dateCell.getXY(), 'input', function(foundEl) {
foundEl.value = ''; // Reset field
t.type(foundEl, '01/18/2009[ENTER]', function() {
t.isDateEqual(store.first().get('lastgame'), new Date(2009, 0, 18), 'Date was updated correctly');
});
});
});
});
// eof waitFor
});
// eof waitForSelectorAt
});
// eof doubleClick
});
// eof waitForRowsVisible
});
........................
Quick update -
I just tweaked your example - Editing/040_editing.js, and changed from cellediting to rowediting (plugin).
What was working with cellediting, isn't working with rowediting.
Noticing the same issues with Editing/040_editing.js as I am facing with my own application.
Thx,
-Satish
fyi- here is the code for Editing/040_editing.js
I have tried with various wait methods, but no luck.
.......................
StartTest(function(t) {
//=================================================================
t.diag("Simple grid assertions");
// Use a convenience method to generate the grid, keeping the test as small as possible
var grid = t.getGrid({
plugins : Ext.create("Ext.grid.plugin.RowEditing", {}),
renderTo : document.body
});
var store = grid.store;
t.waitForRowsVisible(grid, function() {
var firstCell = t.getFirstCell(grid);
// See if we can edit the name cell
t.doubleClick(firstCell, function() {
var prevValue = store.first().get('name');
// Wait for editor to appear at the position of the cell
// t.waitForSelectorAt(firstCell.getXY(), 'input', function(foundEl) {
t.waitForContentLike(firstCell, 'x-box-inner', function(foundEl) {
// Clear text field
foundEl.value = '';
// Type some text
t.type(foundEl, 'foo[ENTER]', function() {
t.is(store.first().get('name'), 'foo', 'Name was updated correctly');
var dateCell = t.getCell(grid, 0, 3);
// See if we can edit the "last game" cell
t.doubleClick(dateCell, function() {
// Date value is "11/12/2010", change to "01/12/2010"
t.waitForSelectorAt(dateCell.getXY(), 'input', function(foundEl) {
foundEl.value = ''; // Reset field
t.type(foundEl, '01/18/2009[ENTER]', function() {
t.isDateEqual(store.first().get('lastgame'), new Date(2009, 0, 18), 'Date was updated correctly');
});
});
});
});
// eof waitFor
});
// eof waitForSelectorAt
});
// eof doubleClick
});
// eof waitForRowsVisible
});
........................
Last edited by satishkn on Thu Apr 05, 2012 8:31 am, edited 1 time in total.