Skip to content

Instantly share code, notes, and snippets.

View giovanettid's full-sized avatar

Didier Giovanetti giovanettid

  • Didier Giovanetti
  • France
View GitHub Profile
describe('AppView', function() {
var todos = requirejs('collections/todos');
var AppView = requirejs('views/appView');
var Common = requirejs('common');
var $ = requirejs('jquery');
var appView;
var spyFetch;
describe('TodoView', function() {
var Todo = requirejs('models/todo');
var TodoView = requirejs('views/todoView');
var Common = requirejs('common');
var $ = requirejs('jquery');
var todo, todoView;
beforeEach(function() {
describe('Todos', function() {
var Todo = requirejs('models/todo');
var todos = requirejs('collections/todos');
beforeEach(function() {
todos.reset();
});
it('filtering completed', function() {
describe('Todo', function() {
var Todo = requirejs('models/todo');
var todo;
beforeEach(function() {
todo = new Todo();
});
@giovanettid
giovanettid / todoPage-casperjs.js
Last active November 9, 2015 21:59
todo page object casperjs
function TodoPage() {
'use strict';
var idNew = '#new-todo';
var title = '#header > h1';
var children = '#todo-list li';
var nthChild = function(n) {
return children+':nth-child('+n+')';
@giovanettid
giovanettid / todoPage-zombiejs.js
Last active November 9, 2015 21:58
todo page object zombiejs
function TodoPage() {
'use strict';
var ENTER_KEY = 13;
var idNew = '#new-todo';
var title = 'title';
var titleList = '#header > h1';
var children = '#todo-list li';
@giovanettid
giovanettid / todoPage-seleniumjs.js
Last active November 9, 2015 21:58
todo page object seleniumjs
function TodoPage() {
'use strict';
var idNew = '#new-todo';
var title = 'title';
var titleList = '#header > h1';
var children = '#todo-list li';
var childrenVisible = '#todo-list li:not(.hidden)';
@giovanettid
giovanettid / todoPage-webdriverio.js
Last active November 9, 2015 21:57
todo page object webdriverio
function TodoPage() {
'use strict';
var idNew = '#new-todo';
var title = 'title';
var titleList = '#header > h1';
var children = '#todo-list li';
var childrenVisible = '#todo-list li:not(.hidden)';
@giovanettid
giovanettid / todoAdd-casperjs.js
Last active November 9, 2015 21:55
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;
});
});
@giovanettid
giovanettid / todoAdd-zombiejs.js
Last active November 9, 2015 21:55
mocha chai test with zombiejs page object
describe('Todo add scenario', function() {
before(function(done) {
todo.before(done);
});
it('titre de la page', function() {
expect(todo.title()).to.equal('TodoListWithBB');
});
it('titre de la todo list', function() {