Final fixes?

This commit is contained in:
Jonathan Frederic 2014-03-13 10:22:09 -07:00
parent ae2b0800cf
commit baa28a0b81
3 changed files with 12 additions and 5 deletions

View File

@ -22,11 +22,11 @@ casper.notebook_test(function () {
var cell = IPython.notebook.get_cell(0);
cell.set_text('a=11; print(a)');
cell.clear_output();
IPython.keyboard.trigger_keydown('shift-enter');
});
this.then(function(){
this.trigger_keydown('shift-enter');
});
this.wait_for_output(0);
@ -45,7 +45,10 @@ casper.notebook_test(function () {
var cell = IPython.notebook.get_cell(0);
cell.set_text('a=12; print(a)');
cell.clear_output();
IPython.keyboard.trigger_keydown('ctrl-enter');
});
this.then(function(){
this.trigger_keydown('ctrl-enter');
});
this.wait_for_output(0);

View File

@ -31,8 +31,8 @@ casper.notebook_test(function () {
});
// interrupt using Ctrl-M I keyboard shortcut
this.thenEvaluate( function() {
IPython.keyboard.trigger_keydown('i');
this.then(function(){
this.trigger_keydown('i');
});
this.wait_for_output(0);

View File

@ -2,6 +2,7 @@
// Test merging two notebook cells.
//
casper.notebook_test(function() {
var that = this;
var output = this.evaluate(function () {
// Fill in test data.
IPython.notebook.command_mode();
@ -9,7 +10,10 @@ casper.notebook_test(function() {
var cell_one = IPython.notebook.get_selected_cell();
cell_one.set_text('a = 5');
IPython.keyboard.trigger_keydown('b');
var element = $(document);
var event = IPython.keyboard.shortcut_to_event('b', 'keydown');
element.trigger(event);
var cell_two = IPython.notebook.get_selected_cell();
cell_two.set_text('print(a)');
};