I use methods of some custom classes that execute the cases. All good.
I would like to know if there is a short-hand for the chain method. The following code:
t.it('Test Delete trigger:event', function (t) {
t.chain(
function (next) {
me.resetViewData(t, next);
},
function (next) {
me.waitForListMode(t, next);
},
{ click: me.actionTargets.deleteClick },
{ waitForMs: 10 },
function (next) {
me.view.fireEvent('callDelete');
next();
},
function (next) {
me.runDelete(t, next);
},
function (next) {
me.waitForListMode(t, next);
},
function (next) {
me.checkDeleteResult(t, next);
}
);
});
t.it('Test Delete trigger:event', function (t) {
t.chain(
{ method: me.resetViewData, scope: me, args: [t] }, //next should be automatically passed as last argument
{ method: me.waitForListMode, scope: me, args: [t] },
{ method: me.resetViewData, scope: me, args: [t] },
{ method: me.resetViewData, scope: me, args: [t] },
{ waitForMs: 10 },
function (next) {
me.view.fireEvent('callDelete');
next();
},
{ method: me.runDelete, scope: me, args: [t] },
{ method: me.waitForListMode, scope: me, args: [t] },
{ method: me.checkDeleteResult, scope: me, args: [t] }
);
});
Thanks in advance!