I am getting the error below as a result of using the each() method in protractor. It has worked fine in the past but is now consistently failing with this error.
In a nutshell, it happens because each()
just fires commands simultaneously against all elements. In your case you probably need to go this way element.all(bars).getCssValue('width')).then(array => {/*do what you want with returned array here*/})
* Edited *
What you want to do is
element.all(bars).getCssValue('width')).then(array => {
// tests is at least one element will not be "0px"
let elementHasWidth = array.some(elem => elem !== "0px");
expect(elementHasWidth).toBe(true);
})