Create a gist now

Instantly share code, notes, and snippets.

Broken Test spec
it('Should display the right number of elements on the page', function(){
// myExpectedObjects is an array of items i'm expecting to be
// drawn on the page
var elementMissing = false;
_.forEach(object in myExpectedObjects, function(myObject){
if(!element(by.id(myObject.id)).isPresent()){
elementMissing = true;
}
});
expect(elementMissing).toBeFalsy();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment