Skip to content

Instantly share code, notes, and snippets.

@giovanettid
Last active November 9, 2015 21:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save giovanettid/5ff5d4c90720a5798e3e to your computer and use it in GitHub Desktop.
mocha chai test with casperjs page object
describe('Todo add scenario', function() {
before(function () {
todo.before();
});
it('titre de la page', function() {
todo.test(function() {
expect("TodoListWithBB").to.matchTitle;
});
});
it('titre de la todo list', function() {
todo.test(function() {
expect(todo.titleList()).to.equal('todos');
});
});
it('ajout premier dans la todo list',function() {
todo.test(function() {
todo.typeNew('first todo').enterNew();
expect(todo.first()).to.equal('first todo');
});
});
it('ajout deuxieme todo dans la todo list',function() {
todo.test(function() {
todo.typeNew('second todo').enterNew();
expect(todo.nbVisible()).to.equal(2);
expect(todo.nthText(2)).to.equal('second todo');
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment