mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-15 04:00:34 +08:00
Added tests for merge above on topmost cell
This commit is contained in:
parent
8b31737ad6
commit
5a4363f6e9
@ -67,6 +67,21 @@ casper.notebook_test(function () {
|
||||
this.test.assert(cell_is_mergeable(2), 'Cell 2 is mergeable');
|
||||
});
|
||||
|
||||
// Try to merge cell 0 above, nothing should happen
|
||||
this.then(function () {
|
||||
this.select_cell(0);
|
||||
});
|
||||
this.thenEvaluate(function() {
|
||||
IPython.notebook.merge_cell_above();
|
||||
});
|
||||
this.then(function() {
|
||||
this.test.assertEquals(this.get_cells_length(), 3, 'Merge cell 0 above: There are still 3 cells');
|
||||
this.test.assertEquals(this.get_cell_text(0), a, 'Merge cell 0 above: Cell 0 is unchanged');
|
||||
this.test.assertEquals(this.get_cell_text(1), b, 'Merge cell 0 above: Cell 1 is unchanged');
|
||||
this.test.assertEquals(this.get_cell_text(2), c, 'Merge cell 0 above: Cell 2 is unchanged');
|
||||
this.validate_notebook_state('merge up', command, 0);
|
||||
});
|
||||
|
||||
// Try to merge cell 0 below with cell 1
|
||||
this.then(function () {
|
||||
this.select_cell(0);
|
||||
|
Loading…
Reference in New Issue
Block a user