##// END OF EJS Templates
Make nbconvert a little less chatty....
Make nbconvert a little less chatty. User don't really care what template is used by default. and no need to say where the files might be written if they won't be.

File last commit:

r15949:d0ec96bd
r20724:b375a3ea
Show More
merge_cells_api.js
43 lines | 1.3 KiB | application/javascript | JavascriptLexer
//
// Test merging two notebook cells.
//
casper.notebook_test(function() {
var that = this;
var set_cells_text = function () {
that.evaluate(function() {
var cell_one = IPython.notebook.get_selected_cell();
cell_one.set_text('a = 5');
});
that.trigger_keydown('b');
that.evaluate(function() {
var cell_two = IPython.notebook.get_selected_cell();
cell_two.set_text('print(a)');
});
};
this.evaluate(function () {
IPython.notebook.command_mode();
});
// merge_cell_above()
set_cells_text();
var output_above = this.evaluate(function () {
IPython.notebook.merge_cell_above();
return IPython.notebook.get_selected_cell().get_text();
});
// merge_cell_below()
set_cells_text();
var output_below = this.evaluate(function() {
IPython.notebook.select(0);
IPython.notebook.merge_cell_below();
return IPython.notebook.get_selected_cell().get_text();
});
this.test.assertEquals(output_above, 'a = 5\nprint(a)',
'Successful merge_cell_above().');
this.test.assertEquals(output_below, 'a = 5\nprint(a)',
'Successful merge_cell_below().');
});