Show More
@@ -22,7 +22,7 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.utils.press_ |
|
25 | IPython.utils.press_shift_enter(); | |
26 | }); |
|
26 | }); | |
27 |
|
27 | |||
28 | this.wait_for_output(0); |
|
28 | this.wait_for_output(0); | |
@@ -31,7 +31,7 casper.notebook_test(function () { | |||||
31 | var result = this.get_output_cell(0); |
|
31 | var result = this.get_output_cell(0); | |
32 | var num_cells = this.get_cells_length(); |
|
32 | var num_cells = this.get_cells_length(); | |
33 | this.test.assertEquals(result.text, '11\n', 'cell execute (using ctrl-enter)'); |
|
33 | this.test.assertEquals(result.text, '11\n', 'cell execute (using ctrl-enter)'); | |
34 |
this.test.assertEquals(num_cells, 2, ' |
|
34 | this.test.assertEquals(num_cells, 2, 'shift-enter adds a new cell at the bottom') | |
35 | }); |
|
35 | }); | |
36 |
|
36 | |||
37 | // do it again with the keyboard shortcut |
|
37 | // do it again with the keyboard shortcut | |
@@ -41,7 +41,7 casper.notebook_test(function () { | |||||
41 | var cell = IPython.notebook.get_cell(0); |
|
41 | var cell = IPython.notebook.get_cell(0); | |
42 | cell.set_text('a=12; print(a)'); |
|
42 | cell.set_text('a=12; print(a)'); | |
43 | cell.clear_output(); |
|
43 | cell.clear_output(); | |
44 |
IPython.utils.press_ |
|
44 | IPython.utils.press_ctrl_enter(); | |
45 | }); |
|
45 | }); | |
46 |
|
46 | |||
47 | this.wait_for_output(0); |
|
47 | this.wait_for_output(0); | |
@@ -50,7 +50,7 casper.notebook_test(function () { | |||||
50 | var result = this.get_output_cell(0); |
|
50 | var result = this.get_output_cell(0); | |
51 | var num_cells = this.get_cells_length(); |
|
51 | var num_cells = this.get_cells_length(); | |
52 | this.test.assertEquals(result.text, '12\n', 'cell execute (using shift-enter)'); |
|
52 | this.test.assertEquals(result.text, '12\n', 'cell execute (using shift-enter)'); | |
53 |
this.test.assertEquals(num_cells, 1, ' |
|
53 | this.test.assertEquals(num_cells, 1, 'ctrl-enter adds no new cell at the bottom') | |
54 | }); |
|
54 | }); | |
55 |
|
55 | |||
56 | // press the "play" triangle button in the toolbar |
|
56 | // press the "play" triangle button in the toolbar |
General Comments 0
You need to be logged in to leave comments.
Login now