|
@@ -919,7 +919,9 @@ describe('@jupyterlab/notebook', () => {
|
|
|
it('should extend the selection to the topmost cell', () => {
|
|
|
widget.activeCellIndex = 1;
|
|
|
NotebookActions.extendSelectionAbove(widget, true);
|
|
|
- expect(widget.isSelected(widget.widgets[0])).to.equal(true);
|
|
|
+ for (let i = widget.activeCellIndex; i >= 0; i--) {
|
|
|
+ expect(widget.isSelected(widget.widgets[i])).to.equal(true);
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
it('should be a no-op if there is no model', () => {
|
|
@@ -976,8 +978,9 @@ describe('@jupyterlab/notebook', () => {
|
|
|
|
|
|
it('should extend the selection the bottomost cell', () => {
|
|
|
NotebookActions.extendSelectionBelow(widget, true);
|
|
|
- expect(widget.isSelected(widget.widgets[0])).to.equal(true);
|
|
|
- expect(widget.isSelected(widget.widgets[1])).to.equal(true);
|
|
|
+ for (let i = widget.activeCellIndex; i < widget.widgets.length; i++) {
|
|
|
+ expect(widget.isSelected(widget.widgets[i])).to.equal(true);
|
|
|
+ }
|
|
|
});
|
|
|
it('should be a no-op if there is no model', () => {
|
|
|
widget.model = null;
|