I have a small project in angular2 that I am trying to write some simple tests for using a protractor ..
I use ngFor to round the list of "foos" and display them on the page (quite simple).
Then I want my test to get the 1st text and check if it is a “bar”:
element.all(by.repeater('foo of foos')).get(1).then(function(x){
expect(x.getText()).toEqual('bar');
});
But when I run my test, I get:
Failed: element.all (...). get (...) and then not a function
Any idea what I'm doing wrong?
source
share