Skip to content

Instantly share code, notes, and snippets.

@gmoeck
Created April 11, 2011 20:54
Show Gist options
  • Save gmoeck/914318 to your computer and use it in GitHub Desktop.
Save gmoeck/914318 to your computer and use it in GitHub Desktop.
Page.within('.search-results', function() {
expect(Page.html()).toContain(itemTitle);
});
@publickeating
Copy link

Can you do something like?:

Page.within('.search-results', function(html) {
  // check that something does exist equals(result, expectedResult)
  equals(html.contains(itemTitle), true);
  // check that something doesn't exist
  equals(html.contains(notItemTitle), false);
});

@gmoeck
Copy link
Author

gmoeck commented Apr 11, 2011

so in your mind there html is a jQuery object?

@publickeating
Copy link

I just thought that would be a clean way to replace Page.html(). I thought that it would be whatever Page.html() returns

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment