##// END OF EJS Templates
Fixed JS tests to reflect Jason's changes
Jonathan Frederic -
Show More
@@ -10,9 +10,10 b' casper.notebook_test(function () {'
10 10 var multicontainer1_query = '.widget-area .widget-subarea div div.nav-tabs';
11 11 var multicontainer1_index = this.append_cell(
12 12 'multicontainer = widgets.MulticontainerWidget()\n' +
13 'page1 = widgets.StringWidget(parent=multicontainer)\n' +
14 'page2 = widgets.StringWidget(parent=multicontainer)\n' +
15 'page3 = widgets.StringWidget(parent=multicontainer)\n' +
13 'page1 = widgets.StringWidget()\n' +
14 'page2 = widgets.StringWidget()\n' +
15 'page3 = widgets.StringWidget()\n' +
16 'multicontainer.children = [page1, page2, page3]\n' +
16 17 'display(multicontainer)\n' +
17 18 'multicontainer.selected_index = 0\n' +
18 19 'print("Success")\n');
@@ -64,9 +65,10 b' casper.notebook_test(function () {'
64 65 var multicontainer2_query = '.widget-area .widget-subarea .accordion';
65 66 var multicontainer2_index = this.append_cell(
66 67 'multicontainer = widgets.MulticontainerWidget()\n' +
67 'page1 = widgets.StringWidget(parent=multicontainer)\n' +
68 'page2 = widgets.StringWidget(parent=multicontainer)\n' +
69 'page3 = widgets.StringWidget(parent=multicontainer)\n' +
68 'page1 = widgets.StringWidget()\n' +
69 'page2 = widgets.StringWidget()\n' +
70 'page3 = widgets.StringWidget()\n' +
71 'multicontainer.children = [page1, page2, page3]\n' +
70 72 'multicontainer.set_title(2, "good")\n' +
71 73 'display(multicontainer, view_name="AccordionView")\n' +
72 74 'multicontainer.selected_index = 0\n' +
@@ -8,7 +8,8 b' casper.notebook_test(function () {'
8 8
9 9 var container_index = this.append_cell(
10 10 'container = widgets.ContainerWidget()\n' +
11 'button = widgets.ButtonWidget(parent=container)\n'+
11 'button = widgets.ButtonWidget()\n'+
12 'container.children = [button]\n'+
12 13 'display(container)\n'+
13 14 'container.add_class("my-test-class")\n'+
14 15 'print("Success")\n');
@@ -35,15 +36,15 b' casper.notebook_test(function () {'
35 36 });
36 37
37 38 index = this.append_cell(
38 'container.set_css("display", "none")\n'+
39 'container.set_css("float", "right")\n'+
39 40 'print("Success")\n');
40 41 this.execute_cell_then(index, function(index){
41 42
42 43 this.test.assert(this.get_output_cell(index).text == 'Success\n',
43 44 'Set container class CSS cell executed with correct output.');
44
45
45 46 this.test.assert(this.cell_element_function(container_index,
46 '.widget-area .widget-subarea .my-test-class', 'css', ['display'])=='none',
47 '.widget-area .widget-subarea .my-test-class', 'css', ['float'])=='right',
47 48 'set_css works.');
48 49 });
49 50
General Comments 0
You need to be logged in to leave comments. Login now