diff --git a/IPython/html/tests/casperjs/test_cases/widgets_multicontainer.js b/IPython/html/tests/casperjs/test_cases/widgets_multicontainer.js index 44f1122..54da3c7 100644 --- a/IPython/html/tests/casperjs/test_cases/widgets_multicontainer.js +++ b/IPython/html/tests/casperjs/test_cases/widgets_multicontainer.js @@ -10,9 +10,10 @@ casper.notebook_test(function () { var multicontainer1_query = '.widget-area .widget-subarea div div.nav-tabs'; var multicontainer1_index = this.append_cell( 'multicontainer = widgets.MulticontainerWidget()\n' + - 'page1 = widgets.StringWidget(parent=multicontainer)\n' + - 'page2 = widgets.StringWidget(parent=multicontainer)\n' + - 'page3 = widgets.StringWidget(parent=multicontainer)\n' + + 'page1 = widgets.StringWidget()\n' + + 'page2 = widgets.StringWidget()\n' + + 'page3 = widgets.StringWidget()\n' + + 'multicontainer.children = [page1, page2, page3]\n' + 'display(multicontainer)\n' + 'multicontainer.selected_index = 0\n' + 'print("Success")\n'); @@ -64,9 +65,10 @@ casper.notebook_test(function () { var multicontainer2_query = '.widget-area .widget-subarea .accordion'; var multicontainer2_index = this.append_cell( 'multicontainer = widgets.MulticontainerWidget()\n' + - 'page1 = widgets.StringWidget(parent=multicontainer)\n' + - 'page2 = widgets.StringWidget(parent=multicontainer)\n' + - 'page3 = widgets.StringWidget(parent=multicontainer)\n' + + 'page1 = widgets.StringWidget()\n' + + 'page2 = widgets.StringWidget()\n' + + 'page3 = widgets.StringWidget()\n' + + 'multicontainer.children = [page1, page2, page3]\n' + 'multicontainer.set_title(2, "good")\n' + 'display(multicontainer, view_name="AccordionView")\n' + 'multicontainer.selected_index = 0\n' + diff --git a/IPython/html/tests/casperjs/test_cases/wigets_container.js b/IPython/html/tests/casperjs/test_cases/wigets_container.js index 9316b1b..018a166 100644 --- a/IPython/html/tests/casperjs/test_cases/wigets_container.js +++ b/IPython/html/tests/casperjs/test_cases/wigets_container.js @@ -8,7 +8,8 @@ casper.notebook_test(function () { var container_index = this.append_cell( 'container = widgets.ContainerWidget()\n' + - 'button = widgets.ButtonWidget(parent=container)\n'+ + 'button = widgets.ButtonWidget()\n'+ + 'container.children = [button]\n'+ 'display(container)\n'+ 'container.add_class("my-test-class")\n'+ 'print("Success")\n'); @@ -35,15 +36,15 @@ casper.notebook_test(function () { }); index = this.append_cell( - 'container.set_css("display", "none")\n'+ + 'container.set_css("float", "right")\n'+ 'print("Success")\n'); this.execute_cell_then(index, function(index){ this.test.assert(this.get_output_cell(index).text == 'Success\n', 'Set container class CSS cell executed with correct output.'); - + this.test.assert(this.cell_element_function(container_index, - '.widget-area .widget-subarea .my-test-class', 'css', ['display'])=='none', + '.widget-area .widget-subarea .my-test-class', 'css', ['float'])=='right', 'set_css works.'); });