##// END OF EJS Templates
Use existing IPython method to kill kernels.
Use existing IPython method to kill kernels.

File last commit:

r13253:e04cf2bd
r13255:d7e3a89f
Show More
empty_nb_arrow_keys.js
22 lines | 748 B | application/javascript | JavascriptLexer
David Wyde
Add a test to demonstrate errors when up/down arrow keys are...
r13251 //
// Check for errors with up and down arrow presses in an empty notebook.
//
David Wyde
Wrap CasperJS tests in a helper function to reduce boilerplate.
r13253 casper.notebookTest(function () {
David Wyde
Add a test to demonstrate errors when up/down arrow keys are...
r13251 var result = this.evaluate(function() {
var ncells = IPython.notebook.ncells(),
i;
// Delete all cells.
for (i = 0; i < ncells; i++) {
IPython.notebook.delete_cell();
}
// Simulate the "up arrow" and "down arrow" keys.
David Wyde
Use keycode constants from jQuery UI and improve message in test.
r13252 var up_press = $.Event('keydown', {which: $.ui.keyCode.UP});
David Wyde
Add a test to demonstrate errors when up/down arrow keys are...
r13251 $(document).trigger(up_press);
David Wyde
Use keycode constants from jQuery UI and improve message in test.
r13252 var down_press = $.Event('keydown', {which: $.ui.keyCode.DOWN});
David Wyde
Add a test to demonstrate errors when up/down arrow keys are...
r13251 $(document).trigger(down_press);
return true;
});
David Wyde
Wrap CasperJS tests in a helper function to reduce boilerplate.
r13253 this.test.assertTrue(result, 'Up/down arrow okay in empty notebook.');
David Wyde
Add a test to demonstrate errors when up/down arrow keys are...
r13251 });