Reference a combobox within a grid with a cell editing plugin in Sencha Test (without global search)

128 Views Asked by At

Given there is a Grid using a cell editing plugin is there a way to reference a combobox editor without doing it in a global way ?

I have this working:

    this.grid().rowAt(0).cellAt(0).click(); // click to show the combo
    ST.comboBox('combobox[itemId=someID]').expand().setValue(1); // this works but looks for the combo globally 

BUT I think I should be able to do:

this.grid().gotoComboBox('combobox[itemId=someID]'); // this doesn't work

or something like:

this.window().gotoComboBox('combobox[itemId=someID]'); // this doesn't work either (grid is within a window)
1

There are 1 best solutions below

1
On BEST ANSWER

All of the goto() methods ultimately use Ext.ComponentQuery/down() to traverse the component hierarchy to resolve the future's component. If you were to try this yourself apart from the ST API, you'd find that you can't get the instance of the combobox by doing down() on the grid or its parent (e.g, grid.down('combobox[itemId=someId]').

I think a nice feature would be to have some apis in the row/cell futures that would enable specific actions on editors. It's an area we see a lot of questions in, so that would probably be a more robust solution. I'll add a feature request for it.