Request new features or modifications


Post by gubespam »

Some background: I'm not sure if this is how t.chain() was intended to be used, but we have ended up using it as a DSL. We can simple give a list of test steps, and t.chain() will execute them in order for us, regardless of whether the individual steps are synchronous or asynchronous. It's a very nice, concise way to specify the steps. It looks something like:
t.chain(
    { waitFor: 'storesToLoad', args: [profileController.getSomeStore()] },
    
    { waitFor: 'componentVisible', args: 'profiledetailwindow', timeout: 2000 },
    
    selectComboByIndex('mywindow combobox[action=blah]', 0),
    
    { action: 'click', target: '>>profiles tool[action=addProfile]' },
    ...
);
Sometimes, we need to do something special, not built-in to Siesta, like the second-to-last step above.

It would be nice if Siesta provided some means to register additional handlers for new custom actions. It would look something like:
Harness.configure({
    // ...
    actionHandlers: [{
        selectComboByIndex: function( t, combo, index ){
            t.click( ... );
            // ...
        }
    }]
});
Then in the test, we could write:
    { action: 'selectComboByIndex', args:[ 'mywindow combobox[action=blah]', 0 ] }

Post by nickolay »

Oh, we've overlooked this thread somehow. Will check this suggestion and reply soon.

Post by nickolay »

This sounds sane. I've created a ticket for it, we'll try to make it in the upcoming 1.2.0 release. https://www.assembla.com/spaces/bryntum ... ity/ticket:

Post Reply