In protractor I would like to assert that all elements are displayed that have a particular css class. But syntax like this doesn't work.
expect(element.all(by.className('bill')).each(x => x.isDisplayed().toBeTruthy());
What's the protractor way of achieving this goal? Is this it?
let els = element.all(by.className('bill'));
els.then(x => {
x.forEach(y => {
expect(y.isDisplayed()).toBeTruthy();
})
});
This works, but seems overly complex.