end of tests

Pierre Gerold 10 years ago
parent 94d057bf10
commit 845ea5e555

@ -69,16 +69,29 @@ casper.notebook_test(function () {
/**
* Test the multiselection 2 moves down.
**/
var result_indices = this.evaluate( function() {
this.test.assert(this.evaluate( function() {
Jupyter.notebook.select(0);
Jupyter.notebook.extend_selection_by(2);
var indices = Jupyter.notebook.get_selected_cells_indices();
var indices_it = [2,3,4].entries();
Jupyter.notebook.move_selection_down();
Jupyter.notebook.move_selection_down();
return Jupyter.notebook.get_selected_cells_indices();
});
var result = [2,3,4].entries();
this.test.assert(result_indices.every( function(i){ return i === result.next().value[1];}))
var result = Jupyter.notebook.get_selected_cells_indices();
return result.every( function(i){return i === indices_it.next().value[1];})
}));
/**
* Test multiselection 2 moves up.
**/
this.test.assert( this.evaluate( function(){
Jupyter.notebook.select(2);
Jupyter.notebook.extend_selection_by(3);
var indices_it = [0,1,2,3].entries();
Jupyter.notebook.move_selection_up();
Jupyter.notebook.move_selection_up();
var result = Jupyter.notebook.get_selected_cells_indices();
return result.every( function(i){return i === indices_it.next().value[1];})
}));
/**
* Test the multiselection move up at beginning of a Notebook

Loading…
Cancel
Save