Show More
@@ -81,7 +81,7 b' casper.notebook_test(function () {' | |||
|
81 | 81 | |
|
82 | 82 | // Test bool widget //////////////////////////////////////////////////////// |
|
83 | 83 | var bool_index = this.append_cell( |
|
84 | 'bool_widget = widgets.BoolWidget(description="Title")\n' + | |
|
84 | 'bool_widget = widgets.BoolWidget(description="Title", value=True)\n' + | |
|
85 | 85 | 'display(bool_widget)\n'+ |
|
86 | 86 | 'display(bool_widget, view_name="ToggleButtonView")\n' + |
|
87 | 87 | 'print("Success")'); |
@@ -99,6 +99,10 b' casper.notebook_test(function () {' | |||
|
99 | 99 | '.widget-area .widget-subarea .widget-hbox-single input'), |
|
100 | 100 | 'Checkbox exists.'); |
|
101 | 101 | |
|
102 | this.test.assert(this.cell_element_function(index, | |
|
103 | '.widget-area .widget-subarea .widget-hbox-single input', 'val')==true, | |
|
104 | 'Checkbox is checked.'); | |
|
105 | ||
|
102 | 106 | this.test.assert(this.cell_element_exists(index, |
|
103 | 107 | '.widget-area .widget-subarea .widget-hbox-single .widget-hlabel'), |
|
104 | 108 | 'Checkbox label exists.'); |
@@ -115,6 +119,10 b' casper.notebook_test(function () {' | |||
|
115 | 119 | '.widget-area .widget-subarea div button', 'html')=="Title", |
|
116 | 120 | 'Toggle button labeled correctly.'); |
|
117 | 121 | |
|
122 | this.test.assert(this.cell_element_function(index, | |
|
123 | '.widget-area .widget-subarea div button', 'hasClass', ['active']), | |
|
124 | 'Toggle button is toggled.'); | |
|
125 | ||
|
118 | 126 | }); |
|
119 | 127 | |
|
120 | 128 | // Test button widget ////////////////////////////////////////////////////// |
General Comments 0
You need to be logged in to leave comments.
Login now