I am trying to call done() for async tests but that is not working, i am getting 'undefined is not a function' error.
describe('Login screen tests', function () {
var ptor = protractor.getInstance();
beforeEach(function(){
console.log('In before Each method');
ptor.get('http://staging-machine/login/#/');
});
it('Blank Username & Password test', function(done) {
ptor.findElement(protractor.By.id("submit")).click();
var message = ptor.findElement(protractor.By.repeater('message in messages'));
message.then(function(message){
message.getText().then(function(text) {
console.log("Message shown:"+text);
expect(message.getText()).toContain('Username or Password can\'t be blank');
done();
});
});
});
});
I tried to google around, and found that there might be some issue with jasmine, but i am still unable to resolve this. Because the error seems to be really unexpected. Any help would be appreciated.