Cleanup and comment

[no-ci]
This commit is contained in:
Matthias Bussonnier 2015-12-11 16:41:59 +01:00
parent f2a42913a3
commit 50e1f8b746

View File

@ -16,15 +16,12 @@ casper.notebook_test(function () {
pre_message+': Verify that cell `' + i + '` has for content: `'+ expected_state[i] + '` found : ' + that.get_cell_text(i)
);
}
}
this.then(function () {
// Copy/paste/cut
// select 3 first cells
this.select_cell(0);
this.select_cell(2, false);
@ -32,8 +29,10 @@ casper.notebook_test(function () {
Jupyter.notebook.move_selection_up();
});
// should not move up at top
assert_order(this, 'move up at top', ['', '1', '2', '3', '4', '5','6'])
// we do not need to reselect, move/up down should keep the selection.
this.evaluate(function () {
Jupyter.notebook.move_selection_down();
Jupyter.notebook.move_selection_down();
@ -41,12 +40,14 @@ casper.notebook_test(function () {
Jupyter.notebook.move_selection_down();
});
// 4 times down should move to the 3 cells to the bottom
assert_order(this, 'move down to bottom', [ '3', '4', '5','6', '', '1', '2'])
this.evaluate(function () {
Jupyter.notebook.move_selection_down();
});
// they can't go any further (test it)
assert_order(this, 'move at to top', [ '3', '4', '5','6', '', '1', '2'])
this.evaluate(function () {
@ -55,7 +56,8 @@ casper.notebook_test(function () {
Jupyter.notebook.move_selection_up();
Jupyter.notebook.move_selection_up();
});
// bring them back on top.
assert_order(this, 'move up to top', ['', '1', '2', '3', '4', '5','6'])
});