Skip to content

Instantly share code, notes, and snippets.

@joelgriffith
Created July 11, 2017 17:07
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 joelgriffith/34f50828e6f0847cc30ed6075a7ca139 to your computer and use it in GitHub Desktop.
Save joelgriffith/34f50828e6f0847cc30ed6075a7ca139 to your computer and use it in GitHub Desktop.
Blank username assertion
// Goto a page, click a button, expect a message
it('should show an error if no username is filled out', () => {
return chrome.goto('http://localhost:3000/')
.then(() => chrome.click('[data-test="submit"]'))
.then(() => chrome.html('[data-test="error"]'))
.then((html) => expect(html).toContain('Username is required'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment