Last active
November 9, 2015 21:54
-
-
Save giovanettid/46c4fd89d52fe9d9241c to your computer and use it in GitHub Desktop.
mocha chai test with seleniumjs page object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Todo add scenario', function() { | |
before(function() { | |
return todo.before(); | |
}); | |
it('titre de la page', function() { | |
return expect(todo.title()).to.eventually.equal('TodoListWithBB'); | |
}); | |
it('titre de la todo list', function() { | |
return expect(todo.titleList()).to.eventually.equal('todos'); | |
}); | |
it('ajout premier dans la todo list',function() { | |
todo.typeNew('first todo').enterNew(); | |
return expect(todo.first()).to.eventually.equal('first todo'); | |
}); | |
it('ajout deuxieme todo dans la todo list',function() { | |
todo.typeNew('second todo').enterNew(); | |
return Q.all([ | |
expect(todo.nbVisible()).to.eventually.have.length(2), | |
expect(todo.nthText(2)).to.eventually.equal('second todo') | |
]); | |
}); | |
after(function() { | |
return todo.after(); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment