Skip to content

Instantly share code, notes, and snippets.

@cnishina
Last active April 28, 2017 21:40
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 cnishina/aeba4c496fa6ca76c930777cae2f0f2e to your computer and use it in GitHub Desktop.
Save cnishina/aeba4c496fa6ca76c930777cae2f0f2e to your computer and use it in GitHub Desktop.
fit('with filter: should find existing contact "Craig Service"', () => {
let tbody = element(by.tagName('tbody'));
let trs = tbody.all(by.tagName('tr'));
let craigService = trs.filter((elem, index) => {
return elem.all(by.tagName('td')).get(1).getText().then(text => {
return text === 'Craig Service';
});
});
expect(craigService.count()).toBeGreaterThan(0);
expect(craigService.all(by.tagName('td')).get(2).getText()).toBe('craig.services@example.com');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment