##// 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:

r15201:029ac024
r17151:477b3912
Show More
shutdown.js
49 lines | 1.7 KiB | application/javascript | JavascriptLexer
Paul Ivanov
add test for shutdown notebook
r13303 //
// Test shutdown of a kernel.
//
casper.notebook_test(function () {
Paul Ivanov
don't use test.begin...
r13306 // XXX: test.begin allows named sections but requires casperjs 1.1.0-DEV.
// We will put it back into place when the next version of casper is
// released. Following that, all instances of this.test can be changed
// to just test.
//this.test.begin("shutdown tests (notebook)", 2, function(test) {
Paul Ivanov
use test.begin to give test group a name
r13304
Paul Ivanov
don't delete casper instance on shutdown test...
r13416 // Our shutdown test closes the browser window, which will delete the
// casper browser object, and the rest of the test suite will fail with
// errors that look like:
//
// "Error: cannot access member `evaluate' of deleted QObject"
//
// So what we do here is make a quick popup window, and run the test inside
// of it.
this.then(function() {
this.evaluate(function(url){
window.open(url);
}, {url : this.getCurrentUrl()});
})
Paul Ivanov
add test for shutdown notebook
r13303
Paul Ivanov
don't delete casper instance on shutdown test...
r13416 this.waitForPopup('');
this.withPopup('', function () {
this.thenEvaluate(function () {
$('#kill_and_exit').click();
});
Paul Ivanov
add test for shutdown notebook
r13303
Paul Ivanov
don't delete casper instance on shutdown test...
r13416 this.thenEvaluate(function () {
var cell = IPython.notebook.get_cell(0);
cell.set_text('a=10; print(a)');
cell.execute();
});
this.then(function () {
MinRK
update shutdown_notebook...
r14906 var outputs = this.evaluate(function() {
return IPython.notebook.get_cell(0).output_area.outputs;
})
this.test.assertEquals(outputs.length, 0, "after shutdown: no execution results");
Paul Ivanov
don't delete casper instance on shutdown test...
r13416 this.test.assertNot(this.kernel_running(),
'after shutdown: IPython.notebook.kernel.running is false ');
});
});
Paul Ivanov
fix: allow JS test to run after shutdown test...
r13341
Paul Ivanov
don't use test.begin...
r13306 //}); // end of test.begin
Paul Ivanov
use test.begin to give test group a name
r13304 });