From a3a8a1efb15285e41aa42cf9ddab95b62cf8fcbc Mon Sep 17 00:00:00 2001 From: Jonathan Frederic Date: Wed, 11 Dec 2013 23:16:21 +0000 Subject: [PATCH] Added list modification test to selection widget. --- IPython/html/tests/casperjs/test_cases/widgets.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/IPython/html/tests/casperjs/test_cases/widgets.js b/IPython/html/tests/casperjs/test_cases/widgets.js index 543f4f045..866a8fbe2 100644 --- a/IPython/html/tests/casperjs/test_cases/widgets.js +++ b/IPython/html/tests/casperjs/test_cases/widgets.js @@ -809,10 +809,15 @@ casper.notebook_test(function () { this.wait(500); // Wait for change to execute in kernel - index = this.append_cell('print(selection.value)'); + index = this.append_cell( + 'print(selection.value)\n' + + 'selection.values.append("z")\n' + + 'selection.send_state()\n' + + 'selection.value = "z"'); this.execute_cell_then(index, function(index){ - this.test.assert(this.get_output_cell(index).text == 'c\n', - 'Python updated with selected item.'); + + // Verify that selecting a combobox option updates all of the others. + this.test.assert(verify_selection(this, 4), 'Item added to selection widget.'); }); });