From 287a0a7544a84cdc137cf9a7ebbd16413dc84ba2 2014-01-22 20:12:08 From: Jonathan Frederic Date: 2014-01-22 20:12:08 Subject: [PATCH] Removed float widget bound tests, once the int widget inherits from the float, or vise-versa, the tests will be covered by the int --- diff --git a/IPython/html/tests/casperjs/test_cases/widgets_float.js b/IPython/html/tests/casperjs/test_cases/widgets_float.js index 9d292f3..a01812f 100644 --- a/IPython/html/tests/casperjs/test_cases/widgets_float.js +++ b/IPython/html/tests/casperjs/test_cases/widgets_float.js @@ -91,7 +91,7 @@ casper.notebook_test(function () { 'for widget in floatrange:\n' + ' widget.max = 50.0\n' + ' widget.min = -50.0\n' + - ' widget.value = 20.0\n' + + ' widget.value = 25.0\n' + 'print("Success")\n'); this.execute_cell_then(index, function(index){ @@ -102,46 +102,7 @@ casper.notebook_test(function () { 'Widget slider exists.'); this.test.assert(this.cell_element_function(floatrange_index, slider_query, - 'slider', ['value']) == 20.0, + 'slider', ['value']) == 25.0, 'Slider set to Python value.'); - - // Clear the float textbox value and then set it to 1 by emulating - // keyboard presses. - this.cell_element_function(floatrange_index, float_text_query, 'val', ['']); - this.sendKeys(float_text_query, '1'); - }); - - this.wait(1500); // Wait for change to execute in kernel - - index = this.append_cell('for widget in floatrange:\n print(widget.value)\n'); - this.execute_cell_then(index, function(index){ - this.test.assert(this.get_output_cell(index).text == '1.0\n20.0\n', - 'Float textbox set float range value'); - - // Clear the float textbox value and then set it to 120 by emulating - // keyboard presses. - this.cell_element_function(floatrange_index, float_text_query, 'val', ['']); - this.sendKeys(float_text_query, '120'); - }); - - this.wait(500); // Wait for change to execute in kernel - - index = this.append_cell('print(floatrange[0].value)\n'); - this.execute_cell_then(index, function(index){ - this.test.assert(this.get_output_cell(index).text == '50.0\n', - 'Float textbox value bound'); - - // Clear the float textbox value and then set it to 'hello world' by - // emulating keyboard presses. 'hello world' should get filtered... - this.cell_element_function(floatrange_index, float_text_query, 'val', ['']); - this.sendKeys(float_text_query, 'hello world'); - }); - - this.wait(500); // Wait for change to execute in kernel - - index = this.append_cell('print(floatrange[0].value)\n'); - this.execute_cell_then(index, function(index){ - this.test.assert(this.get_output_cell(index).text == '50.0\n', - 'Invalid float textbox characters ignored'); }); }); \ No newline at end of file