From 755565019df32368af1e0ce09547ad1ab37c8cf0 Mon Sep 17 00:00:00 2001 From: Paul Ivanov Date: Tue, 22 Oct 2013 14:51:34 -0700 Subject: [PATCH] adds test of clicking the play button --- .../casperjs/test_cases/execute_code_cell.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/IPython/html/tests/casperjs/test_cases/execute_code_cell.js b/IPython/html/tests/casperjs/test_cases/execute_code_cell.js index 4860fcd63..e9d5228ca 100644 --- a/IPython/html/tests/casperjs/test_cases/execute_code_cell.js +++ b/IPython/html/tests/casperjs/test_cases/execute_code_cell.js @@ -50,4 +50,20 @@ casper.notebook_test(function () { this.test.assertEquals(result.text, '12\n', 'cell execute (using shift-enter)'); this.test.assertEquals(num_cells, 2, ' ^--- adds a new cell') }); + + // press the "play" triangle button in the toolbar + this.thenEvaluate(function () { + var cell = IPython.notebook.get_cell(0); + IPython.notebook.select(0); + cell.clear_output(); + cell.set_text('a=13; print(a)'); + $('#run_b').click(); + }); + + this.wait_for_output(0); + + this.then(function () { + var result = this.get_output_cell(0); + this.test.assertEquals(result.text, '13\n', 'cell execute (using "play" toolbar button)') + }); });