mirror of
https://github.com/jupyter/notebook.git
synced 2025-02-05 12:19:58 +08:00
add select_cells test utility
selects [included,excluded) semi-open range, like Python conventions.
This commit is contained in:
parent
89b75c21e2
commit
f0cb481cb2
@ -446,6 +446,15 @@ casper.select_cell = function(index, moveanchor) {
|
||||
}, {i: index, moveanchor: moveanchor});
|
||||
};
|
||||
|
||||
casper.select_cells = function(index, bound, moveanchor) {
|
||||
// Select a block of cells in the notebook.
|
||||
// like Python range, selects [index,bound)
|
||||
this.evaluate(function (i, n, moveanchor) {
|
||||
Jupyter.notebook.select(i, moveanchor);
|
||||
Jupyter.notebook.extend_selection_by(n);
|
||||
}, {i: index, n: (bound - index - 1), moveanchor: moveanchor});
|
||||
};
|
||||
|
||||
casper.click_cell_editor = function(index) {
|
||||
// Emulate a click on a cell's editor.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user