Skip to content

Instantly share code, notes, and snippets.

@sanjsanj
Last active July 1, 2017 15:13
Show Gist options
  • Save sanjsanj/9aac642b8525e42778b87693ba2a8eb8 to your computer and use it in GitHub Desktop.
Save sanjsanj/9aac642b8525e42778b87693ba2a8eb8 to your computer and use it in GitHub Desktop.
const expect = require('chai').expect;
describe('TodoList App', () => {
it('Should load with the right title', () => {
...
});
it('Should allow me to create a Todo', () => {
const todoText = 'Get better at testing';
browser.url('http://localhost:3000/');
browser.element('.todo-input').setValue(todoText);
browser.click('.todo-submit');
const actual = browser.element('.todo-text').getText();
expect(actual).to.equal(todoText);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment