Show More
@@ -22,11 +22,11 casper.notebook_test(function () { | |||||
22 | var cell = IPython.notebook.get_cell(0); |
|
22 | var cell = IPython.notebook.get_cell(0); | |
23 | cell.set_text('a=11; print(a)'); |
|
23 | cell.set_text('a=11; print(a)'); | |
24 | cell.clear_output(); |
|
24 | cell.clear_output(); | |
25 | IPython.keyboard.trigger_keydown('shift-enter'); |
|
|||
26 | }); |
|
25 | }); | |
27 |
|
26 | |||
28 | this.then(function(){ |
|
27 | this.then(function(){ | |
29 |
|
28 | |||
|
29 | this.trigger_keydown('shift-enter'); | |||
30 | }); |
|
30 | }); | |
31 |
|
31 | |||
32 | this.wait_for_output(0); |
|
32 | this.wait_for_output(0); | |
@@ -45,7 +45,10 casper.notebook_test(function () { | |||||
45 | var cell = IPython.notebook.get_cell(0); |
|
45 | var cell = IPython.notebook.get_cell(0); | |
46 | cell.set_text('a=12; print(a)'); |
|
46 | cell.set_text('a=12; print(a)'); | |
47 | cell.clear_output(); |
|
47 | cell.clear_output(); | |
48 | IPython.keyboard.trigger_keydown('ctrl-enter'); |
|
48 | }); | |
|
49 | ||||
|
50 | this.then(function(){ | |||
|
51 | this.trigger_keydown('ctrl-enter'); | |||
49 | }); |
|
52 | }); | |
50 |
|
53 | |||
51 | this.wait_for_output(0); |
|
54 | this.wait_for_output(0); |
@@ -31,8 +31,8 casper.notebook_test(function () { | |||||
31 | }); |
|
31 | }); | |
32 |
|
32 | |||
33 | // interrupt using Ctrl-M I keyboard shortcut |
|
33 | // interrupt using Ctrl-M I keyboard shortcut | |
34 |
this.then |
|
34 | this.then(function(){ | |
35 |
|
|
35 | this.trigger_keydown('i'); | |
36 | }); |
|
36 | }); | |
37 |
|
37 | |||
38 | this.wait_for_output(0); |
|
38 | this.wait_for_output(0); |
@@ -2,6 +2,7 | |||||
2 | // Test merging two notebook cells. |
|
2 | // Test merging two notebook cells. | |
3 | // |
|
3 | // | |
4 | casper.notebook_test(function() { |
|
4 | casper.notebook_test(function() { | |
|
5 | var that = this; | |||
5 | var output = this.evaluate(function () { |
|
6 | var output = this.evaluate(function () { | |
6 | // Fill in test data. |
|
7 | // Fill in test data. | |
7 | IPython.notebook.command_mode(); |
|
8 | IPython.notebook.command_mode(); | |
@@ -9,7 +10,10 casper.notebook_test(function() { | |||||
9 | var cell_one = IPython.notebook.get_selected_cell(); |
|
10 | var cell_one = IPython.notebook.get_selected_cell(); | |
10 | cell_one.set_text('a = 5'); |
|
11 | cell_one.set_text('a = 5'); | |
11 |
|
12 | |||
12 | IPython.keyboard.trigger_keydown('b'); |
|
13 | var element = $(document); | |
|
14 | var event = IPython.keyboard.shortcut_to_event('b', 'keydown'); | |||
|
15 | element.trigger(event); | |||
|
16 | ||||
13 | var cell_two = IPython.notebook.get_selected_cell(); |
|
17 | var cell_two = IPython.notebook.get_selected_cell(); | |
14 | cell_two.set_text('print(a)'); |
|
18 | cell_two.set_text('print(a)'); | |
15 | }; |
|
19 | }; |
General Comments 0
You need to be logged in to leave comments.
Login now