Skip to content

Instantly share code, notes, and snippets.

@benheymink
Created January 16, 2015 13:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benheymink/d0a692e8c138ef995f82 to your computer and use it in GitHub Desktop.
Save benheymink/d0a692e8c138ef995f82 to your computer and use it in GitHub Desktop.
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