##// END OF EJS Templates
This feature was discussed in #6123, but it doesn't look like anything was ever incorporated into the IPython Notebook....
This feature was discussed in #6123, but it doesn't look like anything was ever incorporated into the IPython Notebook. Here's a brief overview of the changes: - Display of messages from other clients can be toggled on and off from within a notebook, either using the ``<M-m>e`` keyboard shortcut in the web UI, or through the option in the "Kernel" menu. - notebook.js controls whether messages are displayed through a callback that is invoked from kernel.js when no callbacks are available for a message. - The UI displays ``execute_input`` messages originating from an other clients in new cells at the end of the notebook. Output messages (``execute_result`` et al.) will only be displayed if a cell exists with a matching message ID. Pending design questions: - Should each ``execute_input`` message cause a new cell to be created? - Should new cells be placed at the end of the notebook, or elsewhere? If the latter, what criteria should be followed?

File last commit:

r15949:d0ec96bd
r19164:17ac8ca3
Show More
merge_cells_api.js
43 lines | 1.3 KiB | application/javascript | JavascriptLexer
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 //
// Test merging two notebook cells.
//
Paul Ivanov
pep8 style function names
r13275 casper.notebook_test(function() {
Jonathan Frederic
Final fixes?
r15941 var that = this;
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 var set_cells_text = function () {
that.evaluate(function() {
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 var cell_one = IPython.notebook.get_selected_cell();
cell_one.set_text('a = 5');
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 });
that.trigger_keydown('b');
Jonathan Frederic
Final fixes?
r15941
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 that.evaluate(function() {
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 var cell_two = IPython.notebook.get_selected_cell();
Thomas Kluyver
Use Python 3 compatible syntax in tests
r13278 cell_two.set_text('print(a)');
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 });
};
this.evaluate(function () {
IPython.notebook.command_mode();
});
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 // merge_cell_above()
Jonathan Frederic
s/set_cell_text/set_cells_text
r15948 set_cells_text();
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 var output_above = this.evaluate(function () {
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 IPython.notebook.merge_cell_above();
Jonathan Frederic
get_text() before returning results
r15949 return IPython.notebook.get_selected_cell().get_text();
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 });
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 // merge_cell_below()
Jonathan Frederic
s/set_cell_text/set_cells_text
r15948 set_cells_text();
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 var output_below = this.evaluate(function() {
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 IPython.notebook.select(0);
IPython.notebook.merge_cell_below();
Jonathan Frederic
get_text() before returning results
r15949 return IPython.notebook.get_selected_cell().get_text();
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 });
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 this.test.assertEquals(output_above, 'a = 5\nprint(a)',
Brian E. Granger
Fixing more JS tests.
r14081 'Successful merge_cell_above().');
Jonathan Frederic
Call trigger_keydown in merge_cells_api test
r15943 this.test.assertEquals(output_below, 'a = 5\nprint(a)',
Brian E. Granger
Fixing more JS tests.
r14081 'Successful merge_cell_below().');
David Wyde
Add CasperJS tests for `merge_cell_above()` and `merge_cell_below()`.
r13256 });