mirror of
https://github.com/jupyter/notebook.git
synced 2025-01-12 11:45:38 +08:00
Final fixes?
This commit is contained in:
parent
ae2b0800cf
commit
baa28a0b81
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)');
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user