Extending test class example
Posted: Thu Nov 01, 2018 8:45 pm
I'm having trouble reproducing the extending test class example (https://www.bryntum.com/docs/siesta/#!/ ... test_class) using Siesta 5.1.1. When I execute my test case that uses the isOdd function, Test throws an exception: "TypeError: this.pass is not a function". The commented code for the setup override works when it is uncommented, so I'm not sure why the isOdd method is not working. If there is any other info you need, just let me know.
Class('MyProject.MyTestClass', {
isa : Siesta.Test.Browser,
// override: {
// setup : function(callback, errback) {
// this.SUPER(function () {
// console.log('setup code reached');
// callback();
// }, errback)
// }
// },
methods : {
isOdd : (number, description) => {
if (number % 2) {
this.pass(description);
} else {
this.fail(description, {
assertionName : 'isOdd',
got : number,
annotation : 'Need odd number'
});
}
}
}
});