Skip to content

Commit

Permalink
Fixing tests from shift and ctrl enter swap.
Browse files Browse the repository at this point in the history
  • Loading branch information
ellisonbg committed Jan 30, 2014
1 parent dd93fdd commit 0a3461f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions IPython/html/tests/casperjs/test_cases/execute_code_cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ casper.notebook_test(function () {
var cell = IPython.notebook.get_cell(0);
cell.set_text('a=11; print(a)');
cell.clear_output();
IPython.utils.press_ctrl_enter();
IPython.utils.press_shift_enter();
});

this.wait_for_output(0);
Expand All @@ -31,7 +31,7 @@ casper.notebook_test(function () {
var result = this.get_output_cell(0);
var num_cells = this.get_cells_length();
this.test.assertEquals(result.text, '11\n', 'cell execute (using ctrl-enter)');
this.test.assertEquals(num_cells, 2, 'ctrl-enter adds a new cell at the bottom')
this.test.assertEquals(num_cells, 2, 'shift-enter adds a new cell at the bottom')
});

// do it again with the keyboard shortcut
Expand All @@ -41,7 +41,7 @@ casper.notebook_test(function () {
var cell = IPython.notebook.get_cell(0);
cell.set_text('a=12; print(a)');
cell.clear_output();
IPython.utils.press_shift_enter();
IPython.utils.press_ctrl_enter();
});

this.wait_for_output(0);
Expand All @@ -50,7 +50,7 @@ casper.notebook_test(function () {
var result = this.get_output_cell(0);
var num_cells = this.get_cells_length();
this.test.assertEquals(result.text, '12\n', 'cell execute (using shift-enter)');
this.test.assertEquals(num_cells, 1, 'shift-enter adds no new cell at the bottom')
this.test.assertEquals(num_cells, 1, 'ctrl-enter adds no new cell at the bottom')
});

// press the "play" triangle button in the toolbar
Expand Down

0 comments on commit 0a3461f

Please sign in to comment.