I added a custom method in my test class which goes off a server to check somthing in a DB. This does work.
But now I would like to create a specific action for that, something like that :
{uw_findLock : ['AnimalTypeIUO', [{column: 'action', value: 'D'}, {column: 'tableId', value: 'AnimalType'}]],failWhen:'present'},
1) Where should I call
Siesta.Test.ActionRegistry().registerAction('uw_findLock', MainWeb.FindLock);
2) I get this error : Need to include `action` property or shortcut property in the step config: {"uw_findLock": ["AnimalTypeIUO", [..., ...]], "failWhen": "present"}
Here is my action class code:
Class('MainWeb.FindLock', {
isa : Siesta.Test.Action,
//does : Siesta.Test.Action.Role.HasTarget,
has : {
requiredTestMethod : 'uw_findLock',
options : null,
//present or absent
failWhen : 'absent'
},
methods : {
process : function () {
console.log('FINDLOCK');
// additional "getTarget" to allow functions as "target" value
//some custom code that goes off to the server etc...
}
}
});