##// END OF EJS Templates
Backport PR #6005: Changed right arrow key movement function to mirror left arrow key...
Backport PR #6005: Changed right arrow key movement function to mirror left arrow key Seems to solve Issue #5926 on this machine, and passing the test file locally. Changed from `cursor.movePosition` to `self._control.moveCursor`, the latter is what the left-arrow key uses. Also removed line 1373 which seems unnecessary and which prevents the cursor from moving at all. I'm not certain how to further test this to make sure nothing was broken.

File last commit:

r15941:3ba9c75a
r17151:477b3912
Show More
interrupt.js
44 lines | 1.1 KiB | application/javascript | JavascriptLexer
//
// Test kernel interrupt
//
casper.notebook_test(function () {
this.evaluate(function () {
var cell = IPython.notebook.get_cell(0);
cell.set_text(
'import time'+
'\nfor x in range(3):'+
'\n time.sleep(1)'
);
cell.execute();
});
this.wait_for_busy();
// interrupt using menu item (Kernel -> Interrupt)
this.thenClick('li#int_kernel');
this.wait_for_output(0);
this.then(function () {
var result = this.get_output_cell(0);
this.test.assertEquals(result.ename, 'KeyboardInterrupt', 'keyboard interrupt (mouseclick)');
});
// run cell 0 again, now interrupting using keyboard shortcut
this.thenEvaluate(function () {
cell.clear_output();
cell.execute();
});
// interrupt using Ctrl-M I keyboard shortcut
this.then(function(){
this.trigger_keydown('i');
});
this.wait_for_output(0);
this.then(function () {
var result = this.get_output_cell(0);
this.test.assertEquals(result.ename, 'KeyboardInterrupt', 'keyboard interrupt (shortcut)');
});
});